update_chroot failing with compile errors from update_attempter.cc

58 views
Skip to first unread message

Jungshik Shin (신정식, 申政湜)

unread,
May 13, 2015, 3:18:42 PM5/13/15
to Chromium OS dev
Hi,

When I ran 'cros_workon info --board=${BOARD} --all', I got this message:
( BOARD=x86-alex) 

The logic in this script has moved.
Please sync your repos and run:

    /mnt/host/source/src/scripts/update_chroot; hash -r

Because I ran 'repo sync' right before 'cros_workon info ...', I just ran the above command, but update_chroot failed with the following errors. There are compile errors in update_attempter.cc. 

Lines in update_attempter.cc   where the compiler emits error haven't changed since Nov 2014. So, somehow, a wrong version of debugd-releated header is picked up. 

I took a look at platform2/debugd, but couldn't find anything with DEV_FEATURES_DISABLED and kQueryDevFeatures (two missing members of debugd:: the compiler complained about) 

Another error is somehow the compiler used does not recognize "-Wno-c++11-extensions".

Has anybody seen them ? What could I do to resolve this issue? 

Thank you in advance, 

Jungshik

update_engine-0.0.2-r1561: [1/4] CXX obj/update_engine/libupdate_engine.update_attempter.o
update_engine-0.0.2-r1561: [1/4] CXX obj/update_engine/libupdate_engine.update_attempter.o
update_engine-0.0.2-r1561: FAILED: x86_64-pc-linux-gnu-g++ -MMD -MF obj/update_engine/libupdate_engine.update_attempter.o.d -D_POSIX_C_SOURCE=199309L -DUSE_HWID_OVERRIDE=0 -DUSE_MTD=0 -DUSE_POWER_MANAGEMENT=0 -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Iobj/update_engine/libupdate_engine.gen/include -Igen/include -I../../../../../../../mnt/host/source/src/platform2 -I../../../../../../../mnt/host/source/src/platform -g -ffunction-sections -Wall -Wextra -Werror -Wno-unused-parameter -Wno-deprecated-register -Wall -Wno-psabi -ggdb3 -fstack-protector-strong -Wformat=2 -fvisibility=internal -Wa,--noexecstack -Werror -DDBUS_API_SUBJECT_TO_CHANGE -pthread -Wno-c++11-extensions -Wno-unused-local-typedefs -DBASE_VER=323904 -pthread -I/usr/include/dbus-c++-1 -I/usr/include/dbus-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/base-323904 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/nss -I/usr/include/nspr -fPIE -fno-strict-aliasing -Wnon-virtual-dtor -std=gnu++11 -DVCSID='"0.0.2-r1561-17243f973b9058a985bfe754f4603f9ecf5778f1"' -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -pipe -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables  -c ../../../../../../../mnt/host/source/src/platform2/update_engine/update_attempter.cc -o obj/update_engine/libupdate_engine.update_attempter.o
update_engine-0.0.2-r1561: ../../../../../../../mnt/host/source/src/platform2/update_engine/update_attempter.cc: In member function 'virtual bool chromeos_update_engine::UpdateAttempter::IsAnyUpdateSourceAllowed()':
update_engine-0.0.2-r1561: ../../../../../../../mnt/host/source/src/platform2/update_engine/update_attempter.cc:1664:23: error: 'DEV_FEATURES_DISABLED' is not a member of 'debugd'
update_engine-0.0.2-r1561:    gint dev_features = debugd::DEV_FEATURES_DISABLED;
update_engine-0.0.2-r1561:                        ^
update_engine-0.0.2-r1561: ../../../../../../../mnt/host/source/src/platform2/update_engine/update_attempter.cc:1672:7: error: 'kQueryDevFeatures' is not a member of 'debugd'
update_engine-0.0.2-r1561:        debugd::kQueryDevFeatures,
update_engine-0.0.2-r1561:        ^
update_engine-0.0.2-r1561: ../../../../../../../mnt/host/source/src/platform2/update_engine/update_attempter.cc:1679:35: error: 'DEV_FEATURES_DISABLED' is not a member of 'debugd'
update_engine-0.0.2-r1561:    if (success && !(dev_features & debugd::DEV_FEATURES_DISABLED)) {
update_engine-0.0.2-r1561:                                    ^
update_engine-0.0.2-r1561: At global scope:
update_engine-0.0.2-r1561: cc1plus: error: unrecognized command line option "-Wno-c++11-extensions" [-Werror]
update_engine-0.0.2-r1561: cc1plus: error: unrecognized command line option "-Wno-deprecated-register" [-Werror]
update_engine-0.0.2-r1561: cc1plus: all warnings being treated as errors
update_engine-0.0.2-r1561: ninja: build stopped: subcommand failed.
update_engine-0.0.2-r1561: Traceback (most recent call last):
update_engine-0.0.2-r1561:   File "/home/jungshik/trunk/src/platform2/common-mk/platform2.py", line 328, in <module>
update_engine-0.0.2-r1561:     main(sys.argv[1:])
update_engine-0.0.2-r1561:   File "/home/jungshik/trunk/src/platform2/common-mk/platform2.py", line 324, in main
update_engine-0.0.2-r1561:     getattr(p2, options.action)(options.args)
update_engine-0.0.2-r1561:   File "/home/jungshik/trunk/src/platform2/common-mk/platform2.py", line 265, in compile
update_engine-0.0.2-r1561:     % ' '.join(map(repr, ninja_args)))
update_engine-0.0.2-r1561: AssertionError: Error running: 'ninja' '-C' '/var/cache/portage/chromeos-base/update_engine/out/Default' '-j' '16' 'all'
update_engine-0.0.2-r1561:  * ERROR: chromeos-base/update_engine-0.0.2-r1561::chromiumos failed (compile phase):
update_engine-0.0.2-r1561:  *   (no error message)
update_engine-0.0.2-r1561:  * 
update_engine-0.0.2-r1561:  * Call stack:
update_engine-0.0.2-r1561:  *     ebuild.sh, line   93:  Called src_compile
update_engine-0.0.2-r1561:  *   environment, line 3474:  Called platform_src_compile
update_engine-0.0.2-r1561:  *   environment, line 3074:  Called platform 'compile' 'all'
update_engine-0.0.2-r1561:  *   environment, line 3032:  Called die
update_engine-0.0.2-r1561:  * The specific snippet of code:
update_engine-0.0.2-r1561:  *       "${cmd[@]}" || die
update_engine-0.0.2-r1561:  * 
update_engine-0.0.2-r1561:  * If you need support, post the output of `emerge --info '=chromeos-base/update_engine-0.0.2-r1561::chromiumos'`,
update_engine-0.0.2-r1561:  * the complete build log and the output of `emerge -pqv '=chromeos-base/update_engine-0.0.2-r1561::chromiumos'`.
update_engine-0.0.2-r1561:  * The complete build log is located at '/var/log/portage/chromeos-base:update_engine-0.0.2-r1561:20150513-173505.log'.
update_engine-0.0.2-r1561:  * For convenience, a symlink to the build log is located at '/var/tmp/portage/chromeos-base/update_engine-0.0.2-r1561/temp/build.log'.
update_engine-0.0.2-r1561:  * The ebuild environment file is located at '/var/tmp/portage/chromeos-base/update_engine-0.0.2-r1561/temp/environment'.
update_engine-0.0.2-r1561:  * Working directory: '/home/jungshik/trunk/src/platform2/update_engine'
update_engine-0.0.2-r1561:  * S: '/home/jungshik/trunk/src/platform2/update_engine'
update_engine-0.0.2-r1561: >>> Failed to emerge chromeos-base/update_engine-0.0.2-r1561, Log file:
update_engine-0.0.2-r1561: >>>  '/var/log/portage/chromeos-base:update_engine-0.0.2-r1561:20150513-173505.log'
update_engine-0.0.2-r1561: 
update_engine-0.0.2-r1561:  * Messages for package chromeos-base/update_engine-0.0.2-r1561:
update_engine-0.0.2-r1561: 
update_engine-0.0.2-r1561:  * ERROR: chromeos-base/update_engine-0.0.2-r1561::chromiumos failed (compile phase):
update_engine-0.0.2-r1561:  *   (no error message)
update_engine-0.0.2-r1561:  * 
update_engine-0.0.2-r1561:  * Call stack:
update_engine-0.0.2-r1561:  *     ebuild.sh, line   93:  Called src_compile
update_engine-0.0.2-r1561:  *   environment, line 3474:  Called platform_src_compile
update_engine-0.0.2-r1561:  *   environment, line 3074:  Called platform 'compile' 'all'
update_engine-0.0.2-r1561:  *   environment, line 3032:  Called die
update_engine-0.0.2-r1561:  * The specific snippet of code:
update_engine-0.0.2-r1561:  *       "${cmd[@]}" || die
update_engine-0.0.2-r1561:  * 
update_engine-0.0.2-r1561:  * If you need support, post the output of `emerge --info '=chromeos-base/update_engine-0.0.2-r1561::chromiumos'`,
update_engine-0.0.2-r1561:  * the complete build log and the output of `emerge -pqv '=chromeos-base/update_engine-0.0.2-r1561::chromiumos'`.
update_engine-0.0.2-r1561:  * The complete build log is located at '/var/log/portage/chromeos-base:update_engine-0.0.2-r1561:20150513-173505.log'.
update_engine-0.0.2-r1561:  * For convenience, a symlink to the build log is located at '/var/tmp/portage/chromeos-base/update_engine-0.0.2-r1561/temp/build.log'.
update_engine-0.0.2-r1561:  * The ebuild environment file is located at '/var/tmp/portage/chromeos-base/update_engine-0.0.2-r1561/temp/environment'.
update_engine-0.0.2-r1561:  * Working directory: '/home/jungshik/trunk/src/platform2/update_engine'
update_engine-0.0.2-r1561:  * S: '/home/jungshik/trunk/src/platform2/update_engine'
=== Complete: job update_engine-0.0.2-r1561 (0m6.0s) ===
Failed chromeos-base/update_engine-0.0.2-r1561 (in 0m6.0s). Your build has failed.
Pending 1/7, [Time 4m18.4s Load 6.75 5.71 5.99]
ERROR   : Fatal: failed to upgrade 116!
ERROR   : Wed May 13 10:35:12 PDT 2015
ERROR   : script called:  (args unknown, no debug available)
ERROR   : Backtrace:  (most recent call is last)
ERROR   :  update_chroot:47:main(), called: die_err_trap  
ERROR   : 
ERROR   : Command failed:
ERROR   :   Command '${SCRIPTS_DIR}/run_chroot_version_hooks' exited with nonzero code: 1
ERROR   :   (Note bash sometimes misreports "command not found" as exit code 1 instead of 127)

Alex Vakulenko

unread,
May 13, 2015, 3:26:35 PM5/13/15
to Jungshik Shin (신정식, 申政湜), Chromium OS dev
Those constants come from system_api.h which is a part of separate ebuild (no relation to update_engine or debugd packages) - "chromeos-base/system_api".

And those C++11 errors are "normal" side-effects for the other error. They are also emitted when some other build error occurs.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Jungshik Shin (신정식, 申政湜)

unread,
May 13, 2015, 4:42:13 PM5/13/15
to Alex Vakulenko, Chromium OS dev
Thank you, Alex, for the pointer. 

I tracked it down to /build/x86-alex/usr/include/chromeos/dbus/service_constants.h, which is rather outdated (compared with platform/system_api/dbus/service_constants.h) and does not have two symbols the compiler complains about. Perhaps, I'll just have to nuke the  /build/x86-alex and run 'setup_board' afresh ('setup_board' failed at 'update_chroot' step, too).

Jungshik 


Chirantan Ekbote

unread,
May 13, 2015, 5:19:14 PM5/13/15
to Jungshik Shin (신정식, 申政湜), Alex Vakulenko, Chromium OS dev
I don't think that's necessary. You should just be able to run
'emerge chromeos-base/system_api' to get the latest version of that
header. This will emerge it in your host chroot and not for any
particular board.

On Wed, May 13, 2015 at 1:42 PM, Jungshik Shin (신정식, 申政湜)

Jungshik Shin (신정식, 申政湜)

unread,
May 13, 2015, 5:35:29 PM5/13/15
to Chirantan Ekbote, Alex Vakulenko, Chromium OS dev
2015-05-13 14:19 GMT-07:00 Chirantan Ekbote <chir...@chromium.org>:
I don't think that's necessary.  You should just be able to run
'emerge chromeos-base/system_api' to get the latest version of that
header.  This will emerge it in your host chroot and not for any
particular board.

Thank you for the help. 

Yes, it occurred to me, too.  So, I tried it before resorting to nuking /build/x86-alex.  Unfortunately, 'emerge chromeos-base/system_api' failed due to protobuf incompatibility.   Perhaps, I could have emerged dev-libs/protobuf*, but it didn't occur to me that I could do that and I gave up tracking down further. 

'setup_board' also failed when running 'update_chroot', but it apparently updated 'dev-libs/protobuf*' and 'emerge chromeos-base/sysetem_api' succeeded after that. Now I'm running 'setup_board' again and it went past 'update_chroot' stage. So, I'm keeping my fingers crossed :-) 

Jungshik  

Marc Herbert

unread,
May 18, 2015, 3:13:08 PM5/18/15
to chromiu...@chromium.org, avaku...@google.com, chir...@chromium.org
On Wednesday, 13 May 2015 14:35:29 UTC-7, 신정식, 申政湜 Jungshik Shin wrote:
2015-05-13 14:19 GMT-07:00 Chirantan Ekbote <chir...@chromium.org>:
I don't think that's necessary.  You should just be able to run
'emerge chromeos-base/system_api' to get the latest version of that
header.  This will emerge it in your host chroot and not for any
particular board.

Yes, it occurred to me, too.  So, I tried it before resorting to nuking /build/x86-alex.  Unfortunately, 'emerge chromeos-base/system_api' failed due to protobuf incompatibility.   Perhaps, I could have emerged dev-libs/protobuf*, but...


emerge dev-libs/protobuf seems to have worked for me; thanks (I'll probably re-init everything from scratch later when I'll have more time to be on the safe side...)


Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages