fhormoz / caviar

50 stars 24 forks source link

BLAS and LAPACK link error #21

Closed verdurin closed 3 years ago

verdurin commented 3 years ago

When preparing an easyconfig for CAVIAR I saw this error:

g++ caviar.cpp PostCal.cpp Util.cpp TopKSNP.cpp    -I /mnt/ds918plus/eb/nuc-centos8/build/CAVIAR/20200820/foss-2019b/caviar/CAVIAR-C++/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas  -lgsl -o CAVIAR
g++ ecaviar.cpp PostCal.cpp Util.cpp   -I /mnt/ds918plus/eb/nuc-centos8/build/CAVIAR/20200820/foss-2019b/caviar/CAVIAR-C++/armadillo/include/ -DARMA_DONT_USE_WRAPPER -llapack -lblas -lgslcblas  -lgsl -o eCAVIAR
/mnt/ds918plus/eb/nuc-centos8/software/binutils/2.32-GCCcore-8.3.0/bin/ld.gold: error: cannot find -llapack
/mnt/ds918plus/eb/nuc-centos8/software/binutils/2.32-GCCcore-8.3.0/bin/ld.gold: error: cannot find -lblas

The error was fixed by changing LDFLAGS in the Makefile to be:

LDFLAGS= -I $(DIC)/armadillo/include/ -DARMA_DONT_USE_WRAPPER -lopenblas -lgslcblas  -lgsl
fhormoz commented 3 years ago

Thanks a lot for the fix!