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

Linker error clang-8 #39

Closed
yobson opened this issue Apr 20, 2019 · 4 comments
Closed

Linker error clang-8 #39

yobson opened this issue Apr 20, 2019 · 4 comments

Comments

@yobson
Copy link

yobson commented Apr 20, 2019

I've tried to build this on two platforms with clang 8 and both failed for the same reason. I get the following linker error:

 Linking subproject Additions ...
clang-8: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
/usr/bin/ld: -r and -pie may not be used together
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [/usr/local/share/GNUstep/Makefiles/Instance/subproject.make:61: obj/subproject.o] Error 1
make[3]: *** [/usr/local/share/GNUstep/Makefiles/Instance/subproject.make:45: internal-subproject-all_] Error 2
make[2]: *** [/usr/local/share/GNUstep/Makefiles/Master/rules.make:297: Additions.all.subproject.variables] Error 2
make[1]: *** [/usr/local/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2
make: *** [/usr/local/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2

It's the same on both platforms. The two platforms are:

  • Manjaro Linux
  • Termux (android)

I was just following these instructions both times.

Thanks for your time!
James

@yobson
Copy link
Author

yobson commented Apr 27, 2019

I've worked it out! Both systems enforce PIE (I think? I know android does now) and the gnustep-make config incorrectly uses -Wl,-r instead of -r. I'll admit I have no idea why or how to make a fix but I thought you should know. I hear PIE by default is in fashion!

@yobson
Copy link
Author

yobson commented Apr 28, 2019

Well. I'm getting seg faults in all graphical applications now. Might not be related, but maybe this linking change has made a difference!

@AlessandroSangiuliano
Copy link

On Manjaro I solved (work around, was Genuary I think) passing -no-pie at build time.

Try it because i don't remember if it was sufficient.

@triplef
Copy link
Member

triplef commented Mar 28, 2021

This should be fixed with the latest GNUstep Make via this change that removes the -r flag when linking:
gnustep/tools-make@ce9d4f5

@triplef triplef closed this as completed Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants