AnsweredAssumed Answered

Compiling shared libraries for PETSc

Question asked by yurtesen on Jun 5, 2012
Latest reply on Jun 27, 2012 by yurtesen

I am trying to build PETSc with shared libraries. I have given --sharedLibraryFlags="-fPIC -shared" option yet I am getting the error below. Is it possible that open64 is accidentally using libopen64rt.a instead of libopen64rt_shared.a ? (I am not sure at what point PETSc is passing -fPIC -shared options. This compiles fine on GCC. Any ideas?



Completed building libraries


making shared libraries in /export/tmp/petsc-3.2-p7/arch-linux2-c-opt/lib




relocation R_X86_64_32S against `.rodata'

a shared object; recompile with -fPIC


could not read symbols: Bad value 

collect2: ld returned 1 exit status


Now to install the libraries do:

make PETSC_DIR=/export/tmp/petsc-3.2-p7 PETSC_ARCH=arch-linux2-c-opt