armagetronad version 0.2.8.3.1-1 failed to build on i386

Bug #765939 reported by Matthias Klose
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
armagetronad (Debian)
Fix Released
Unknown
armagetronad (Ubuntu)
Fix Released
High
Unassigned
Oneiric
Fix Released
High
Unassigned

Bug Description

armagetronad version 0.2.8.3.1-1 failed to build on i386
Link to failed build: https://launchpad.net/ubuntu/+archive/test-rebuild-20110413/+buildjob/2445691

Direct link to the build log: https://launchpad.net/ubuntu/+archive/test-rebuild-20110413/+buildjob/2445691/+files/buildlog_ubuntu-natty-i386.armagetronad_0.2.8.3.1-1_FAILEDTOBUILD.txt.gz

This log snippet might be of interest, since it triggered the matcher 'Purging chroot-autobuild'.
Excerpt 1804 lines into the build log:

../../src/tools/tDirectories.cpp:526:7: note: 'const class tPathVar' has no user-provided default constructor
../../src/tools/tDirectories.cpp:571:30: error: uninitialized const 'st_Screenshot' [-fpermissive]
../../src/tools/tDirectories.cpp:552:7: note: 'const class tPathScreenshot' has no user-provided default constructor
../../src/tools/tDirectories.cpp:633:28: error: uninitialized const 'st_Resource' [-fpermissive]
../../src/tools/tDirectories.h:59:7: note: 'const class tPathResource' has no user-provided default constructor
make[4]: *** [libtools_a-tDirectories.o] Error 1
make[4]: Leaving directory `/build/buildd/armagetronad-0.2.8.3.1/client/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/build/buildd/armagetronad-0.2.8.3.1/client/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd/armagetronad-0.2.8.3.1/client'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/armagetronad-0.2.8.3.1/client'
make: *** [build-client-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
******************************************************************************
Build finished at 20110419-0036
FAILED [dpkg-buildpackage died]
Purging chroot-autobuild/build/buildd/armagetronad-0.2.8.3.1

Matthias Klose (doko)
Changed in armagetronad (Ubuntu):
importance: Undecided → High
Revision history for this message
Manuel Moos (z-man) wrote :

Unless there are aspects of the upcoming new C++ standard (or the current standard) that elude me, this is a problem with the compiler. The various tPathX have no explicit constructor at all, hence the compiler should generate an automatic default constructor and use that for the initialization of the various st_X objects.

Obvious workarounds: add an empty default constructor.

Revision history for this message
x414e54 (x414e54) wrote :

I also had the same problem compiling on Fedora 15
$ uname -r
2.6.38.6-27.fc15.x86_64

$ g++ --version
g++ (GCC) 4.6.0 20110509 (Red Hat 4.6.0-7)

g++ -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I/usr/include/libxml2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/libpng12 -I./tools -O2 -Wno-long-long -MT libtools_a-tDirectories.o -MD -MP -MF .deps/libtools_a-tDirectories.Tpo -c -o libtools_a-tDirectories.o `test -f 'tools/tDirectories.cpp' || echo './'`tools/tDirectories.cpp
tools/tDirectories.cpp:502:26: error: uninitialized const ‘st_Config’ [-fpermissive]
tools/tDirectories.cpp:474:7: note: ‘const class tPathConfig’ has no user-provided default constructor
tools/tDirectories.cpp:523:24: error: uninitialized const ‘st_Data’ [-fpermissive]
tools/tDirectories.cpp:505:7: note: ‘const class tPathData’ has no user-provided default constructor
tools/tDirectories.cpp:549:23: error: uninitialized const ‘st_Var’ [-fpermissive]
tools/tDirectories.cpp:526:7: note: ‘const class tPathVar’ has no user-provided default constructor
tools/tDirectories.cpp:571:30: error: uninitialized const ‘st_Screenshot’ [-fpermissive]
tools/tDirectories.cpp:552:7: note: ‘const class tPathScreenshot’ has no user-provided default constructor
tools/tDirectories.cpp:633:28: error: uninitialized const ‘st_Resource’ [-fpermissive]
tools/tDirectories.h:59:7: note: ‘const class tPathResource’ has no user-provided default constructor
make[3]: *** [libtools_a-tDirectories.o] Error 1

Adding default constructors and it now compiles, I also moved the classes out of the .cpp file and into the .h file - I'm sure there is a reason why they are there?

I attached this a patch.

tags: added: patch
Changed in armagetronad (Ubuntu):
milestone: none → oneiric-alpha-3
Revision history for this message
dlh (dlh) wrote :

From <http://gcc.gnu.org/gcc-4.6/changes.html>:
"""
G++ no longer allows objects of const-qualified type to be default initialized unless the type has a user-declared default constructor. Code that fails to compile can be fixed by providing an initializer e.g.
    struct A { A(); };
    struct B : A { };
    const B b = B();

Use -fpermissive to allow the old, non-conforming behaviour.
"""

Also, see this gcc bug report: <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44499>

This issue was fixed in lp:armagetronad/0.2.8, but has not yet made it in to an official release.

This was the patch: <http://bazaar.launchpad.net/~armagetronad-dev/armagetronad/0.2.8-armagetronad-work/revision/1275>

Andreas Moog (ampelbein)
Changed in armagetronad (Ubuntu Oneiric):
status: New → Triaged
tags: added: universe
Changed in armagetronad (Ubuntu Oneiric):
milestone: oneiric-alpha-3 → none
Revision history for this message
dlh (dlh) wrote :

A fix will be released in 0.2.8.3.2, which is currently going through beta testing. 0.2.8.3.2 will also include a few security patches.

http://forums3.armagetronad.net/viewtopic.php?f=50&t=21778

Changed in armagetronad (Ubuntu Oneiric):
status: Triaged → In Progress
Revision history for this message
Daniel T Chen (crimsun) wrote :

I'll keep an eye on the forum for updates; in the meantime, I'm pushing this fix (r1275) to Oneiric and submitting to BTS.

Changed in armagetronad (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package armagetronad - 0.2.8.3.1-1ubuntu1

---------------
armagetronad (0.2.8.3.1-1ubuntu1) oneiric; urgency=low

  * Add 01_g++-4.6: Apply upstream r1275 to resolve FTBFS.
    (Closes: #625079) (LP: #765939)
 -- Daniel T Chen <email address hidden> Mon, 29 Aug 2011 20:36:45 -0400

Changed in armagetronad (Ubuntu Oneiric):
status: In Progress → Fix Released
Changed in armagetronad (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.