|
|
DescriptionFix "undefined reference to '__atomic_is_lock_free'" errors with gyp
BUG=546019
Patch Set 1 #
Messages
Total messages: 13 (2 generated)
Description was changed from ========== Fix "undefined reference to '__atomic_is_lock_free'" errors with gyp BUG=546019 ========== to ========== Fix "undefined reference to '__atomic_is_lock_free'" errors with gyp BUG=546019 ==========
yang.gu@intel.com changed reviewers: + agoode@chromium.org, bcwhite@chromium.org, thakis@chromium.org
On 2016/03/29 09:34:07, Yang Gu wrote: > mailto:yang.gu@intel.com changed reviewers: > + mailto:agoode@chromium.org, mailto:bcwhite@chromium.org, mailto:thakis@chromium.org Is a way to detect the presence of libatomic.a and set the flag based on that?
On 2016/03/29 12:14:45, bcwhite wrote: > On 2016/03/29 09:34:07, Yang Gu wrote: > > mailto:yang.gu@intel.com changed reviewers: > > + mailto:agoode@chromium.org, mailto:bcwhite@chromium.org, > mailto:thakis@chromium.org > > Is a way to detect the presence of libatomic.a and set the flag based on that? Here is what LLVM does with cmake: https://github.com/llvm-mirror/llvm/blob/master/cmake/modules/CheckAtomic.cmake But I don't think we really do that kind of probing in the Chrome buildsystem, correct?
I couldn't find such kind of probing in Chrome. Maybe gyp and gn have the capability to do so, but it's complicated. I know gn uses sysroot at build/linux/debian_wheezy_amd64-sysroot, but what's the sysroot for gyp? Can we add libatomic.so there to make this change safe? Even without sysroot, I think most systems can install package that contains libatomic.so easily (for Ubuntu, it's libatomic1-). I tried a build on my Ubuntu 15.10, and after my change, it will link against /usr/lib/gcc/x86_64-linux-gnu/5.2.1/libatomic.so, which is a symbolic link to /usr/lib/x86_64-linux-gnu/libatomic.so.1 (another symbolic link to libatomic.so.1.1.0).
I dig more and now am clear on the root cause. For gn build, both sysroot for android and linux are defined (see build/config/sysroot.gni), but for gyp build, only sysroot for linux is defined (see build/common.gypi). That's the reason why gn build is ok, but the gyp fails. Is there any specific reason for this? If no, I will patch common.gypi to add sysroot for Android similar to gn.
On 2016/03/30 09:17:09, Yang Gu wrote: > I dig more and now am clear on the root cause. For gn build, both sysroot for > android and linux are defined (see build/config/sysroot.gni), but for gyp build, > only sysroot for linux is defined (see build/common.gypi). That's the reason why > gn build is ok, but the gyp fails. > Is there any specific reason for this? If no, I will patch common.gypi to add > sysroot for Android similar to gn. Could this also be the cause of a crash I'm seeing on ios_dbg_simulator_ninja with atomics? https://codereview.chromium.org/1803253002/ ios_rel_device_ninja, ios_rel_device_gn, and ios_dbg_simulator_gn all work fine.
On 2016/03/30 09:17:09, Yang Gu wrote: > I dig more and now am clear on the root cause. For gn build, both sysroot for > android and linux are defined (see build/config/sysroot.gni), but for gyp build, > only sysroot for linux is defined (see build/common.gypi). That's the reason why > gn build is ok, but the gyp fails. > Is there any specific reason for this? If no, I will patch common.gypi to add > sysroot for Android similar to gn. https://www.chromium.org/developers/how-tos/android-build-instructions#TOC-Co... says Android + GYP is deprecated. Maybe that's why it is no longer working for you?
Some more findings: 1. With gyp build, android feeds --sysroot with android_ndk_sysroot. But during android module build, it also needs to build some toolsets on host (such as md5sum_bin_host). It seems these host toolsets build don't have correct sysroot (different with android_ndk_sysroot) assigned. 2. With gn build, I found it did assign sysroot for host toolset as --sysroot=../../build/linux/debian_wheezy_i386-sysroot. Should here be debian_wheezy_amd64-sysroot instead of 32-bit sysroot as my host machine is 64-bit? I'm working on the patch, but met some problems. I will update here after someone can confirm my analysis above.
On 2016/03/31 12:16:37, Yang Gu wrote: > Some more findings: > 1. With gyp build, android feeds --sysroot with android_ndk_sysroot. But during > android module build, it also needs to build some toolsets on host (such as > md5sum_bin_host). It seems these host toolsets build don't have correct sysroot > (different with android_ndk_sysroot) assigned. > 2. With gn build, I found it did assign sysroot for host toolset as > --sysroot=../../build/linux/debian_wheezy_i386-sysroot. Should here be > debian_wheezy_amd64-sysroot instead of 32-bit sysroot as my host machine is > 64-bit? 2 is probably an accident. Using the 64-bit sysroot for host builds sounds like the correct thing to me. I agree that the gyp build isn't very important anymore for Android.
I couldn't build with gn for 64-bit Android chrome public, and met the issue described at https://bugs.chromium.org/p/chromium/issues/detail?id=539781#c21. For the 2nd issue, it seems 32-bit sysroot is used to build v8_base and icu related things (others are using 64-bit sysroot). Is this on purpose or a bug? For examples: [600/19996] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF clang_x86/obj/v8/v8_base/frames.o.d -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_OPENSSL=1 -DUSE_NSS_CERTS=1 -DUSE_NSS_VERIFIER=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_TOPCHROME_MD=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=264334-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_SHARED -DBUILDING_V8_SHARED -DV8_I18N_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_TARGET_ARCH_IA32 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -I../.. -Iclang_x86/gen -I../../v8 -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -fcolor-diagnostics -fdebug-prefix-map=/workspace/project/chromium/src=. -pthread -m32 -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -g1 --sysroot=../../build/linux/debian_wheezy_i386-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Wheader-hygiene -Wstring-conversion -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -O2 -fno-ident -fdata-sections -ffunction-sections -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -Wno-deprecated -c ../../v8/src/frames.cc -o clang_x86/obj/v8/v8_base/frames.o [919/19996] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF clang_x86/obj/third_party/icu/icui18n/astro.o.d -DU_I18N_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_OPENSSL=1 -DUSE_NSS_CERTS=1 -DUSE_NSS_VERIFIER=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_TOPCHROME_MD=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=264334-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DHAVE_DLOPEN=0 -DUCONFIG_ONLY_HTML_CONVERSION=1 -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -I../.. -Iclang_x86/gen -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -Wno-deprecated-declarations -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -fcolor-diagnostics -fdebug-prefix-map=/workspace/project/chromium/src=. -pthread -m32 -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -O2 -fno-ident -fdata-sections -ffunction-sections -g1 --sysroot=../../build/linux/debian_wheezy_i386-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Wheader-hygiene -Wstring-conversion -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-deprecated-declarations -Wno-unused-function -Wno-deprecated-declarations -Wno-logical-op-parentheses -Wno-tautological-compare -Wno-switch -Wno-parentheses -Wno-unused-const-variable -Wno-unused-function -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-exceptions -Wno-deprecated -c ../../third_party/icu/source/i18n/astro.cpp -o clang_x86/obj/third_party/icu/icui18n/astro.o
On 2016/04/06 06:17:31, Yang Gu wrote: > I couldn't build with gn for 64-bit Android chrome public, and met the issue > described at https://bugs.chromium.org/p/chromium/issues/detail?id=539781#c21. > > For the 2nd issue, it seems 32-bit sysroot is used to build v8_base and icu > related things (others are using 64-bit sysroot). Is this on purpose or a bug? > > For examples: > > [600/19996] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF > clang_x86/obj/v8/v8_base/frames.o.d -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE > -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS > -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 > -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 > -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 > -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 > -DUSE_GLIB=1 -DUSE_OPENSSL=1 -DUSE_NSS_CERTS=1 -DUSE_NSS_VERIFIER=1 -DUSE_X11=1 > -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 > -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 > -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 > -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_TOPCHROME_MD=1 > -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL > -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED > -DCR_CLANG_REVISION=264334-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -D_LARGEFILE64_SOURCE -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND > -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_SHARED -DBUILDING_V8_SHARED > -DV8_I18N_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA > -DV8_TARGET_ARCH_IA32 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 > -DU_NOEXCEPT= -I../.. -Iclang_x86/gen -I../../v8 > -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n > -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables > -fPIC -pipe -fcolor-diagnostics > -fdebug-prefix-map=/workspace/project/chromium/src=. -pthread -m32 > -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -g1 > --sysroot=../../build/linux/debian_wheezy_i386-sysroot -fvisibility=hidden > -Xclang -load -Xclang > ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang > -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs > -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang > follow-macro-expansion -Wheader-hygiene -Wstring-conversion -Werror -Wall > -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter > -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register > -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override > -Wno-shift-negative-value -O2 -fno-ident -fdata-sections -ffunction-sections > -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti > -fno-exceptions -Wno-deprecated -c ../../v8/src/frames.cc -o > clang_x86/obj/v8/v8_base/frames.o > > [919/19996] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF > clang_x86/obj/third_party/icu/icui18n/astro.o.d -DU_I18N_IMPLEMENTATION > -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS > -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 > -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 > -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 > -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 > -DUSE_GLIB=1 -DUSE_OPENSSL=1 -DUSE_NSS_CERTS=1 -DUSE_NSS_VERIFIER=1 -DUSE_X11=1 > -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 > -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 > -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 > -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_TOPCHROME_MD=1 > -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL > -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED > -DCR_CLANG_REVISION=264334-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -D_LARGEFILE64_SOURCE -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND > -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DHAVE_DLOPEN=0 -DUCONFIG_ONLY_HTML_CONVERSION=1 > -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 > -DU_NOEXCEPT= -I../.. -Iclang_x86/gen -I../../third_party/icu/source/common > -I../../third_party/icu/source/i18n -Wno-deprecated-declarations > -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables > -fPIC -pipe -fcolor-diagnostics > -fdebug-prefix-map=/workspace/project/chromium/src=. -pthread -m32 > -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -O2 -fno-ident > -fdata-sections -ffunction-sections -g1 > --sysroot=../../build/linux/debian_wheezy_i386-sysroot -fvisibility=hidden > -Xclang -load -Xclang > ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang > -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs > -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang > follow-macro-expansion -Wheader-hygiene -Wstring-conversion -Werror -Wall > -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter > -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register > -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override > -Wno-shift-negative-value -Wno-deprecated-declarations -Wno-unused-function > -Wno-deprecated-declarations -Wno-logical-op-parentheses > -Wno-tautological-compare -Wno-switch -Wno-parentheses > -Wno-unused-const-variable -Wno-unused-function -fno-threadsafe-statics > -fvisibility-inlines-hidden -std=gnu++11 -fno-exceptions -Wno-deprecated -c > ../../third_party/icu/source/i18n/astro.cpp -o > clang_x86/obj/third_party/icu/icui18n/astro.o Should this CL be closed/deleted?
Message was sent while issue was closed.
As gyp support is going to be obselete, so just close this. |