Oct 13, 2015 at 9:32pm UTC
Hi,
I have yet again run into a compilation problem. I have downloaded the openBLAS libraries and compiled them without error. So far so good. The I would like to link it statically in a make file. This is the line which links it:
< BLAS_LIBS = -L/opt/OpenBLAS/lib -Wl, -Bstatic -lopenblas -Wl,-rpath=/usr/lib/i386-linux-gnu -Bdynamic -lgfortran -Wl,-rpath=/usr/lib/i386-linux-gnu -Bdynamic -lpthread >
This ends up producing an error(on both Fedora 18 and Ubuntu):
/usr/bin/ld: cannot find : No such file or directory
collect2: error: ld returned 1 exit status
libgfortran and libpthread static and dynamic libs are in the rpath. Does anybody now why rpath is ignored?
Thanks,
Z
Oct 14, 2015 at 7:27pm UTC
ok I figured this out. This leads to error because of number of white spaces between -Wl, and what follows that. This one run very well:
< BLAS_LIBS = -L/opt/OpenBLAS/lib -Wl,-Bstatic -lopenblas -L/usr/lib/i386-linux-gnu/ -Wl,-Bdynamic -lgfortran -lpthread >
The solution is to have no space between -Wl, and -Bdynamic and static.
Z