chromeos-cheets-scripts UnitTest fails with libc++ |
||||||||
Issue descriptionhttps://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/llvm_toolchain/builds/440 https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/llvm_toolchain/builds/443 Build fails because of missing symbols. chromeos-cheets-scripts-0.0.1-r399: protoc --cpp_out=. --proto_path=/build/eve/usr/include/chromeos/dbus/cryptohome /build/eve/usr/include/chromeos/dbus/cryptohome/rpc.proto /build/eve/usr/include/chromeos/dbus/cryptohome/key.proto /build/eve/usr/include/chromeos/dbus/cryptohome/signed_secret.proto chromeos-cheets-scripts-0.0.1-r399: generate-chromeos-dbus-bindings boot_lockbox_dbus.xml \ chromeos-cheets-scripts-0.0.1-r399: --proxy=boot_lockbox_dbus.h chromeos-cheets-scripts-0.0.1-r399: protoc: symbol lookup error: /usr/lib64/libprotoc.so.13: undefined symbol: _ZN6google8protobuf13StringAppendFEPSsPKcz chromeos-cheets-scripts-0.0.1-r399: generate-chromeos-dbus-bindings: symbol lookup error: generate-chromeos-dbus-bindings: undefined symbol: _ZN4base15DictionaryValue33GetDictionaryWithoutPathExpansionERKSsPPS0_ chromeos-cheets-scripts-0.0.1-r399: make[1]: *** [/build/eve/tmp/portage/chromeos-base/chromeos-cheets-scripts-0.0.1-r399/work/chromeos-cheets-scripts-0.0.1/arc-setup/Makefile:28: generate_dbus_proto] Error 127 The symbols are missing because the build uses host protoc and generate-chromeos-dbus-bindings binaries which are built with libstdc++. Since the target is compiled with libc++, it can't find the symbols because of ABI mismatch. Solutions: 1. Install protoc binary ( dev-libs/protobuf) and generate-chromeos-dbus-bindings binaries (chromeos-base/chromeos-dbus-bindings) in target and use them. Note: There might be an easier solution since rest of platform code uses protobuf but does not suffer from this problem. OR 2. Build full system i.e. host + target with libc++.
,
Oct 31 2017
,
Oct 31 2017
The rest of the platform code uses gyp instead of Make, so maybe that's what enables the other platform2 projects to use protoc. That might be another alternative.
,
Oct 31 2017
i don't think that's the reason for the error. protoc/generate-chromeos-dbus-bindings are build time tools that we install in SDK. we don't install them into the target board and we don't want to execute out of that.
,
Oct 31 2017
The binary is indeed in the host but the target has the same shared libraries as the host installed as well. Therefore when executing in the target build directory, the binary picks the target libraries instead of the host and fails.
i.e. $ protoc works (Uses libraries from host)
$ LD_LIBRARY_PATH=/build/$BOARD/usr/lib64 protoc fails because of mismatched symbols.
,
Oct 31 2017
we don't execute build time programs "in the target build directory". no build should be setting LD_LIBRARY_PATH either. there is a bashrc hack, but only for the src_test phase. https://chromium-review.googlesource.com/212784 the logs aren't loading there, so i can't check it further.
,
Oct 31 2017
So IIUC, cheets-scripts should call protoc/generate-chromeos-dbus-bindings more carefully i.e. without setting LD_LIBRARY_PATH etc.
,
Nov 7 2017
,
Nov 7 2017
cheets-scripts isn't setting LD_LIBRARY_PATH, the ebuild env hacks are i talked with Xiaoyong while he was in town and suggested a few routes: (1) fix the Makefile to not use dummy targets (look at chaps/Makefile as an example). those are causing the generated protobuf files to be regenerated & recompiled all the time. if that was fixed, then this issue would just go away as we wouldn't be running the tool in the first place during src_test. (2) split the massive cheets ebuild up into multiple ebuilds. it's currently doing a lot of unrelated things (compiling daemons, hacking squashfs files, installing init scripts, etc...). (3) stop using custom Makefiles and convert to platform2 gyp files. this would take care of a lot of things for you (like target management, build tests during src_compile, and executing tests in the target sysroot). (4) move the code to the public platform2 to make it easier to re-use. i think in the end he was interested in only doing (1) ;).
,
Nov 7 2017
Thanks Mike for the update :-).
,
Dec 6 2017
Bump to P1 since we want to migrate to libc++ soon. xzhou@ Can you take a look at this?
,
Dec 6 2017
The proto files are not used for production right now. I didn't delete the files because xzhou@'s plan was to start using it soon in M65, but if this libc++ bug is urgent, one thing we could easily do for now is to stop building the proto files.
,
Dec 6 2017
,
Dec 6 2017
@manojgupta I just talked with Luis and Yusukes, and it seems that moving to gyp is a better solution. I am not quite familiar with gyp. So it may take ~2 days, is this ok for you?
,
Dec 6 2017
Yes, that's fine.
,
Dec 7 2017
I have change the make file to gyy at: https://chrome-internal-review.googlesource.com/c/chromeos/cheets-scripts/+/523179 But I am not sure how to change the ebuild file to use the gyp. Currently, ebuild calls emake at: https://cs.corp.google.com/chromeos_internal/src/private-overlays/project-cheets-private/chromeos-base/chromeos-cheets-scripts/chromeos-cheets-scripts-9999.ebuild?rcl=f135d3f09501251b626af8d7ebe24afa2eb6c1cf&l=240 Thanks a lot.
,
Dec 8 2017
Discussed with hidehiko@ who is moving the spliting arc-setup and move it to platform2. It make more sense to apply http://crrev.com/i/523179 on top his CL once I receive it.
,
Dec 12 2017
CL: https://canary-chrome-internal-review.googlesource.com/c/chromeos/cheets-scripts/+/525899 should address this problem.
,
Dec 13 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/cheets-scripts/+/e14a4e94e80b3ded6223b43cef01fb1d87109023 commit e14a4e94e80b3ded6223b43cef01fb1d87109023 Author: Hidehiko Abe <hidehiko@chromium.org> Date: Wed Dec 13 20:33:34 2017
,
Dec 14 2017
i believe this should be all set now by virtue of using platform2
,
Dec 14 2017
C#19 solved the problem by removing calls to protoc in Makefile. There will be more CLs coming to separate arc-setup and move arc-setup to platform2.
,
Dec 18 2017
Thanks for fixing this. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by yusukes@chromium.org
, Oct 31 2017