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:
lookup in file=/path_to_custom_glibc/libc.so.6  3539: binding file /path_to_custom_glibc/libpthread.so.0  to /path_to_custom_glibc/libc.so.6 : normal symbol `__libc_dl_error_tsd' [GLIBC_PRIVATE] Segmentation fault (core dumped)