On 09/24/2011 11:46 PM, Fabio wrote:
Hi all,
I am trying to build glibc and link libunwind to get a backtrace at
the beginning of some glibc function like strcpy for example but I
can't get them to build.
I include -lunwind in the CFLAGS and I export
LD_LIBRARY_PATH=/usr/local/lib, but when it comes to build ld.so it
fails:
/home/wintermute/tesi/glibc/2.14/custom/glibc-2.14/string/strcpy.c:43:
undefined reference to `_Ux86_getcontext'
/home/wintermute/tesi/glibc/2.14/custom/glibc-2.14/string/strcpy.c:44:
undefined reference to `_ULx86_init_local'
collect2: ld returned 1 exit status
Am I missing something? Sorry for asking a dumb question and thanks in advance.
I suspect you're on a system where the linker does not pull in indirect
shared libs (the default behavior of recent Debian or Fedora based
distros). I had a similar issue - see:
http://lists.gnu.org/archive/html/libunwind-devel/2011-03/msg00002.html.
You're probably just missing to link against libunwind-x86_64.so. Adding
-lunwind-x86 to your CLFAGS/LDFLAGS should be sufficient.
Regards
Ken
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel