3.7.8 build problem 'cannot find -lcblas'

Trying to update our Mageia package to 3.7.8 using the release tarball,
we are hitting this:

[ 70%] Building CXX object
gr-wavelet/lib/CMakeFiles/gnuradio-wavelet.dir/wvps_ff_impl.cc.o
Linking CXX shared library libgnuradio-wavelet-3.7.8.so
/usr/bin/ld: cannot find -lcblas
collect2: error: ld returned 1 exit status

Any ideas?

libatlas-devel is installed.

$ dpkg -S /usr/lib/libcblas.*
libatlas-base-dev: /usr/lib/libcblas.a
libatlas-base-dev: /usr/lib/libcblas.so
libatlas3-base: /usr/lib/libcblas.so.3
libatlas3-base: /usr/lib/libcblas.so.3gf

$ dpkg -S /usr/lib/pkgconfig/blaspc
libatlas-base-dev: /usr/lib/pkgconfig/blas-atlas.pc
libblas-dev: /usr/lib/pkgconfig/blas-netlib.pc
libopenblas-dev: /usr/lib/pkgconfig/blas-openblas.pc
dpkg-query: no path found matching pattern /usr/lib/pkgconfig/blas.pc
libopenblas-dev: /usr/lib/pkgconfig/lapack-openblas.pc

  1. is the correct package installed?
  2. is there a libcblas.* in your linker path?
  3. did cmake not find the right pkgconfig file?
  4. you could rerun make with more verbose output (add “V=1”) to see
    what exactly failed.

On Thu, Aug 13, 2015 at 4:17 PM, Barry J. [email protected]
wrote:

libatlas-devel is installed.


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


GDB has a ‘break’ feature; why doesn’t it have ‘fix’ too?

Thanks for your reply.

On 14/08/15 03:46, Chris K. wrote:

dpkg-query: no path found matching pattern /usr/lib/pkgconfig/blas.pc
libopenblas-dev: /usr/lib/pkgconfig/lapack-openblas.pc

  1. is the correct package installed?

[baz@localhost gnuradio]$ urpmf /usr/lib64/atlas/libcblas.so
lib64atlas3-x86_64:/usr/lib64/atlas/libcblas.so.3
lib64atlas3-x86_64:/usr/lib64/atlas/libcblas.so.3.0
libatlas-x86_64-devel:/usr/lib64/atlas/libcblas.so <<=====

[baz@localhost gnuradio]$ urpmq --provides libatlas-x86_64-devel
libatlas-devel[== 3.8.4-6.mga5] <<==provided by libatlas-devel
libatlas-x86_64-devel[== 3.8.4-6.mga5]
libatlas-x86_64-devel(x86-64)[== 3.8.4-6.mga5]
[baz@localhost gnuradio]$

  1. is there a libcblas.* in your linker path?
    [root@localhost baz]# ldconfig -p | grep cblas
    libptcblas.so.3 (libc6,x86-64) => /usr/lib64/atlas/libptcblas.so.3
    libptcblas.so (libc6,x86-64) => /usr/lib64/atlas/libptcblas.so
    libgslcblas.so.0 (libc6,x86-64) => /lib64/libgslcblas.so.0
    libgslcblas.so (libc6,x86-64) => /lib64/libgslcblas.so
    libcblas.so.3 (libc6,x86-64) => /usr/lib64/atlas/libcblas.so.3
    libcblas.so (libc6,x86-64) => /usr/lib64/atlas/libcblas.so
  1. did cmake not find the right pkgconfig file?
    I don’t see anything to say either way - and I’m not very familiar with
    cmake.
    grepping build dir for cblas finds:

[baz@localhost build]$ grep -r cblas
gr-wavelet/swig/CMakeFiles/_wavelet_swig.dir/link.txt:/usr/bin/c++
-fPIC -O2 -g -pipe -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
-fPIC -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3
-DNDEBUG -Wl,–as-needed -Wl,-z,relro -Wl,-O1 -Wl,–build-id
-Wl,–enable-new-dtags -shared -Wl,-soname,_wavelet_swig.so -o
_wavelet_swig.so
CMakeFiles/_wavelet_swig.dir/wavelet_swigPYTHON_wrap.cxx.o -lm -lpthread
-lpython2.7 …/lib/libgnuradio-wavelet-3.7.8.so.0.0.0 -L/usr/lib64/atlas
-lgsl -lcblas -lm …/…/gr-blocks/lib/libgnuradio-blocks-3.7.8.so.0.0.0
…/…/gnuradio-runtime/lib/libgnuradio-runtime-3.7.8.so.0.0.0
…/…/gnuradio-runtime/lib/pmt/libgnuradio-pmt-3.7.8.so.0.0.0 -lrt
…/…/volk/lib/libvolk.so.1.0.2 -ldl -lorc-0.4 -lboost_date_time
-lboost_program_options -lboost_filesystem -lboost_system -lboost_thread
-lgsl -lcblas -lm -lpthread
gr-wavelet/lib/CMakeFiles/gnuradio-wavelet.dir/link.txt:/usr/bin/c++
-fPIC -O2 -g -pipe -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
-fPIC -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3
-DNDEBUG -Wl,–no-as-needed -Wl,–as-needed -Wl,–no-undefined
-Wl,-z,relro -Wl,-O1 -Wl,–build-id -Wl,–enable-new-dtags -shared
-Wl,-soname,libgnuradio-wavelet-3.7.8.so.0.0.0 -o
libgnuradio-wavelet-3.7.8.so.0.0.0
CMakeFiles/gnuradio-wavelet.dir/squash_ff_impl.cc.o
CMakeFiles/gnuradio-wavelet.dir/wavelet_ff_impl.cc.o
CMakeFiles/gnuradio-wavelet.dir/wvps_ff_impl.cc.o -lm -lpthread
…/…/gnuradio-runtime/lib/libgnuradio-runtime-3.7.8.so.0.0.0
…/…/gr-blocks/lib/libgnuradio-blocks-3.7.8.so.0.0.0 -lboost_date_time
-lboost_program_options -lboost_filesystem -lboost_system -lboost_thread
-lgsl -lcblas -lm
…/…/gnuradio-runtime/lib/libgnuradio-runtime-3.7.8.so.0.0.0
…/…/gnuradio-runtime/lib/pmt/libgnuradio-pmt-3.7.8.so.0.0.0 -lrt
-lboost_date_time -lboost_program_options -lboost_filesystem
-lboost_system -lboost_thread …/…/volk/lib/libvolk.so.1.0.2 -ldl
-lorc-0.4 -lm -lpthread
CMakeCache.txt:_wavelet_swig_LIB_DEPENDS:STATIC=general;m;general;pthread;general;/usr/lib64/libpython2.7.so;general;gnuradio-wavelet;general;-L/usr/lib64/atlas;general;-lgsl;general;-lcblas;general;-lm;
CMakeCache.txt:gnuradio-wavelet_LIB_DEPENDS:STATIC=general;m;general;pthread;general;gnuradio-runtime;general;gnuradio-blocks;general;/usr/lib64/libboost_date_time.so;general;/usr/lib64/libboost_program_options.so;general;/usr/lib64/libboost_filesystem.so;general;/usr/lib64/libboost_system.so;general;/usr/lib64/libboost_thread.so;general;gsl;general;cblas;general;m;
CMakeCache.txt:FIND_PACKAGE_MESSAGE_DETAILS_GSL:INTERNAL=[gsl;cblas;m][/usr/include][/usr/lib64][v()]
CMakeCache.txt:GSL_LDFLAGS:INTERNAL=-L/usr/lib64/atlas;-lgsl;-lcblas;-lm
CMakeCache.txt:GSL_LIBRARIES:INTERNAL=gsl;cblas;m
CMakeCache.txt:GSL_STATIC_LDFLAGS:INTERNAL=-L/usr/lib64/atlas;-lgsl;-lcblas;-lm
CMakeCache.txt:GSL_STATIC_LIBRARIES:INTERNAL=gsl;cblas;m

  1. you could rerun make with more verbose output (add “V=1”) to see
    what exactly failed.

With %cmake -DCMAKE_VERBOSE_MAKEFILE=ON I get the following which may be
of use, but I can’t see it, unless it’s to do with the --no-as-needed
which seems to be reversed later. This is probably done by our %cmake
macro.

make[2]: Entering directory
‘/home/baz/BLD_Mga6_5/gnuradio/BUILD/gnuradio-3.7.8/build’
Linking CXX shared library libgnuradio-wavelet-3.7.8.so
cd
/home/baz/BLD_Mga6_5/gnuradio/BUILD/gnuradio-3.7.8/build/gr-wavelet/lib
&& /usr/bin/cmake -E cmake_link_script
CMakeFiles/gnuradio-wavelet.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -g -pipe -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
-fPIC -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3
-DNDEBUG -Wl,–no-as-needed -Wl,–as-needed -Wl,–no-undefined
-Wl,-z,relro -Wl,-O1 -Wl,–build-id -Wl,–enable-new-dtags -shared
-Wl,-soname,libgnuradio-wavelet-3.7.8.so.0.0.0 -o
libgnuradio-wavelet-3.7.8.so.0.0.0
CMakeFiles/gnuradio-wavelet.dir/squash_ff_impl.cc.o
CMakeFiles/gnuradio-wavelet.dir/wavelet_ff_impl.cc.o
CMakeFiles/gnuradio-wavelet.dir/wvps_ff_impl.cc.o -lm -lpthread
…/…/gnuradio-runtime/lib/libgnuradio-runtime-3.7.8.so.0.0.0
…/…/gr-blocks/lib/libgnuradio-blocks-3.7.8.so.0.0.0 -lboost_date_time
-lboost_program_options -lboost_filesystem -lboost_system -lboost_thread
-lgsl -lcblas -lm
…/…/gnuradio-runtime/lib/libgnuradio-runtime-3.7.8.so.0.0.0
…/…/gnuradio-runtime/lib/pmt/libgnuradio-pmt-3.7.8.so.0.0.0 -lrt
-lboost_date_time -lboost_program_options -lboost_filesystem
-lboost_system -lboost_thread …/…/volk/lib/libvolk.so.1.0.2 -ldl
-lorc-0.4 -lm -lpthread
/usr/bin/ld: cannot find -lcblas
collect2: error: ld returned 1 exit status
gr-wavelet/lib/CMakeFiles/gnuradio-wavelet.dir/build.make:154: recipe
for target ‘gr-wavelet/lib/libgnuradio-wavelet-3.7.8.so.0.0.0’ failed
make[2]: *** [gr-wavelet/lib/libgnuradio-wavelet-3.7.8.so.0.0.0] Error 1

I checked without the %cmake macro so the --no-as-needed did not get
overridden and the error is the same:

Linking CXX shared library libgnuradio-wavelet-3.7.8.so
cd
/home/baz/BLD_Mga6_5/gnuradio/BUILD/gnuradio-3.7.8/build/gr-wavelet/lib
&& /usr/bin/cmake -E cmake_link_script
CMakeFiles/gnuradio-wavelet.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -fvisibility=hidden -Wsign-compare -Wall
-Wno-uninitialized -O3 -DNDEBUG -Wl,–no-as-needed -shared
-Wl,-soname,libgnuradio-wavelet-3.7.8.so.0.0.0 -o
libgnuradio-wavelet-3.7.8.so.0.0.0
CMakeFiles/gnuradio-wavelet.dir/squash_ff_impl.cc.o
CMakeFiles/gnuradio-wavelet.dir/wavelet_ff_impl.cc.o
CMakeFiles/gnuradio-wavelet.dir/wvps_ff_impl.cc.o -lm -lpthread
…/…/gnuradio-runtime/lib/libgnuradio-runtime-3.7.8.so.0.0.0
…/…/gr-blocks/lib/libgnuradio-blocks-3.7.8.so.0.0.0 -lboost_date_time
-lboost_program_options -lboost_filesystem -lboost_system -lboost_thread
-lgsl -lcblas -lm
…/…/gnuradio-runtime/lib/libgnuradio-runtime-3.7.8.so.0.0.0
…/…/gnuradio-runtime/lib/pmt/libgnuradio-pmt-3.7.8.so.0.0.0 -lrt
-lboost_date_time -lboost_program_options -lboost_filesystem
-lboost_system -lboost_thread …/…/volk/lib/libvolk.so.1.0.2 -ldl
-lorc-0.4 -lm -lpthread
-Wl,-rpath,/home/baz/BLD_Mga6_5/gnuradio/BUILD/gnuradio-3.7.8/build/gnuradio-runtime/lib:/home/baz/BLD_Mga6_5/gnuradio/BUILD/gnuradio-3.7.8/build/gr-blocks/lib:/home/baz/BLD_Mga6_5/gnuradio/BUILD/gnuradio-3.7.8/build/gnuradio-runtime/lib/pmt:/home/baz/BLD_Mga6_5/gnuradio/BUILD/gnuradio-3.7.8/build/volk/lib:

/usr/bin/ld: cannot find -lcblas

Install blas, lapack or something that supplies the missing library.

Philip

Ping?

On 18/08/15 08:58, Philip B. wrote:

[email protected]
Discuss-gnuradio Info Page

Hi Philip,
Thanks for your reply. Sorry for the delay.

AFAICT the apparently missing library is libcblas.so which is only
provided by libatlas-devel in Mageia which is being installed.

However 3.7.5.1 builds fine without this so is this a new require?

Barry

On 23/08/15 16:48, Barry J. wrote:

Discuss-gnuradio mailing list
However 3.7.5.1 builds fine without this so is this a new require?

Barry


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

OK, exporting LDFLAGS=“$LDFLAGS -L%{_libdir}/atlas” fixes it for now,
but maybe the cmake setup in gnuradio could handle this better?

Barry