0

I have built a project using gcc 4.9.2 (libstdc++.so.6.0.20). When I want to run that program on the virtual machine which is equipped with gcc 4.6.3 (libstdc++.so.6.0.16) I have to deliver libstd++/libc in the same versions as on the build machine. I follow these steps:

  • export LD_LIBRARY_PATH (custom glibc build with proper kernel version and libstdc++)
  • run command: LD_DEBUG=libs LD_PRELOAD=/path_to_custom_glibc/ld-linux-x86-64.so.2 myApp

I get an output which informs that a program crash during calling init: /path_to_custom_glibc/libpthread.so.0

What might be wrong ?

Edit1 Core dump doesn't show where a segmentation fault occurs but LD_DEBUG=all returns a more precise info than LD_DEBUG=libs:

symbol=__libc_dl_error_tsd;
lookup in file=/path_to_custom_glibc/libc.so.6 [0] 3539: binding file /path_to_custom_glibc/libpthread.so.0 [0] to /path_to_custom_glibc/libc.so.6 [0]: normal symbol `__libc_dl_error_tsd' [GLIBC_PRIVATE] Segmentation fault (core dumped)

  • gdb and then a bt might be handy to know... – thrig Oct 14 '15 at 20:36
  • LD_LIBRARY is unknown by the dynamic linker. Do you have LD_LIBRARY_PATH in mind? – schily Oct 14 '15 at 21:20
  • Yes, I mean LD_LIBRARY_PATH. I will try to analyze core dump. – Irbis Oct 14 '15 at 22:11
  • Please see Edit1 – Irbis Oct 15 '15 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.