Automatic Build Fails on Ubuntu 12.04 because of 'override'

Bug #1284544 reported by Shevonar
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

The automatic builds here on launchpad fail because of the 'override' introduced in r6838.

From the buildlog [1]:
[ 70%] Building CXX object src/CMakeFiles/widelands_all.dir/io/dedicated_log.cc.o
cd /build/buildd/widelands-17-ppa0-bzr6842/build-debian/src && /usr/bin/c++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++0x -g -O3 -DNDEBUG -Wall -Wextra -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k -Winit-self -Winvalid-pch -Wmissing-include-dirs -Woverlength-strings -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-promo -Wswitch-default -Wundef -Wunused -Wunused-macros -Wlogical-op -Wsync-nand -Wtrampolines -I/build/buildd/widelands-17-ppa0-bzr6842/src -I/build/buildd/widelands-17-ppa0-bzr6842/build-debian/src -I/usr/include/SDL -o CMakeFiles/widelands_all.dir/io/dedicated_log.cc.o -c /build/buildd/widelands-17-ppa0-bzr6842/src/io/dedicated_log.cc
In file included from /build/buildd/widelands-17-ppa0-bzr6842/src/io/dedicated_log.h:24:0,
                 from /build/buildd/widelands-17-ppa0-bzr6842/src/io/dedicated_log.cc:20:
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:37:33: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:37:35: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:39:28: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:39:34: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:41:51: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:41:53: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:42:51: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:42:53: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:43:64: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:43:66: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:44:64: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:44:66: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:46:64: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:46:66: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:48:59: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:48:61: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:52:81: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:52:83: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:55:65: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:55:67: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:56:65: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:56:67: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:58:68: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:58:70: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:59:76: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:59:78: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:60:46: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:60:48: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:61:80: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:61:82: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:63:34: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:63:36: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:64:39: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/disk_filesystem.h:64:41: error: 'override' does not name a type
In file included from /build/buildd/widelands-17-ppa0-bzr6842/src/io/dedicated_log.cc:25:0:
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:58:33: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:58:35: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:60:28: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:60:34: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:61:61: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:61:63: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:62:61: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:62:63: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:63:64: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:63:66: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:64:64: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:64:66: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:66:64: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:66:66: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:68:59: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:68:61: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:70:64: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:70:66: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:72:65: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:72:67: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:73:65: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:73:67: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:75:68: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:75:70: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:76:76: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:76:78: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:77:46: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:77:48: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:78:62: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:78:64: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:80:34: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:80:36: error: 'override' does not name a type
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:87:39: error: expected ';' at end of member declaration
/build/buildd/widelands-17-ppa0-bzr6842/src/io/filesystem/layered_filesystem.h:87:41: error: 'override' does not name a type
make[4]: *** [src/CMakeFiles/widelands_all.dir/io/dedicated_log.cc.o] Error 1

The problem is that the c++0x standard is used instead of c++11. Additionally override requires GCC 4.7. Currently GCC 4.6 is used to build Widelands on launchpad. Can we change this?

[1] https://launchpadlibrarian.net/167523351/buildlog_ubuntu-precise-i386.widelands_1%3A17-ppa0-bzr6842-201402250610~ubuntu12.04.1_FAILEDTOBUILD.txt.gz

Tags: ftbfs
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Fwiw, this is only affecting builds on 12.04, not newer releases.

We've discussed this a bit on irc, and tried a few various workarounds. We tried to force the PPA to depend on a
newer version of gcc, but since 4.6 is the latest available that didn't get us very far.

We *could* potentially set our PPA to depend on another PPA which offers backported build toolchains. That would probably fix the problem, though some of use are hesitant to add another PPA as a dependency. 1.) It's not from the offical repository, and it's an additional dependency which might break/be unstable. 2.) To me (personally) it defeats the purpose a bit; because the goal should be to see whether it is buildable/runnable on these systems out of the box. Once we start importing software from other sources we can no longer say whether this is true or not.

I guess what we are really discussing here is the end-goal. For a quite a long time wl could build and run on nearly anything. Which is really nice because it means anyone can pick it up and play it. We started moving towards stricter c++11 syntax though (which probably is a good thing in the long run, but cause a problem for older compilers).

So, we have another obvious alternative, which I have to admit I didn't like at first, which is to stop building for 12.04 (gcc4.6). I have the impression users wishing to run the latest/development versions will already have upgraded to a newer release while most LTS users prefer stable, tested software. Build18 is just out and I will push that to our PPA as soon as I have synced/verified the latest packaging changes, so 12.04 users will have the latest stable release available.

When it comes to build19, the good news is that a new LTS is just around the corner (due to be released in April). It is reasonable to assume this will have been out for a while once we release build19, so most people running 12.04 today will have upgraded and be able to run the new release. I therefore wonder if spending time and effort to keep the development release running on 12.04 might be wasted effort if the majority of users will anyways have upgraded to a newer system when the official release is published.

That's some thoughts from me at least, and I'd like to hear others input on this too.

Changed in widelands:
importance: Undecided → Medium
status: New → Confirmed
tags: added: ftbfs
summary: - Automatic Build Fails because of 'override'
+ Automatic Build Fails on Ubuntu 12.04 because of 'override'
Revision history for this message
Jens Beyer (qcumber-some) wrote :

Just for completeness, we also tried clang instead of gcc, it failed to compile some code, too.

in src/map_io/widelands_map_building_data_packet.cc:89:35
non-aggregate type 'Building::FormerBuildings' (aka 'vector<Widelands::BuildingIndex>') cannot be initialized with an initializer list

Revision history for this message
SirVer (sirver) wrote :

my 2c: practicality beats purity. The PPA are a convenience for our users, not (primarily) a compile testing environment. if there is a way to make a PPA depend on another one that allows building, go for it. If it breaks - so what, we cant still stop building for 12.04 then. I do not feel it is important to see if Widelands builds out of the box on any system - it does not on Windows or Mac OS, why should it on any vanilla linux distribution? If someone wants to build it, she must be prepared to install a recent compiler.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Btw, until we find a solution, I've unchecked precise (12.04) from the list of releases we build for[1] to avoid spending CPU cycles on building something we know will fail.

[1] https://code.launchpad.net/~widelands-dev/+recipe/widelands-daily

Revision history for this message
Jens Beyer (qcumber-some) wrote :

I tried to add the PPA dependency to the Toolchain PPA, but while not repairing the Precise build, it made half of the other builds fail. I reverted the dependency, the next builds should work again as expected.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

It does not sound too surprising, if pulling a gcc-4.7 ppa messes up if the OS already has gcc-4.7.

Isn't it possible to add dependency of gcc >= 4.7 || precise-gcc-ppa, so that only Precise build pulls it?

Sorry for the comment -- I do not know anything about PPA's. The problem just sounds a bit silly, I would like to understand it.

Revision history for this message
Jens Beyer (qcumber-some) wrote :

No, this is also not possible. Though I thought so, but the infrastructure does not play nice this time.

I experimented with this in https://code.launchpad.net/~qcumber-some/+recipe/widelands-build-test and the lp:~qcumber-some/widelands/debian branch.

Problems:
1) It is not possible to add the dependencies based on distribution. You add it to the PPA, and any recipe pushing to the PPA will use the dependency. So to solve this, we would need a ppa:~widelands-dev/widelands-daily-old-ubuntu which inserts the dependency to the Toolchain containing newer GCCs. We can then support any older ubuntu version which needs newer stuff to build from this PPA.
2) While this would be certainly technical inferior, but still possible, we are facing another problem: The source builder itself can certainly work with a Build-Depends of g++-4.7 | g++ (>= 4:4.7) and pulls in the correct dependency, but the binary builder has some legacy problems and can not work with this (see: https://answers.launchpad.net/launchpad/+question/244768 ). So we have to change the Build-Depends to g++-4.7, omitting the alternative. This also means, we have to explicitly set the gcc-4.7 in the rules file's cmake call so that the cmake uses the new gcc, as there is still gcc-4.6 on the system, and it is default. I can not make it disappear through some Build-Conflicts settings, this only messes things up a bit (as it removes build-essential).
This means, we are now at a ppa:~widelands-dev/widelands-daily-precise - but this should probably work. Build is currently running to test that assumption.

So, if this is all working out, we would have another PPA called widelands-daily-precise, just for precise builds, while the widelands-daily PPA does not publish for precise.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

Thanks for the descriptions.

Revision history for this message
Jens Beyer (qcumber-some) wrote :

Just a quick heads-up:

I made successful builds on Ubuntu Precise for Widelands Trunk.

We need another PPA with the PPA Dependency to the Toolchain PPA, a modified branch of lp:~widelands-dev/widelands/debian regarding control and rules file, and the according recipe.

As proof of concept, I made the following:
https://code.launchpad.net/~qcumber-some/+recipe/widelands-daily-precise

Currently we can not create new recipes/PPAs for widelands-dev - for whatever reason. I asked Launchpad why: https://answers.launchpad.net/launchpad/+question/244836

When that's settled, we can create another recipe and PPA under widelands-dev instead of a personal one.

Revision history for this message
Jens Beyer (qcumber-some) wrote :

Answer to the question why we can not create a Team PPA: Only a team admin can do this. So, SirVer, would you please so kind?
I can do all configuration stuff (description, dependency, recipe).

Changed in widelands:
assignee: nobody → SirVer (sirver)
Revision history for this message
SirVer (sirver) wrote :

Sounds like quite some experimenting you had to do. Great that you've found a way.

I can do that configuration stuff, but I am intrigued - I never set up a PPA. I have no idea how that even works. Did they change their policies?

however, I created https://launchpad.net/~widelands-dev/+archive/widelands-daily-precise, I hope the name is approximately correct. Let me know if I need to do any additional changes.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

>widelands-daily-precise, I hope the name is approximately correct.

..how many will wonder, how this differs from widelands-daily-approximate ;-)

Revision history for this message
Jens Beyer (qcumber-some) wrote :

Looks good, thanks SirVer.
Builds currently running...

Changed in widelands:
assignee: SirVer (sirver) → Jens Beyer (Qcumber-some) (qcumber-some)
status: Confirmed → In Progress
milestone: none → build19-rc1
Revision history for this message
Jens Beyer (qcumber-some) wrote :

The PPA is up and publishing.
I also did some changes to https://wl.widelands.org/wiki/Download/

Setting to Fix Committed.
(or is this already Fix Released?)

Changed in widelands:
status: In Progress → Fix Committed
assignee: Jens Beyer (Qcumber-some) (qcumber-some) → nobody
Revision history for this message
SirVer (sirver) wrote :

i set to fix released. Is more of an organisational change, not really a code change. Thanks for caring for this jens!

Changed in widelands:
status: Fix Committed → Fix Released
milestone: build19-rc1 → none
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for your research and work on this Jens. :)

I guess this means that once build 19 is out, we could consider creating a similar PPA for stable builds for older releases. Probably makes more sense discussing that closer to the release though.

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.