Score:2

Unable to install CBLAS

in flag

I have extracted the .tgz downloaded from here and made the following changes in Makefile.in:

BLLIB = /home/at3ee/CBLAS/lib/cblas_LINUX.a

However, the following error occurs:

make all
( cd src && make all)
make[1]: Entering directory '/home/at3ee/CBLAS/src'
ar r  ../lib/cblas_LINUX.a cblas_srotg.o cblas_srotmg.o cblas_srot.o cblas_srotm.o cblas_sswap.o cblas_sscal.o  cblas_scopy.o cblas_saxpy.o cblas_sdot.o  cblas_sdsdot.o cblas_snrm2.o cblas_sasum.o cblas_isamax.o   sdotsub.o   sdsdotsub.o snrm2sub.o sasumsub.o isamaxsub.o  cblas_drotg.o cblas_drotmg.o cblas_drot.o cblas_drotm.o cblas_dswap.o cblas_dscal.o  cblas_dcopy.o cblas_daxpy.o cblas_ddot.o  cblas_dsdot.o cblas_dnrm2.o cblas_dasum.o cblas_idamax.o   ddotsub.o   dsdotsub.o       dnrm2sub.o dasumsub.o idamaxsub.o cblas_cswap.o cblas_cscal.o cblas_csscal.o cblas_ccopy.o cblas_caxpy.o cblas_cdotu_sub.o cblas_cdotc_sub.o cblas_icamax.o cdotcsub.o cdotusub.o icamaxsub.o  cblas_zswap.o cblas_zscal.o cblas_zdscal.o cblas_zcopy.o cblas_zaxpy.o cblas_zdotu_sub.o cblas_zdotc_sub.o cblas_dznrm2.o cblas_dzasum.o cblas_izamax.o zdotcsub.o zdotusub.o dzasumsub.o  dznrm2sub.o  izamaxsub.o  cblas_scasum.o scasumsub.o cblas_scnrm2.o scnrm2sub.o cblas_sgemv.o cblas_sgbmv.o cblas_sger.o cblas_ssbmv.o  cblas_sspmv.o cblas_sspr.o  cblas_sspr2.o cblas_ssymv.o cblas_ssyr.o  cblas_ssyr2.o cblas_stbmv.o cblas_stbsv.o cblas_stpmv.o cblas_stpsv.o  cblas_strmv.o cblas_strsv.o   cblas_dgemv.o cblas_dgbmv.o cblas_dger.o cblas_dsbmv.o  cblas_dspmv.o cblas_dspr.o  cblas_dspr2.o cblas_dsymv.o cblas_dsyr.o  cblas_dsyr2.o cblas_dtbmv.o cblas_dtbsv.o cblas_dtpmv.o cblas_dtpsv.o  cblas_dtrmv.o cblas_dtrsv.o   cblas_cgemv.o cblas_cgbmv.o cblas_chemv.o cblas_chbmv.o cblas_chpmv.o cblas_ctrmv.o cblas_ctbmv.o cblas_ctpmv.o cblas_ctrsv.o cblas_ctbsv.o cblas_ctpsv.o cblas_cgeru.o cblas_cgerc.o cblas_cher.o  cblas_cher2.o cblas_chpr.o  cblas_chpr2.o  cblas_zgemv.o cblas_zgbmv.o cblas_zhemv.o cblas_zhbmv.o cblas_zhpmv.o cblas_ztrmv.o cblas_ztbmv.o cblas_ztpmv.o cblas_ztrsv.o cblas_ztbsv.o cblas_ztpsv.o cblas_zgeru.o cblas_zgerc.o cblas_zher.o  cblas_zher2.o cblas_zhpr.o  cblas_zhpr2.o  cblas_sgemm.o cblas_ssymm.o cblas_ssyrk.o cblas_ssyr2k.o cblas_strmm.o cblas_strsm.o cblas_dgemm.o cblas_dsymm.o cblas_dsyrk.o cblas_dsyr2k.o cblas_dtrmm.o cblas_dtrsm.o   cblas_cgemm.o cblas_csymm.o cblas_chemm.o cblas_cherk.o cblas_cher2k.o cblas_ctrmm.o cblas_ctrsm.o  cblas_csyrk.o cblas_csyr2k.o cblas_zgemm.o cblas_zsymm.o cblas_zhemm.o cblas_zherk.o cblas_zher2k.o cblas_ztrmm.o cblas_ztrsm.o  cblas_zsyrk.o cblas_zsyr2k.o cblas_globals.o cblas_xerbla.o xerbla.o  
echo ../lib/cblas_LINUX.a
../lib/cblas_LINUX.a
make[1]: Leaving directory '/home/at3ee/CBLAS/src'
( cd testing && make all )
make[1]: Entering directory '/home/at3ee/CBLAS/testing'
gfortran  -o xscblat1 c_sblat1.o c_sblas1.o ../lib/cblas_LINUX.a /home/at3ee/CBLAS/lib/cblas_LINUX.a 
/usr/bin/ld: ../lib/cblas_LINUX.a(cblas_srotg.o): in function `cblas_srotg':
cblas_srotg.c:(.text+0x5): undefined reference to `srotg_'
/usr/bin/ld: ../lib/cblas_LINUX.a(cblas_srot.o): in function `cblas_srot':
cblas_srot.c:(.text+0x40): undefined reference to `srot_'
/usr/bin/ld: ../lib/cblas_LINUX.a(cblas_sswap.o): in function `cblas_sswap':
cblas_sswap.c:(.text+0x25): undefined reference to `sswap_'
/usr/bin/ld: ../lib/cblas_LINUX.a(cblas_sscal.o): in function `cblas_sscal':
cblas_sscal.c:(.text+0x2c): undefined reference to `sscal_'
/usr/bin/ld: ../lib/cblas_LINUX.a(cblas_scopy.o): in function `cblas_scopy':
cblas_scopy.c:(.text+0x25): undefined reference to `scopy_'
/usr/bin/ld: ../lib/cblas_LINUX.a(cblas_saxpy.o): in function `cblas_saxpy':
cblas_saxpy.c:(.text+0x39): undefined reference to `saxpy_'
/usr/bin/ld: ../lib/cblas_LINUX.a(sdotsub.o): in function `sdotsub_':
sdotsub.f:(.text+0x5): undefined reference to `sdot_'
/usr/bin/ld: ../lib/cblas_LINUX.a(snrm2sub.o): in function `snrm2sub_':
snrm2sub.f:(.text+0x5): undefined reference to `snrm2_'
/usr/bin/ld: ../lib/cblas_LINUX.a(sasumsub.o): in function `sasumsub_':
sasumsub.f:(.text+0x5): undefined reference to `sasum_'
/usr/bin/ld: ../lib/cblas_LINUX.a(isamaxsub.o): in function `isamaxsub_':
isamaxsub.f:(.text+0x5): undefined reference to `isamax_'
/usr/bin/ld: ../lib/cblas_LINUX.a(scasumsub.o): in function `scasumsub_':
scasumsub.f:(.text+0x5): undefined reference to `scasum_'
/usr/bin/ld: ../lib/cblas_LINUX.a(scnrm2sub.o): in function `scnrm2sub_':
scnrm2sub.f:(.text+0x5): undefined reference to `scnrm2_'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:72: xscblat1] Error 1
make[1]: Leaving directory '/home/at3ee/CBLAS/testing'
make: *** [Makefile:180: alltst] Error 2

Kindly suggest. Thanks,

N0rbert avatar
zw flag
What is your Ubuntu version? Why do you compile CBLAS? What was wrong with binary [deb-packages](https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=blas%20dev) from official repository? For which application you compile CBLAS?
Atreyee Saha avatar
in flag
My Ubuntu version: 20.04. I needed it for installing wav2letter whose steup.py was resulting in error: Unable to find cblas.
N0rbert avatar
zw flag
Please provide all the details to make your question reproducible. Exact steps done, executed commands and download URLs for used software.
us flag
@N0rbert Please write an answer about how to install the repository version of blas (I don't want to write the answer because you already posted the solution in the comment). Most likely that will work for OP. Maybe OP does not know about its existence (or how to install it). Also, libopenblas is much faster than libblas.
Score:1
zw flag

To have fully-featured support of linear algebra libraries in your Ubuntu system you have to execute the following commands

sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install libblas-dev libblas64-dev libatlas-base-dev liblapack-dev libopenblas-dev libgsl-dev

and then retry running setup.py.


For more successful Ubuntu usage you have to know its packages resource, it is located at https://packages.ubuntu.com/ ; it provides search for package names and contents.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.