Fail to build in Ubuntu 10.04 LTS

Bug #1203492 reported by Jens Beyer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

With the latest c++0x changes we again fail to build on Ubuntu 10.04 LTS (lucid).

Problem is that gcc-4.4 does not seem to recognize the nullptr keyword, although it claims to recognize -std=c++0x. The newer versions of gcc are not available officially for lucid. With gcc-4.6 nullptr appeared.

We now have at least 3 possible solutions:

1) stop building for lucid.
2) Use some inofficial PPA https://launchpad.net/~ubuntu-toolchain-r/+archive/test which seems to be something unsupported, but at least by Ubuntu, see https://wiki.ubuntu.com/ToolChain - I am not sure yet how to incorporate this into the current build, but I guess there will be some way.
3) Implement a workaround for the fact that nullptr is not defined. This should probably be along the "official" way this document http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf (on page 3) shows. There must be a way to detect it is necessary to include this via some #ifdef magic...

Tags: buildsystem

Related branches

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

Fwiw, nullptr was introduced in r6647 which is likely the commit that broke things.

Regarding the solutions:
1) As I've mentioned before, 10.04 is currently only supported for servers. Furthermore, 12.04 is the latest LTS, have been out for a year and will be supported on desktop and server until April 2017. Therefore I would believe most people have already upgraded to a newer version, so I am not sure what we will lose by dropping support. Especially if we will keep running into bugs like this because the various packages are a lot older compared to more recent systems. At some point, I fear this will be more effort than the gain is worth. As a potential compromise though, we could keep support for now and make sure build18 works properly on it. Then, once build18 is out the door, we might stop building for it.

2) I think there is some feature to let you say this PPA depends on another PPA. However, I'm not sure about this, as to me some of the point is to see that the latest commit builds "out of the box". Once we start adding other non-standard packages, I don't think we are testing what we should be testing.

Changed in widelands:
importance: Undecided → Medium
milestone: none → build18-rc1
status: New → Confirmed
Revision history for this message
SirVer (sirver) wrote :

There is a third way which seems easiest: implement a hack in CMakeFiles.txt that checks for the gcc version < 4.6 and add -Dnullptr=NULL to the cflags. Does this not work?

SirVer (sirver)
Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → 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.