#847356 spring: FTBFS on i386: relocation R_386_GOTOFF against preemptible symbol _ZNSt6vectorIfSaIfEED1Ev cannot be used when making a shared object

Package:
src:binutils
Source:
binutils
Submitter:
Emilio Pozuelo Monfort
Date:
2017-10-14 17:18:05 UTC
Severity:
important
#847356#5
Date:
2016-12-04 11:03:11 UTC
From:
To:
Your package failed to build on i386:

/usr/bin/c++  -fPIC -g -O2 -fdebug-prefix-map=/«BUILDDIR»/spring-103.0+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fuse-ld=gold  -std=gnu++11 -fdiagnostics-color=always -march=i686 -msse -mfpmath=sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a -mno-avx -mno-fma -mno-fma4 -mno-xop -mno-lwp -mno-avx2 -fsingle-precision-constant -frounding-math -mieee-fp -pipe -fno-strict-aliasing  -fvisibility=hidden  -fvisibility-inlines-hidden -pthread  -O2      -Wformat -Wformat-security -DNDEBUG -g -Wl,-z,relro -shared  -o libSkirmishAI.so CMakeFiles/RAI.dir/AIExport.cpp.o CMakeFiles/RAI.dir/Builder.cpp.o CMakeFiles/RAI.dir/BuilderPlacement.cpp.o CMakeFiles/RAI.dir/CombatManager.cpp.o CMakeFiles/RAI.dir/GResourceMap.cpp.o CMakeFiles/RAI.dir/GTerrainMap.cpp.o CMakeFiles/RAI.dir/LogFile.cpp.o CMakeFiles/RAI.dir/PowerManager.cpp.o CMakeFiles/RAI.dir/RAI.cpp.o CMakeFiles/RAI.dir/SWeaponManager.cpp.o CMakeFiles/RAI.dir/UnitDefHandler.cpp.o CMakeFiles/RAI.dir/UnitManager.cpp.o ../../Wrappers/LegacyCpp/libLegacyCpp.a ../../Wrappers/CUtils/libCUtils.a
[ 16%] Building CXX object AI/Wrappers/Cpp/CMakeFiles/Cpp-AIWrapper.dir/src-generated/WrappFile.cpp.o
cd /«BUILDDIR»/spring-103.0+dfsg/obj-i686-linux-gnu/AI/Wrappers/Cpp && /usr/bin/c++   -DBOOST_NO_FENV_H -DBUILDING_AI -DSPRING_DATADIR=\"/usr/share/games/spring:/usr/lib/spring\" -DSYNCCHECK -DTHREADPOOL -DUSE_LIBSQUISH -D_GLIBCXX_USE_NANOSLEEP -D_GNU_SOURCE=1 -D_RANDOM_TCC -D_REENTRANT -I/«BUILDDIR»/spring-103.0+dfsg/rts -I/«BUILDDIR»/spring-103.0+dfsg/obj-i686-linux-gnu/src-generated/engine -I/«BUILDDIR»/spring-103.0+dfsg/rts/ExternalAI/Interface -I/«BUILDDIR»/spring-103.0+dfsg/AI/Wrappers -I/«BUILDDIR»/spring-103.0+dfsg/AI/Wrappers/Cpp/src -I/«BUILDDIR»/spring-103.0+dfsg/obj-i686-linux-gnu/AI/Wrappers/Cpp/src-generated  -g -O2 -fdebug-prefix-map=/«BUILDDIR»/spring-103.0+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fuse-ld=gold  -std=gnu++11 -fdiagnostics-color=always -march=i686 -msse -mfpmath=sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a -mno-avx -mno-fma -mno-fma4 -mno-xop -mno-lwp -mno-avx2 -fsingle-precision-constant -frounding-math -mieee-fp -pipe -fno-strict-aliasing  -fvisibility=hidden  -fvisibility-inlines-hidden -pthread  -O2      -Wformat -Wformat-security -DNDEBUG -g   -o CMakeFiles/Cpp-AIWrapper.dir/src-generated/WrappFile.cpp.o -c /«BUILDDIR»/spring-103.0+dfsg/obj-i686-linux-gnu/AI/Wrappers/Cpp/src-generated/WrappFile.cpp
/usr/bin/ld.gold: error: ../../Wrappers/LegacyCpp/libLegacyCpp.a(AIAICallback.cpp.o): relocation R_386_GOTOFF against preemptible symbol _ZNSt6vectorIfSaIfEED1Ev cannot be used when making a shared object
/usr/bin/ld.gold: error: ../../Wrappers/LegacyCpp/libLegacyCpp.a(AIAICallback.cpp.o): relocation R_386_GOTOFF against preemptible symbol _ZNSt6vectorItSaItEED1Ev cannot be used when making a shared object
/usr/bin/ld.gold: error: ../../Wrappers/LegacyCpp/libLegacyCpp.a(AIAICallback.cpp.o): relocation R_386_GOTOFF against preemptible symbol _ZNSt6vectorIhSaIhEED1Ev cannot be used when making a shared object
collect2: error: ld returned 1 exit status

Logs at https://buildd.debian.org/status/package.php?p=spring

Emilio

#847356#10
Date:
2016-12-06 19:10:54 UTC
From:
To:
Control: forwarded -1 https://springrts.com/mantis/view.php?id=5413

[...]

I am not sure but this could also be a regression due to one of the
recent uploads for binutils. Apparently GNU's gold linker behaves
differently now. If I don't pass -fuse-ld=gold to CXX flags, everything
builds fine on i386.

I have forwarded this bug report upstream to get some feedback.

Markus

#847356#17
Date:
2016-12-07 13:46:47 UTC
From:
To:
clone 846921 -1
reassign -1 src:binutils
thanks


Hello,

spring recently started failing to build from source on i386 but it
continues to build fine on amd64. After I modified the build system and
stopped passing -fuse-ld=gold to CXX flags the compilation succeeds again.

The full build log can be found at:

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

Since this used to work in the past and amd64 appears not to be
affected, I presume that one of the latest uploads for binutils
introduced a regression. The upstream developers of spring appear to
share this opinion as well. [1]

I have cloned the original bug report and reassigned it to binutils. I
am not sure if this issue is related to #844227 hence I didn't merge the
bug reports. Do you agree with this assessment?

Regards,

Markus


[1] https://springrts.com/mantis/view.php?id=5413

#847356#22
Date:
2016-12-07 13:58:22 UTC
From:
To:
clone 846921 -1
reassign -1 src:binutils
thanks


Hello,

spring recently started failing to build from source on i386 but it
continues to build fine on amd64. After I modified the build system and
stopped passing -fuse-ld=gold to CXX flags the compilation succeeds again.

The full build log can be found at:

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

Since this used to work in the past and amd64 appears not to be
affected, I presume that one of the latest uploads for binutils
introduced a regression. The upstream developers of spring appear to
share this opinion as well. [1]

I have cloned the original bug report and reassigned it to binutils. I
am not sure if this issue is related to #844227 hence I didn't merge the
bug reports. Do you agree with this assessment?

Regards,

Markus


[1] https://springrts.com/mantis/view.php?id=5413

#847356#33
Date:
2016-12-08 14:29:06 UTC
From:
To:
Control: severity -1 important

no, it's not a RC issue, you use the BFD linker.

#847356#40
Date:
2017-10-12 21:37:09 UTC
From:
To:
Apparently this was fixed in the meantime. It is no longer an issue for
spring 104. Feel free to close this bug report.

Markus

#847356#45
Date:
2017-10-14 17:15:46 UTC
From:
To:
It seems I was wrong. Still reproducible with spring 104.0 on i386.