[lldb-dev] Makefile build

Filipe Cabecinhas filcab at gmail.com
Tue May 22 17:10:24 PDT 2012


Hi all, 

I was fixing lldb's Makefile build system, and updating it with Dragos' LLVMLibsOptions and Charles' python packaging (with printf instead of echo -n) patches.

But I'm having some weird problems. Everything builds fine with FreeBSD (haven't tested the Python part yet), but on Mac OS X Lion (the latest), I get this:

llvm[4]: Linking Debug+Asserts executable lldb-platform
clang++ -I/Users/filcab/dev/svn-llvm/build/include -I/Users/filcab/dev/svn-llvm/build/tools/lldb/tools/lldb-platform -I/Users/filcab/dev/svn-llvm/include -I/Users/filcab/dev/svn-llvm/tools/lldb/tools/lldb-platform -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/filcab/dev/svn-llvm/tools/lldb/tools/lldb-platform/../../include -I/Users/filcab/dev/svn-llvm/build/tools/lldb/tools/lldb-platform/../../include -I/Users/filcab/dev/svn-llvm/tools/clang/include -I/Users/filcab/dev/svn-llvm/build/tools/clang/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Users/filcab/dev/svn-llvm/tools/lldb/tools/lldb-platform/../../source -I/Users/filcab/dev/svn-llvm/tools/lldb/tools/lldb-platform/../../source/Utility -I/Users/filcab/dev/svn-llvm/tools/lldb/tools/lldb-platform/../../source/Plugins/Process/Utility -I/Users/filcab/dev!
 /svn-llvm
/tools/lldb/tools/lldb-platform/../../source/Plugins/Process/POSIX -F/System/Library/Frameworks -F/System/Library/PrivateFrameworks -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -g -Wl,-rpath -Wl, at executable_path/../lib -L/Users/filcab/dev/svn-llvm/build/Debug+Asserts/lib -L/Users/filcab/dev/svn-llvm/build/Debug+Asserts/lib -m64 -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-unknown-pragmas -Wno-sign-compare -Wno-sign-compare -Wno-unused-function -Wcovered-switch-default -o /Users/filcab/dev/svn-llvm/build/Debug+Asserts/bin/lldb-platform /Users/filcab/dev/svn-llvm/build/tools/lldb/tools/lldb-platform/Debug+Asserts/lldb-platform.o \
-llldb -llldbUtility -Wl,-rpath, at loader_path/../lib/ -lpthread -lm 


Undefined symbols for architecture x86_64:
"__ZN12lldb_private4ArgsC1EPKc", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private5ErrorC1Ev", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private8Debugger10InitializeEv", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private10StreamFileC1EP7__sFILEb", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private4Args14AppendArgumentEPKcc", referenced from:
_main in lldb-platform.o
"__ZNK12lldb_private4Args16GetArgumentCountEv", referenced from:
_main in lldb-platform.o
"__ZNK12lldb_private4Args22GetConstArgumentVectorEv", referenced from:
_main in lldb-platform.o
"__ZN19ProcessGDBRemoteLog9EnableLogERNSt3tr110shared_ptrIN12lldb_private6StreamEEEjPPKcPS3_", referenced from:
_main in lldb-platform.o
"__ZN28GDBRemoteCommunicationServerC1Eb", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private24ConnectionFileDescriptorC1Ev", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private13Communication13SetConnectionEPNS_10ConnectionE", referenced from:
_main in lldb-platform.o
"__ZNK12lldb_private13Communication11IsConnectedEv", referenced from:
_main in lldb-platform.o
"__ZN28GDBRemoteCommunicationServer19HandshakeWithClientEPN12lldb_private5ErrorE", referenced from:
_main in lldb-platform.o
"__ZN28GDBRemoteCommunicationServer24GetPacketAndSendResponseEjRN12lldb_private5ErrorERbS3_", referenced from:
_main in lldb-platform.o
"__ZNK12lldb_private5Error4FailEv", referenced from:
_main in lldb-platform.o
"__ZNK12lldb_private5Error9AsCStringEPKc", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private8Debugger9TerminateEv", referenced from:
_main in lldb-platform.o
"__ZN28GDBRemoteCommunicationServerD1Ev", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private5ErrorD1Ev", referenced from:
_main in lldb-platform.o
"__ZN12lldb_private4ArgsD1Ev", referenced from:
_main in lldb-platform.o
ld: symbol(s) not found for architecture x86_64
clang-3: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [/Users/filcab/dev/svn-llvm/build/Debug+Asserts/bin/lldb-platform] Error 1




The problem is that every symbol is there, but marked as local:
$ nm Debug+Asserts/lib/liblldb.dylib| grep __ZNK12lldb_private4Args22GetConstArgumentVectorEv
0000000000275230 t __ZNK12lldb_private4Args22GetConstArgumentVectorEv
$ nm Debug+Asserts/lib/liblldb.dylib| grep __ZN28GDBRemoteCommunicationServerC1Eb
00000000003beca0 t __ZN28GDBRemoteCommunicationServerC1Eb




Linking liblldb.dylib also had this error message, btw. I don't know how bad it is. There's not much info available:
ld: warning: cannot export hidden symbol __ZN4lldb7SBValue6get_spEv from /Users/filcab/dev/svn-llvm/build/Debug+Asserts/lib/liblldbInterpreter.a(ScriptInterpreterPython.o)



Any clues? 

  Filipe





More information about the lldb-dev mailing list