haskell-numerics / hmatrix

Linear algebra and numerical computation
381 stars 104 forks source link

Linker failure on Linux #237

Open chiraag-nataraj opened 7 years ago

chiraag-nataraj commented 7 years ago

Currently having a problem building on Linux with the system libraries. I get the following error:

/usr/bin/ld: /gpfs/runtime/opt/blas/3.5.0/lib/libblas.a(sgemm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/gpfs/runtime/opt/blas/3.5.0/lib/libblas.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

As per this, I tried using --ghc-options=-fPIC --gcc-options=-fPIC, but that didn't help, and by all appearances those flags should already be added anyway since my arch is x86_64.

joseedil commented 6 years ago

Are you on Arch Linux?

chiraag-nataraj commented 6 years ago

Nope, I think I was building this on a cluster which runs CentOS.