[openib-general] does the libibverbs support static linkage?
dotanb at dev.mellanox.co.il
dotanb at dev.mellanox.co.il
Tue Jan 2 01:11:10 PST 2007
Hi Roland.
Here are the props of my host/driver:
*************************************************************
Host Architecture : x86_64
Linux Distribution: SUSE Linux Enterprise Server 10 (x86_64) VERSION = 10
Kernel Version : 2.6.16.21-0.8-smp
GCC Version : gcc (GCC) 4.1.0 (SUSE Linux)
Memory size : 4047700 kB
Driver Version : gen2_devel-20070101-1730
HCA ID(s) : mthca0
HCA model(s) : 23108
FW version(s) : 3.5.000
Board(s) : MT_0030000001
*************************************************************
when tried to use static linking with our tests (i tried several tests)
using the following change in the Makefile:
OFED_PATH = /usr/local/
LDFLAGS += --static -Wl,--whole-archive -libverbs
${OFED_PATH}/lib64/infiniband/mthca.a
LDFLAGS += -Wl,--no-whole-archive
I got the following linkage warning:
/usr/local/lib64/libibverbs.a(src_libibverbs_la-init.o): In function
`load_driver':
src/init.c:66: warning: Using 'dlopen' in statically linked applications
requires at runtime the shared libraries from the glibc version used for
linking
When i tried to run the executable i got segmentation fault in:
load_driver (so_path=0x5e65f0 "/usr/local//lib64/infiniband/mthca.so") at
src/init.c:61 (func: load_driver)
It seems that the code that causes the seg fault is the following code line:
dlhandle = dlopen(so_path, RTLD_NOW);
When i executed ldd on the executable i got the following message:
not a dynamic executable
Do you know why does the debugger show that
"/usr/local//lib64/infiniband/mthca.so" was used and not
"/usr/local//lib64/infiniband/mthca.a"?
Can you please check this issue?
thanks
Dotan
More information about the general
mailing list