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

Error: relocation "" can not be used when making a PIE object; recompile with -fPIE #14

Open
papaig opened this issue Feb 26, 2024 · 3 comments

Comments

@papaig
Copy link

papaig commented Feb 26, 2024

Hi,

I tried to compile AreTomo2 based on the instruction provided in the README file with CUDA 12.0. I received this error during the compilation:
PatchAlign/GNormByStd2D.cu has been compiled.
/usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libmrcfile.a(CLoadExtHeader.o): relocation R_X86_64_32 against symbol __gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libmrcfile.a(CSaveMainHeader.o): relocation R_X86_64_32 against symbol __gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libmrcfile.a(CLoadImage.o): relocation R_X86_64_32 against symbol __gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libmrcfile.a(CLoadMrc.o): relocation R_X86_64_32 against symbol __gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libmrcfile.a(CSaveMrc.o): relocation R_X86_64_32 against symbol __gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libutil.a(Util_FileName.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libutil.a(Util_String.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libutil.a(Util_LinEqs.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libutil.a(Util_Powell.o): relocation R_X86_64_32 against symbol _ZTV11Util_Powell' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: /home/papai/software/AreTomo2/LibSrc/Lib/libutil.a(Util_Thread.o): relocation R_X86_64_32 against symbol _ZTV11Util_Thread' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
make: *** [makefile11:183: exe] Error 1
My GNU make version is 4.3, gcc version is 10.2.1.
I would be grateful if you could help me to resolve this issue.
Thank you in advance for your help!
Gabor

@Srichnew
Copy link

Hi there, I too had the same issue. Any help/advice you can give would be awesome!

Thank you,
Shane

@Vilax
Copy link

Vilax commented Mar 15, 2024

Dear @Srichnew

I had the same issue in gCTFfind. In the next post you can find a solution:

czimaginginstitute/GCtfFind#7

You only need to modify the makefile adding -lpthread -no-pie

I hope this helps

Best

@Srichnew
Copy link

Srichnew commented Mar 15, 2024 via email

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