#3869 closed defect (fixed)
[PATCH] Build error at Fedora 23
Reported by: | bb | Owned by: | Itms |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 21 |
Component: | Build & Packages | Keywords: | patch |
Cc: | Patch: |
Description
The build of svn, A19 and A20 fails at Fedora 23 when linking tests. It gives the following error:
/usr/bin/ld: obj/test_Release/test_root.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC obj/test_Release/test_root.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status test.make:163: recipe for target '../../../binaries/system/test' failed make[1]: *** [../../../binaries/system/test] Error 1 Makefile:92: recipe for target 'test' failed make: *** [test] Error 2
Attached patch resolves the error and let the game run normally (it has been applied for me last few month).
Attachments (2)
Change History (9)
by , 8 years ago
Attachment: | t3869_BuildError.diff added |
---|
comment:1 by , 8 years ago
Keywords: | review removed |
---|
comment:2 by , 8 years ago
Debian also provide a hardening patch that may be useful to look at, see #1416.
comment:3 by , 8 years ago
I think a proper fix would be to add a --hardened
flag to our premake scripts, for people who need/want that.
comment:4 by , 8 years ago
/usr/bin/ld: obj/test_Release/test_root.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC obj/test_Release/test_root.o: error adding Symbols: Bad value
How could more output be added to determine the cause?
comment:5 by , 8 years ago
Keywords: | review added |
---|
This patch, more minimal, fixes the issue for me on Fedora 24.
On second thought, adding this build flag doesn't seem too much of a big change (we already use it for Atlas, and it is not a breaking change but rather a small tweak in the compilation process).
However it would need intensive testing on all flavors of Linux and BSD. Could people test that on as many platforms as possible and report on the ticket? Thanks.
by , 8 years ago
Attachment: | 0001-Build-with-fPIC.patch added |
---|
The patch seems really hacky and could cause problems (you add this new flag for all Linux and BSD platforms...)
Could you try to understand why the problem happens specifically on your system? So we can fix this less "brutally" ;)