Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 338062

Summary: www-client/chromium-6.0.472.59 fails to compile/link on x86 (other than i386)
Product: Gentoo Linux Reporter: David W Noon <david.w.noon>
Component: New packagesAssignee: Chromium Project <chromium>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: High    
Version: 2008.0   
Hardware: x86   
OS: Linux   
URL: http://code.google.com/p/chromium/issues/detail?id=56210
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info details
ebuild log (zipped)

Description David W Noon 2010-09-19 18:16:13 UTC
Some of the compilation commands have CFLAGS/CXXFLAGS missing, with the result that linkage fails with a missing external symbol '__sync_fetch_and_add_4'.  In particular, the -march option is missing, which causes GCC to "downgrade" to using 80386 instructions, which do  not include "atomic" instructions; this means that atomic operations have to be performed under a bus lock.

Note that this is not as big a problem on AMD64 processors, as even the earliest of that architecture have atomic instructions as standard.

emerge --info and the ebuild log will follow shortly, as attachments.
Comment 1 David W Noon 2010-09-19 18:17:11 UTC
Created attachment 248018 [details]
emerge --info details
Comment 2 David W Noon 2010-09-19 18:21:38 UTC
Created attachment 248020 [details]
ebuild log (zipped)
Comment 3 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-09-19 19:49:40 UTC
Oh, I see. third_party/protobuf2 seems to not respect user's CFLAGS. Could you file an upstream bug (http://new.crbug.com) and post the link here?

For reference the final error message is:

out/Release/obj.host/protoc/third_party/protobuf2/src/src/google/protobuf/compiler/code_generator.o: In function `google::protobuf::compiler::ParseGeneratorParameter(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >*)':
code_generator.cc:(.text._ZN6google8protobuf8compiler23ParseGeneratorParameterERKSsPSt6vectorISt4pairISsSsESaIS6_EE+0x25f): undefined reference to `__sync_fetch_and_add_4'
out/Release/obj.host/protoc/third_party/protobuf2/src/src/google/protobuf/compiler/code_generator.o:code_generator.cc:(.text._ZN6google8protobuf8compiler23ParseGeneratorParameterERKSsPSt6vectorISt4pairISsSsESaIS6_EE+0x29c): more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
Comment 4 David W Noon 2010-09-19 20:43:51 UTC
The upstream report is:

http://code.google.com/p/chromium/issues/detail?id=56210