View Issue Details

IDProjectCategoryView StatusLast Update
0002415Spring engineGeneralpublic2011-05-09 19:37
Reporterjandd Assigned Toabma  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.82.7.1 
Summary0002415: spring 0.82.7.1 fails to build with gcc 4.6.0
DescriptionHello,

Debian unstable uses g++ 4.6.0 to provide default g++ since April 29th. Apparently spring fails to build from source using this g++ version. Are you already working on support for g++ 4.6.0?
Additional Informationhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625097
TagsNo tags attached.
Attached Files
ftbfs-fix-625097.patch (Attachment missing)
Checked infolog.txt for Errors

Activities

abma

2011-05-02 19:54

administrator   ~0006582

i reported this upstream: https://github.com/Error323/E323AI/issues/52

(as error is while compiling an ai not in the spring repo)

hoijui

2011-05-02 20:44

reporter   ~0006583

i (most likely) fixed this, but...
it looks like it stopped compiling after the first file with errors, is that the case?
if so, it would be nice to have a compile log that would continue, to make sure there is not more that would fail to compile.

abma

2011-05-03 09:33

administrator   ~0006584

http://springrts.com/phpbb/viewtopic.php?f=11&t=25885

abma

2011-05-03 09:48

administrator   ~0006585

Last edited: 2011-05-03 10:01

i tried myself with gcc 4.6, engine compiles fine, but now i get these linker errors:

http://pastebin.com/JCTzW5xe

any idea about that? can't see an error here...

hoijui

2011-05-03 10:16

reporter   ~0006586

Google search for LuaOpenGLUtils finds practically nothing:
http://www.google.com/#sclient=psy&hl=de&site=&source=hp&q=LuaOpenGLUtils&aq=&aqi=&aql=&oq=&pbx=1&fp=e26f07571d801bb9&biw=1164&bih=657

It is also not in spring source.

rts/Lua/LuaOpenGL.cpp:4369
there is a static, global function GetNamedMatrix. your linker seems to be missing a LuaOpenGLUtils::GetNamedMatrix ... no idea where it gets that class-name or namespace LuaOpenGLUtils from :/

It looks like AssParser.cpp is missing:
#include "3DModelLog.h"

abma

2011-05-03 10:27

administrator   ~0006587

doh! after a clean build it worked... sorry

jandd

2011-05-03 13:30

reporter   ~0006588

build continues with hoijui's patch but fails later:

Building CXX object rts/builds/default/CMakeFiles/engine-default.dir/__/__/Lua/LuaMaterial.cpp.o
cd /tmp/buildd/spring-0.82.7.1+dfsg1/obj-x86_64-linux-gnu/rts/builds/default && /usr/bin/g++ -DSYNCCHECK -DSPRING_DATADIR=\"/usr/share/games/spring:/usr/lib/spring\" -DSTREFLOP_SSE -g -O2 -msse -mfpmath=sse -fsingle-precision-constant -frounding-math -mieee-fp -pipe -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pthread -O2 -DNDEBUG -g -I/tmp/buildd/spring-0.82.7.1+dfsg1/rts/lib/lua/include -I/usr/include/SDL -I/tmp/buildd/spring-0.82.7.1+dfsg1/rts -I/tmp/buildd/spring-0.82.7.1+dfsg1/rts/System -I/usr/include/AL -I/usr/include/freetype2 -o CMakeFiles/engine-default.dir/__/__/Lua/LuaMaterial.cpp.o -c /tmp/buildd/spring-0.82.7.1+dfsg1/rts/Lua/LuaMaterial.cpp
/tmp/buildd/spring-0.82.7.1+dfsg1/rts/Lua/LuaMaterial.cpp: In member function 'void LuaMaterial::Execute(const LuaMaterial&) const':
/tmp/buildd/spring-0.82.7.1+dfsg1/rts/Lua/LuaMaterial.cpp:383:91: error: taking address of temporary [-fpermissive]

the build is done in a clean chroot containing just the build dependencies. According to https://bugs.launchpad.net/unity/+bug/745392 this seems to be related to new behaviour in g++ 4.6.0

jandd

2011-05-03 13:39

reporter   ~0006589

seems to be related to http://springrts.com/phpbb/viewtopic.php?f=12&t=25559

jandd

2011-05-03 18:06

reporter   ~0006590

I applied the attached patch to the 0.87.2.1 sources and could build a Debian package with g++ 4.6.0 in a clean Debian sid chroot.

abma

2011-05-03 18:45

administrator   ~0006591

looks like i'm a bit confused these days, didn't see that you tried to compile the stable version.

@hoijui:
is it worth to apply that to 0.82.7.1? imo not...

hoijui

2011-05-03 20:25

reporter   ~0006592

we would add this patch/commit it if we would do an other 0.82 release, which is unlikely. no need to add it now.

jandd... i guess, this LuaMaterial.cpp:383 error was only the next one, and it stopped compiling again after that?
i (most likely) fixed that one too now, but it would really be nice if you could get me the list of all errors, instead of one by one!

jandd

2011-05-03 21:08

reporter   ~0006594

the LUAMaterial issue was fixed by the (rebased) patch in http://springrts.com/phpbb/viewtopic.php?f=12&t=25559

There were two more missing #include <cstddef> in rts/Rendering/GLContext.cpp and rts/System/MemPool.h

After these fixes (all included in my attached patch) the build went fine.

hoijui

2011-05-09 11:54

reporter   ~0006623

i think spring master should now be fine for gcc 4.6.0.
could someone please check?

if so, i would say we can close this report, or would we have to do something about the patched 0.82.7.1 code as well, jandd?

jandd

2011-05-09 14:25

reporter   ~0006628

I think it is sufficient if master is working fine so that I can drop the Debian patch for the next upstream release.

The full patch for 0.82.7.1 is available in our Debian git repo at http://git.debian.org/?p=pkg-games/spring.git;a=blob_plain;f=debian/patches/ftbfs-fix-625097.patch;hb=HEAD and everone who needs it can pull it from there.

I think it is not necessary to release a new 0.82.7.x version because of this issue.

abma

2011-05-09 19:37

administrator   ~0006630

compiling spring/master works well with gcc 4.6

as noted, it won't be fixed in current stable.

Issue History

Date Modified Username Field Change
2011-05-02 15:35 jandd New Issue
2011-05-02 19:54 abma Note Added: 0006582
2011-05-02 20:44 hoijui Note Added: 0006583
2011-05-03 09:33 abma Note Added: 0006584
2011-05-03 09:48 abma Note Added: 0006585
2011-05-03 09:48 abma Note Edited: 0006585
2011-05-03 10:01 abma Note Edited: 0006585
2011-05-03 10:16 hoijui Note Added: 0006586
2011-05-03 10:27 abma Note Added: 0006587
2011-05-03 10:27 abma Status new => resolved
2011-05-03 10:27 abma Resolution open => fixed
2011-05-03 10:27 abma Assigned To => abma
2011-05-03 13:30 jandd Note Added: 0006588
2011-05-03 13:30 jandd Status resolved => assigned
2011-05-03 13:30 jandd Resolution fixed => reopened
2011-05-03 13:39 jandd Note Added: 0006589
2011-05-03 18:06 jandd Note Added: 0006590
2011-05-03 18:06 jandd File Added: ftbfs-fix-625097.patch
2011-05-03 18:45 abma Note Added: 0006591
2011-05-03 20:25 hoijui Note Added: 0006592
2011-05-03 20:34 abma Status assigned => confirmed
2011-05-03 20:34 abma Resolution reopened => open
2011-05-03 20:34 abma Summary spring fails to build from source using g++ 4.6.0 => spring 0.82.7.1 fails to build with gcc 4.6.0
2011-05-03 20:34 abma Assigned To abma =>
2011-05-03 21:08 jandd Note Added: 0006594
2011-05-09 11:54 hoijui Note Added: 0006623
2011-05-09 14:25 jandd Note Added: 0006628
2011-05-09 19:37 abma Note Added: 0006630
2011-05-09 19:37 abma Status confirmed => resolved
2011-05-09 19:37 abma Resolution open => fixed
2011-05-09 19:37 abma Assigned To => abma