[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lib/libgsl.so: undefined reference to `cblas_ztrsv' (on Ubuntus)

On Tue, Sep 03, 2013 at 11:42:32AM -0400, Yaroslav Halchenko wrote:
> ~/afni-0.20130830~dfsg.1/build-x86_64-linux-gnu/avovk# gcc  --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat-security -g -O2 -fstack-protector
> --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wno-unused  -fopenmp -DUSE_OMP  -Wl,-z,now -Wl,-z,relro -Wl,--no-undefined
> CMakeFiles/3dkmeans.dir/3dkmeans.c.o CMakeFiles/3dkmeans.dir/cluster_floatNOMASK.c.o CMakeFiles/3dkmeans.dir/thd_segtools_fNM.c.o  -o 3dkmeans
> ../libmri.so ../libmrix.so ../coxplot/libcoxplot.so libsegtools.so -lSM -lICE -lX11 -lXext -lXm -lXmHTML ../libmri.so -lvolpack -lnetcdf -lXt -lf2c
> -lgiftiio -lnifticdf -lniftiio -lz -lnifticdf -lniftiio -lz -lgsl  -lgslcblas -lm
> -Wl,-rpath,"/tmp/buildd/afni-0.20130830~dfsg.1/build-x86_64-linux-gnu:/tmp/buildd/afni-0.20130830~dfsg.1/build-x86_64-linux-gnu/coxplot:/tmp/buildd/a
> fni-0.20130830~dfsg.1/build-x86_64-linux-gnu/avovk:" -DNDEBUG
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgsl.so: undefined reference to `cblas_ztrsv'
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libgsl.so: undefined reference to `cblas_scasum'
If you ship a public library with undefined symbols it is not just simply
wrong, it's also a violation of a Policy "must" (10.2) and hence an RC
bug. In any case, please don't. It's 2013 already.

> and here you can see that ld finds the definition but then reports that it is
> undefined in libgsl.so (which is factually true but I thought it would use the
> one from libgslcblas by then).
You can't link in shared libs with undefined symbols when using
--as-needed which is default on Ubuntu (well, sometimes you probably can
but not in this case).


Attachment: signature.asc
Description: Digital signature

Reply to: