Closed Bug 1101070 Opened 6 years ago Closed 6 years ago
Compile error on OSX: "Undefined symbols for architecture x86
_64: _replace _get _bridge"
This morning after updating I can't build anymore. Here is the error I see: 26:59.84 Undefined symbols for architecture x86_64: 26:59.84 "_replace_get_bridge", referenced from: 26:59.84 _get_bridge in replace_malloc.o 26:59.84 ld: symbol(s) not found for architecture x86_64 26:59.84 clang: error: linker command failed with exit code 1 (use -v to see invocation) 26:59.85 make: *** [libmozglue.dylib] Error 1 26:59.85 make: *** [mozglue/build/target] Error 2 26:59.85 make: *** Waiting for unfinished jobs....
System details: OSX 10.8.5 > clang -v Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin12.5.0 Thread model: posix
I see this with the current inbound tree too. MacOS X 10.8.5, Xcode 5.1.
Seems likely a regression from bug 818922, which added "get_bridge" and "struct ReplaceMallocBridge" in this cset: http://hg.mozilla.org/integration/mozilla-inbound/diff/bd1cbced0ccb/memory/build/malloc_decls.h
Product: Firefox → Core
This is also affecting my build; Mac OS X 10.9.5, Xcode 6.1. $ clang -v Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) Target: x86_64-apple-darwin13.4.0 Thread model: posix Bisecting confirmed that it's triggered by bug 818922.
As a workaround, I've added ac_add_options --disable-replace-malloc to my mozconfig, and this allows the build to succeed.
Bug 818922 added a new replace-malloc symbol that the OSX linker tricks need to know about.
Attachment #8524927 - Flags: review?(khuey)
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Comment on attachment 8524927 [details] [diff] [review] Add missing OSX build flag for the new replace-malloc symbol Review of attachment 8524927 [details] [diff] [review]: ----------------------------------------------------------------- Stealing review, because this is trivial. Have you grepped for other replace_* occurrences where you might have forgotten to add replace_get_bridge?
Attachment #8524927 - Flags: review?(khuey) → review+
Attachment #8524927 - Flags: review+
(In reply to Jonathan Kew (:jfkthame) from comment #5) > As a workaround, I've added > > ac_add_options --disable-replace-malloc > > to my mozconfig, and this allows the build to succeed. Thanks, that worked for me. <off-topic> I learned about the workaround by scanning dev-b2g and dev-platform and seeing nothing, Googling for _replace_get_bridge and getting no hits, and then searching Bugzilla and coming here. My next stop would have been IRC. Just out of curiosity, was there a public announcement that building was broken on the Mac? Is there an established channel for disseminating information such as this? </off-topic>
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.