DReichLab / EIG

Eigen tools by Nick Patterson and Alkes Price lab
Other
180 stars 60 forks source link

make install hangs on dependencies already installed #67

Closed locurran closed 3 years ago

locurran commented 3 years ago

Hi!

I have the goal of using the smartpca executable. I was able to compile pcatoy and convertf but not smartpca. On Ubuntu 18.04, I make clobber; make install and get the "fatal error: lapacke.h" fail. If I'm going to specify a path for lapacke, dpkg gives me choices:

/usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/liblapacke.so.3.7.1 /usr/lib/x86_64-linux-gnu/pkgconfig /usr/lib/x86_64-linux-gnu/pkgconfig/lapacke.pc /usr/share /usr/share/doc /usr/share/doc/liblapacke /usr/share/doc/liblapacke/copyright /usr/lib/x86_64-linux-gnu/liblapacke.so.3

I've tried a few along the lines of make clobber LDFLAGS="-L/usr/lib/x86_64-linux-gnu/liblapacke.so.3"; make install with no different results. Suggestions? On a 20.04 machine, I get the same problem with libopenblas0.

Thanks!

MatthewMah commented 3 years ago

Missing header files (lapacke.h) need to have include paths specified with the -I option for CFLAGS. The -L option is for linking, which the build process will not reach if header files are not found.

locurran commented 3 years ago

Thanks! I got past most system dependency issues, probably lacked a -dev version. I do get the "missing lapacke symbols."

ksrc/kjg_gsl.o: In function kjg_gsl_dlange': kjg_gsl.c:(.text+0x4d2): undefined reference toLAPACKE_dlange' ksrc/kjg_gsl.o: In function kjg_gsl_dgeqrf': kjg_gsl.c:(.text+0x532): undefined reference toLAPACKE_dgeqrf' ksrc/kjg_gsl.o: In function kjg_gsl_dorgqr': kjg_gsl.c:(.text+0x598): undefined reference toLAPACKE_dorgqr' ksrc/kjg_gsl.o: In function kjg_gsl_SVD': kjg_gsl.c:(.text+0x885): undefined reference toLAPACKE_dgesvd' collect2: error: ld returned 1 exit status

: recipe for target 'smshrink' failed Following the README example: `make clobber LDLIBS="-llapacke"; make install OPENBLAS="/usr/lib/x86_64-linux-gnu/openblas"` (or LDLIBS="-liblapacke") does not correct it. This is with liblapacke and liblapacke-dev installed to /usr/lib/x86_64-linux-gnu/liblapacke.so.3.7.1 /usr/lib/x86_64-linux-gnu/pkgconfig /usr/lib/x86_64-linux-gnu/pkgconfig/lapacke.pc /usr/share/doc/liblapacke /usr/share/doc/liblapacke/copyright /usr/lib/x86_64-linux-gnu/liblapacke.so.3
MatthewMah commented 3 years ago

Try:

make LDFLAGS="-L/usr/lib/x86_64-linux-gnu" LDLIBS="-llapacke"
locurran commented 3 years ago

Adding the flags and dropping "clobber" seems to have done it - thanks!

s.. apt install libopenblas-dev libopenblas-base libgslblas0 libgsl-dev liblapacke liblapacke-dev; cd src/; make LDFLAGS="-L/usr/lib/x86_64-linux-gnu" LDLIBS="-llapacke"; make install