Hi~
I met an error when I use Cmake to compile PreCICE.
[ 60%] Building CXX object CMakeFiles/precice.dir/src/utils/MasterSlave.cpp.o
[ 60%] Building CXX object CMakeFiles/precice.dir/src/utils/Parallel.cpp.o
[ 61%] Building CXX object CMakeFiles/precice.dir/src/utils/Petsc.cpp.o
[ 61%] Building CXX object CMakeFiles/precice.dir/src/utils/String.cpp.o
[ 62%] Building CXX object CMakeFiles/precice.dir/src/utils/TableWriter.cpp.o
[ 62%] Building CXX object CMakeFiles/precice.dir/src/utils/stacktrace.cpp.o
[ 63%] Building CXX object CMakeFiles/precice.dir/src/xml/ConfigParser.cpp.o
[ 63%] Building CXX object CMakeFiles/precice.dir/src/xml/XMLTag.cpp.o
[ 64%] Linking CXX shared library libprecice.so
/usr/bin/ld: /usr/local/lib/liblapack.a(dgeev.o): relocation R_X86_64_32 against `.rodata’ can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/liblapack.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libprecice.so.1.6.1] Error 1
make[1]: *** [CMakeFiles/precice.dir/all] Error 2
make: *** [all] Error 2
I have try to add the following words at the beginning of the CMakeLists.txt but the error still appeared.
add_compile_options(-fPIC)
- [C++ compiler] (gcc 5.5)
- CMake
- [Boost] (1.71)
Can anyone help me? Thanks~