I am encountering an error when compiling a fortran program: since I have a makefile provided, I open the working directory in the terminal and type make. Unfortunately I get this error:
relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
makefile:43: recipe for target '<name>' failedActually I don't get how to "recompile with -fPIC".
I've tried typing make -fPIC and adding something like:
CFLAGS = -fPIC
CXXFLAGS = -fPIC
to the makefile, but both haven't worked.
Any help is appreciated, thanks.