Question

Package quantreg fails to install because it does not link to lapack:

install.packages("quantreg")

[snip]

gcc -std=gnu99 -shared -o quantreg.so akj.o boot.o brute.o chlfct.o cholesky.o combos.o crq.o crqfnb.o dsel05.o etime.o extract.o idmin.o iswap.o kuantile.o mcmb.o penalty.o powell.o rls.o rq0.o rq1.o rqbr.o rqfn.o rqfnb.o rqfnc.o rqs.o sparskit2.o srqfn.o srqfnc.o srtpai.o -L/home/myself/R/x86_64-pc-linux-gnu-library/2.15/Rcpp/lib -lRcpp -Wl,-rpath,/home/myself/R/x86_64-pc-linux-gnu-library/2.15/Rcpp/lib -lprofiler -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR

[snip]

unable to load shared object '/home/myself/R/x86_64-pc-linux-gnu-library/2.15/quantreg/libs/quantreg.so':
/home/myself/R/x86_64-pc-linux-gnu-library/2.15/quantreg/libs/quantreg.so: undefined symbol: dposv_

Weirdly enough, when creating a new user from scratch, everything works perfectly (and there is a "-llapack" in the logs).

I suspect some environment variables to be responsible for this, but could not identify which one: when unsetting LIBRARY_PATH and LD_LIBRARY_PATH, this still happens. Thanks for any idea!

Was it helpful?

Solution

I had a makevars file in .R that contained

PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` -lprofiler
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top