Gigacage and DebugHeap compilation unit names clash with corresponding WTF names Causes link-time warnings CompileC WTFAssertions.o CompileC WTFConfig.o CompileC WTFString.o Libtool libWTF /Volumes/.../usr/bin/libtool: warning same member name (DebugHeap.o) in output file used for input files: /Users/kkinnunen/Build/WTF.build/Debug/WTF.build/Objects-normal/x86_64/DebugHeap.o and: /Users/kkinnunen/Build/Debug/libbmalloc.a(DebugHeap.o) due to use of basename, truncation and blank padding /Volumes/.../usr/bin/libtool: warning same member name (Gigacage.o) in output file used for input files: /Users/kkinnunen/Build/Debug/libbmalloc.a(Gigacage.o) and: /Users/kkinnunen/Build/WTF.build/Debug/WTF.build/Objects-normal/x86_64/Gigacage.o (due to use of basename, truncation, blank padding or duplicate input files) Build Succeeded Current settings: Configuration:Debug Arch:x86_64 === BUILD TARGET TestWTF OF PROJECT TestWebKitAPI WITH CONFIGURATION Debug === Check dependencies CompileC mainMac.o Ld TestWTF ... GenerateDSYMFile TestWTF.dSYM warning: (x86_64) could not find object file symbol for symbol __ZN7bmalloc9DebugHeapC2ERKNSt3__111scoped_lockIJNS_5MutexEEEE warning: (x86_64) could not find object file symbol for symbol __ZNSt3__113unordered_mapIPvmNS_4hashIS1_EENS_8equal_toIS1_EENS_9allocatorINS_4pairIKS1_mEEEEEC1Ev warning: (x86_64) could not find object file symbol for symbol __ZN7bmalloc9DebugHeapC1ERKNSt3__111scoped_lockIJNS_5MutexEEEE warning: (x86_64) could not find object file symbol for symbol __ZN7bmalloc9DebugHeap6mallocEmNS_13FailureActionE warning: (x86_64) could not find object file symbol for symbol __ZN7bmalloc9DebugHeap8memalignEmmNS_13FailureActionE warning: (x86_64) could not find object file symbol for symbol __ZN7bmalloc9DebugHeap7reallocEPvmNS_13FailureActionE
Created attachment 426663 [details] Patch
Comment on attachment 426663 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426663&action=review > Source/bmalloc/ChangeLog:8 > + Rename DebugHeap.cpp, Gigacage.cpp with B prefix to avoid clashing with WTF compilation units. Is there no way to fix this without renaming? It seems impractical to change bmalloc whenever any client uses the same file name.
I think one alternative is to encode the project name in the .o file, but I couldn't find Xcode options for that. E.g Compiling DebugHeap.cpp would produce libbmalloc-DebugHeap.o. As in: https://bugs.chromium.org/p/webrtc/issues/detail?id=6418
Comment on attachment 426663 [details] Patch r=me
*** This bug has been marked as a duplicate of bug 175997 ***