Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recompile with -fPIC in Debian #24

Open
bruno066 opened this issue Aug 9, 2018 · 3 comments
Open

recompile with -fPIC in Debian #24

bruno066 opened this issue Aug 9, 2018 · 3 comments

Comments

@bruno066
Copy link

bruno066 commented Aug 9, 2018

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 returns for GNAT Community and not for GNAT GPL
  • step 2: (qd libraries) has been run using -fPIC flag then make and make install
  • step 3: make phc didn't return issues
@janverschelde
Copy link
Owner

Thanks for reporting the updated message for gcc -v with the latest version of the gnu-ada compiler.

@bruno066
Copy link
Author

bruno066 commented Aug 15, 2018

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)

@IsayamaYoomi
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants