0

I have armadillo 8 installed (Ubuntu 18.04), but I'm finding it necessary to install version 9.2 with superLU for sparse matrices. I have installed superLU 5.2 but I'm getting the following error in making armadillo 9:

usr/bin/ld: /usr/local/lib/libsuperlu.a(util.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/armadillo.dir/build.make:98: recipe for target 'libarmadillo.so.9.200.4' failed
make[2]: *** [libarmadillo.so.9.200.4] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/armadillo.dir/all' failed
make[1]: *** [CMakeFiles/armadillo.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

What can I do to fix this?

Amit Rotem
  • 66
  • 1
  • Possible duplicate of ["relocation R\_X86\_64\_32S against " linking Error](https://stackoverflow.com/questions/19768267/relocation-r-x86-64-32s-against-linking-error) – Tsyvarev Nov 19 '18 at 21:09
  • 1
    If it is not possible to install apt with dynamic libsuperlu, then you can build libsuperlu by yourself. It's not that hard. Use `-DBUILD_SHARED_LIBS=ON` when generating makefile with CMake. – Sergei Nikulov Nov 20 '18 at 13:02
  • Adding -DBUILD_SHARED_LIBS=ON works! – Amit Rotem Nov 22 '18 at 00:12

0 Answers0