ldd

What does version info in ldd -v mean?

一笑奈何 提交于 2019-12-12 20:23:51
问题 Version information: /usr/lib/lapack/liblapack.so: libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 libgcc_s.so.1 (GCC_4.0.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1 libgfortran.so.3 (GFORTRAN_1.0) => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 libgfortran.so.3 (GFORTRAN_1.4) => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu

I need to list the programs which have a specified shared library linked to them in UNIX/Linux (like ldd but vice versa)

陌路散爱 提交于 2019-12-12 00:21:52
问题 ldd command in unix/linux lists all the dinamically linked libraries of a program. how can I determine the reverse question: what is the list of programs linked to a specified shared library? I need a way of getting a list of programs that use "libz" for instance. is there a command for that? 回答1: I highly doubt there would be. That would require keeping a database of all executables and remembering what they depend on, which may be possible if you only install software from a specific

Programatically determine shared libraries in use by running application

最后都变了- 提交于 2019-12-10 23:22:56
问题 Is it possible to (and, if so, how does one) determine the shared libraries of an application that are used by an application at runtime ? Basically, can I programmatically obtain the the output of ldd ? Preferred C/C++ solution does not just jump to execute ldd on the command-line. Consider the following: I have a driver application that calls doAction() from a shared library libfoo . I compile the application once and then set LD_LIBRARY_PATH to an appropriate directory containing a libfoo

undefined reference to symbol 'dlsym@@GLIBC_2.4'

廉价感情. 提交于 2019-12-09 12:30:19
问题 First off, please keep in mind that I'm new to linux. I'm having problems compiling my project. I keep get the following error: /usr/bin/ld: CMakeFiles/Robot.dir/source/ModuleHandler.cpp.o: undefined reference to symbol 'dlsym@@GLIBC_2.4' //lib/arm-linux-gnueabihf/libdl.so.2: error adding symbols: DSO missing from command line collect2: ld returned 1 exit status First off the correct directory is: /usr/lib/arm-linux-gnueabihf/libdl.so Rather than: //lib/arm-linux-gnueabihf/libdl.so I've tried

C++: linked library disappears and gives segfault during execution

社会主义新天地 提交于 2019-12-07 18:21:31
I'm having a problem building a library. In the Makefile I tell g++ that I need tclstub8.6 by putting -ltclstub8.6 , and g++ takes it into account (sorry for these messages in French): make: AVERTISSEMENT : le fichier « ../Linux-PORT/i586-GCC4/Makefile » a une date de modification 609 s dans le futur *** Compile c [gcc] libtestGuiMnt_info.Linux-PORT.i586-GCC4.c *** Compile C++ [g++] mntdisplay.cc *** Compile C++ [g++] mntogl.cc mntogl.cc: In member function 'virtual int MNTOgl::Display() const': mntogl.cc:228:12: warning: unused variable 'ErrorCheckValue' [-Wunused-variable] *** Compile C++ [g

Error while loading shared libraries: /usr/local/lib64/libssl.so.1.1

安稳与你 提交于 2019-12-07 01:46:41
问题 I’m trying to compile openssl-1.1.0e on Centos 7 (7.3.1611) but after i successfully compiled everything without any warning, i get an error when i’m trying any openssl command [mdm@dev openssl-1.1.0e]$ openssl version openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory Is it a bug or my mistake? Here below some info about my system/configuration Configure: [mdm@dev openssl-1.1.0e]$ ./Configure linux-x86_64 --prefix=/usr

gcc build links but shared library does not appear with ldd

左心房为你撑大大i 提交于 2019-12-07 00:57:14
问题 I've a program that I must build. The program depends on libA , and libA depends on libB . Both libs are in the same folder but ldd libA.so does not include libB.so so I must add it while linking it. This is my gcc command: gcc -L/path/to/libraries/lib -lA -lB -I/path/to/libraries/include main.cpp The program builds and links, but it does not start. It gives me following error: ./a.out: symbol lookup error: /path/to/libraries/lib/libA.so: undefined symbol: symbol_used_in_libA_but_defined_in

How can I get the symbol name in struct “Elf64_Rela”

為{幸葍}努か 提交于 2019-12-06 12:11:55
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/mman.h> #include <errno.h> #include <fcntl.h> #include <elf.h> Elf64_Rela *retab; Elf64_Rela *retab_end; Elf64_Ehdr *ehdr; Elf64_Shdr *shdr; char *strtab; void elf_open(char *filename) { int fd = open(filename, O_RDONLY); struct stat sbuf; fstat(fd, &sbuf); void *maddr = mmap(NULL, sbuf.st_size, PROT_READ, MAP_SHARED, fd, 0); close(fd); ehdr = maddr; shdr = (Elf64_Shdr *)(maddr + ehdr->e_shoff); for (int i = 0; i < ehdr->e_shnum; i++) { if (shdr[i].sh_type =

Why is my Linux application pulling in the wrong .so library?

﹥>﹥吖頭↗ 提交于 2019-12-06 03:53:02
问题 I have an application I'm building that's using the NetCDF C++ library, and NetCDF is pulling in the HDF-4 libary. However, it's pulling in the wrong HDF-4 library. Here's how my app is linked: /apps1/intel/bin/icpc -gxx-name=/apps1/gcc-4.5.0/bin/g++ -shared -o lib/libMyCustom.so -Llib -L/apps1/boost-1.48.0/lib -Wl,-rpath=/apps1/boost-1.48.0/lib -L/apps1/gdal-1.8.0-jasper/lib -Wl,-rpath=/apps1/gdal-1.8.0-jasper/lib -L/new_apps1/hdf4/lib -Wl,-rpath=/new_apps1/hdf4/lib -L/new_apps1/netcdf/lib

gcc build links but shared library does not appear with ldd

随声附和 提交于 2019-12-05 06:41:37
I've a program that I must build. The program depends on libA , and libA depends on libB . Both libs are in the same folder but ldd libA.so does not include libB.so so I must add it while linking it. This is my gcc command: gcc -L/path/to/libraries/lib -lA -lB -I/path/to/libraries/include main.cpp The program builds and links, but it does not start. It gives me following error: ./a.out: symbol lookup error: /path/to/libraries/lib/libA.so: undefined symbol: symbol_used_in_libA_but_defined_in_libB With ldd I can see that libB.so is not included in my binary: linux-vdso.so.1 =>