FTBFS (src/ai/defaultai.cc:3898:1: error: control may reach end of non-void function)

Bug #1509772 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

Current trunk now fails to build with the following error message:
/«PKGBUILDDIR»/src/ai/defaultai.cc:3898:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]

For details, see https://launchpadlibrarian.net/222777143/buildlog_ubuntu-trusty-amd64.widelands_1%3A18-ppa0-bzr7569-201510250826~ubuntu14.04.1_BUILDING.txt.gz

Presumably, this is because the assert() is trimmed out from release builds which means the else doesn't contain anything. Might be resolved/handled by throwing an exception saying something like "unhandled purpose", though I don't know the policy on exceptions in such cases.

Also, I've had general issues building widelands with clang 3.6 and later, but this has been going on for a while. I haven't had time to properly investigate, but once this is resolved I might take another look at it. Looked like it simply had problems including some of the SDL-libraries for some reason, has anyone else run into similar problems?

Tags: ftbfs

Related branches

Revision history for this message
GunChleoc (gunchleoc) wrote :

Tibor has already crated a patch for the first issue.

I have noticed some build issues on our experimental Travis as well. Over there, they seem to be related to the ICU - some enum members I'm using aren't available, which points to the assumption that the ICU version over there needs to be newer. I guess we need to edit a requirement for the latest version in Cmake somewhere. The current stable ICU version listed on on their site is 56.1.

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

Ah, thanks for linking.

Checked the regular daily build PPA and found that it broke on the same thing for GCC, since release builds ignore the assert statements. Updated title to reflect this.

I haven't seen the ICU issues, though I haven't looked closely at the Travis setup. Last time I checked Travis based their build environments on Ubuntu 12.04 though, so it might simply be the case that the ICU version is too old. The daily builds performed with 14.04 and later releases does not seem to have any problems at least.

summary: - FTBFS with clang (src/ai/defaultai.cc:3898:1: error: control may reach
- end of non-void function)
+ FTBFS (src/ai/defaultai.cc:3898:1: error: control may reach end of non-
+ void function)
description: updated
tags: removed: clang
Changed in widelands:
status: New → In Progress
Revision history for this message
SirVer (sirver) wrote :

Öhh.. sorry tibor. I ran into this issue when I was building the Mac OS X nightly today and fixed it in [1] before I saw your change.

[1] http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/revision/7570

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

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.