PHCpack
PHCpack copied to clipboard
recompile with -fPIC in Debian
During the installation process, I followed step 1 to 6 of: http://homepages.math.uic.edu/~jan/phcpy_doc_html/welcome.html
and ended up with the following issue while running make phcpy2c2.so
:
/opt/GNAT/2018/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: phcpy2c2.a(verify_solution_maps.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/GNAT/2018/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
makefile_unix:3553: recipe for target 'phcpy2c2.so' failed
make[1]: *** [phcpy2c2.so] Error 1
So I should recompile using -fPIC
, but what?
Please note several points/discrepancies:
- step 1: after the installation of the gnu-ada compiler from https://www.adacore.com/download,
gcc -v
returnsfor GNAT Community
and notfor GNAT GPL
- step 2: (qd libraries) has been run using
-fPIC
flag thenmake
andmake install
- step 3:
make phc
didn't return issues
Thanks for reporting the updated message for gcc -v with the latest version of the gnu-ada compiler.
I'm unsure to understand, is this causing the problem? What should I do? (I probably forgot many important informations for you to help me, have no hesitation to ask whatever is relevant)
I had the same problem and I found a way to fix it. If you did the make phc
test in step 3 then try make clean
in the Object directory and do make phcpy2c3.so
directly (as I am using python 3.8) so in your case make phcpy2c2.so
should work. I don't know why but this solved my problem.