Molcas Forum

Support and discussions for Molcas and OpenMolcas users and developers

You are not logged in.

Announcement

Welcome to the Molcas forum.

Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!

You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".

#1 2020-04-28 13:52:41

tikim
Member
Registered: 2020-04-26
Posts: 2

compile error with message " recompile with -fPIC"

I have tried to compile openmolcas with NECI library.

As a result, I have this error:

ld: /home/tikim/lib/hdf5-1.8.20/build/lib/libhdf5_fortran.a(H5_ff.o): relocation R_X86_64_32 against `predefined_types_' can not be used when making a shared object; recompile with -fPIC
/home/tikim/lib/hdf5-1.8.20/build/lib/libhdf5_fortran.a: error adding symbols: Bad value
make[2]: *** [lib/libdneci.so] Error 1
make[1]: *** [External/NECI/src/CMakeFiles/libdneci.dir/all] Error 2
make: *** [all] Error 2

Now, I try to add flags '-fPIC' to CMAKE_Fortran_FLAGS but it does not fix this problem.

I don't know what I should do.

Offline

#2 2020-04-29 08:48:28

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: compile error with message " recompile with -fPIC"

Maybe HDF5 should be compiled with -fPIC ?

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 22:44:57