2025-06-20 01:44 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005413Spring engineLinuxpublic2016-12-11 10:53
Reporterapoleon 
Assigned ToKloot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
Product Version103.0 
Target VersionFixed in Version 
Summary0005413: spring 103.0 FTBFS on i386 Debian GNU/Linux relocation R_386_GOTOFF against preemptible symbol _ZNSt6vectorIfSaIfEED1Ev
DescriptionHi,

spring fails to build from source on i386 (i686) on Debian GNU/Linux. This might be a regression in another package, binutils, but I would like to hear your opinion before I reassign the bug report.

https://bugs.debian.org/846921

Full build log is at

https://buildd.debian.org/status/fetch.php?pkg=spring&arch=i386&ver=103.0%2Bdfsg-1%2Bb3&stamp=1480849121

This issue only occurs on a 32 bit architecture like i386 (other distributions call it i686). The game builds fine on x86_64.

Apparently the issue is linked to GNU's gold linker. When I remove the code in

rts/build/cmake/TestCXXFlags.cmake

and disable passing -fuse-ld=gold to the compiler, spring builds fine again.

Do you think this is a bug in Spring or is GNU's gold linker to blame here.

Thanks,

Markus
Steps To ReproduceRebuild spring for Debian GNU/Linux on i386 (i686)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0016934

abma (administrator)

Last edited: 2016-12-06 21:10

View 2 revisions

i didn't fully investigate, just some thoughts:

from https://buildd.debian.org/status/fetch.php?pkg=spring&arch=i386&ver=103.0%2Bdfsg-1%2Bb3&stamp=1480849121 :

CMake Warning at CMakeLists.txt:34 (Message):
  Using custom C_FLAGS: -g -O2
  -fdebug-prefix-map=/«BUILDDIR»/spring-103.0+dfsg=.
  -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
  -D_FORTIFY_SOURCE=2 this build will very likely not sync in online mode!

_ZNSt6vectorIfSaIfEED1Ev is std::vector<float, std::allocator<float> >::~vector()



the code triggering this linking error very likely are these static vars:
https://github.com/spring/spring/blob/develop/AI/Wrappers/LegacyCpp/AIAICallback.cpp#L68

for LegacyCpp a static lib is created (libLegacyCpp.a) which then is later linked into the shared lib (libSkirmishAI.so)

as 103.0 is out for a while i vote for a bug in gold/gcc ;-)

~0016935

Kloot (developer)

Last edited: 2016-12-06 22:55

View 2 revisions

Errors like these should normally only occur when x86-64 shared object code isn't compiled as position-independent.

On 32-bit platforms all Spring sources are compiled without the PIC flag, so you could try adding that to satisfy the linker. I am reasonably certain i386 .so code is only *relocatable* out of the box (despite the claim in build/cmake/Util.cmake), but this does seem like a regression in ld.

~0016942

abma (administrator)

indeed, i missed that:

-- gcc 6.2.1 detected

~0016945

apoleon (reporter)

I switched to the default linker for now because the binutils maintainer won't fix the bug in time for the next stable release. As soon as this is resolved I will revert the change. I think this bug report can be closed now. Thanks for your replies.
+Notes

-Issue History
Date Modified Username Field Change
2016-12-06 20:03 apoleon New Issue
2016-12-06 21:06 abma Note Added: 0016934
2016-12-06 21:10 abma Note Edited: 0016934 View Revisions
2016-12-06 22:53 Kloot Note Added: 0016935
2016-12-06 22:55 Kloot Note Edited: 0016935 View Revisions
2016-12-07 14:42 abma Note Added: 0016942
2016-12-09 13:42 apoleon Note Added: 0016945
2016-12-11 10:53 Kloot Assigned To => Kloot
2016-12-11 10:53 Kloot Status new => closed
2016-12-11 10:53 Kloot Resolution open => no change required
+Issue History