[lldb-dev] issue with building lldb on snowleopard by Xcode 4.2

Hank Bao hankbao84 at gmail.com
Wed Jan 4 02:56:03 PST 2012


Dear all,
I am trying to build latest lldb from svn. After created the lldb_codesign
certificate following code-signing.txt, I built lldb on lion by Xcode 4.2.1
with no problem. But when I try to build it on a Mac which running snow
leopard (10.6.8) by Xcode 4.2, building failed with an error in lldb-platform:

Ld /Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/lldb-platform
normal x86_64
    cd /Users/test123/tmp/lldb
    /Developer/usr/bin/clang++ -arch x86_64
-L/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug
-L/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64
-F/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug
-F/System/Library/PrivateFrameworks -filelist
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Intermediates/lldb.build/Debug/lldb-platform.build/Objects-normal/x86_64/lldb-platform.LinkFileList
-dead_strip -lllvmclang -lpython -framework DebugSymbols -framework
Carbon -framework Foundation -framework AppKit -v -t -Wl,-v
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a
-framework CoreFoundation -lobjc -o
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/lldb-platform

Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
 "/Developer/usr/bin/ld" -demangle -dynamic -arch x86_64 -dead_strip
-macosx_version_min 10.6.8 -t -o
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/lldb-platform
-lcrt1.10.6.o -L/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug
-L/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64 -filelist
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Intermediates/lldb.build/Debug/lldb-platform.build/Objects-normal/x86_64/lldb-platform.LinkFileList
-lllvmclang -lpython -framework DebugSymbols -framework Carbon
-framework Foundation -framework AppKit -v
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a
-framework CoreFoundation -lobjc /usr/lib/libstdc++.6.dylib -lSystem
/Developer/usr/bin/../lib/clang/3.0/lib/darwin/libclang_rt.osx.a
-F/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug
-F/System/Library/PrivateFrameworks
@(#)PROGRAM:ld  PROJECT:ld64-127.2
Library search paths:
	/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug
	/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug
	/System/Library/PrivateFrameworks
	/Library/Frameworks/
	/System/Library/Frameworks/
/usr/lib/crt1.10.6.o
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Intermediates/lldb.build/Debug/lldb-platform.build/Objects-normal/x86_64/lldb-platform.o
/usr/lib/libpython.dylib
/System/Library/PrivateFrameworks/DebugSymbols.framework/DebugSymbols
/System/Library/Frameworks//Carbon.framework/Carbon
/System/Library/Frameworks//Foundation.framework/Foundation
/System/Library/Frameworks//AppKit.framework/AppKit
/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation
/usr/lib/libobjc.dylib
/usr/lib/libstdc++.6.dylib
/usr/lib/libSystem.dylib
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
/System/Library/Frameworks//ApplicationServices.framework/ApplicationServices
/usr/lib/system/libmathCommon.A.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
/System/Library/Frameworks//CoreServices.framework/CoreServices
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a(Args.o)
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a(Error.o)
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a(Debugger.o)
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a(StreamFile.o)
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a(ProcessGDBRemoteLog.o)
/Users/test123/Library/Developer/Xcode/DerivedData/lldb-fhdpolastcxvbffrbwscfkvmurqi/Build/Products/Debug/liblldb-core.a(GDBRemoteCommunicationServer.o)
......
/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64/libllvmclang.a(libLLVMTransformUtils-CloneFunction.o)
/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64/libllvmclang.a(libclangCodeGen-CGRTTI.o)
/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64/libllvmclang.a(libclangCodeGen-CGVTT.o)
/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64/libllvmclang.a(libclangCodeGen-CGRecordLayoutBuilder.o)
/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64/libllvmclang.a(libclangCodeGen-CGCXXABI.o)
/Users/test123/tmp/lldb/llvm-build/Debug+Asserts/x86_64/libllvmclang.a(libclangAST-DumpXML.o)
/Users/test123/tmp/lldb/llvm-build/DebUndefined symbols for architecture x86_64:
  "___pthread_fchdir", referenced from:
      lldb_private::Host::LaunchProcess(lldb_private::ProcessLaunchInfo&)
in liblldb-core.a(Host-9B62CE0F4D4B7B7B.o)
  "___pthread_chdir", referenced from:
      lldb_private::Host::LaunchProcess(lldb_private::ProcessLaunchInfo&)
in liblldb-core.a(Host-9B62CE0F4D4B7B7B.o)
ld: symbol(s) not found for architecture x86_64
Command /Developer/usr/bin/clang++ failed with exit code 1

I know the linker can not find the symbols "___pthread_fchdir" &
"___pthread_chdir". I  try to set the link flag "-lpthread", but it's
helpless. And it seems thread model is already set to posix.

Which library exactly should be linking against?

Thanks,

Hank



More information about the lldb-dev mailing list