Building WL should check whether gettext is installed

Bug #1159000 reported by Hans Joachim Desserud on 2013-03-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Low
Unassigned

Bug Description

How to reproduce:
1. Verify gettext is not installed.
2. Run ./compile.sh
3. Select "debug". (though likely happens with release too)
4. Select yes to build translations.
5. Wait.

WL builds and the tests run without any problems, however when it reaches the translation section it errors because gettext is not installed.

To avoid this, WL should check for gettext before building similar to how it checks for other dependencies. A complicating factor is that it is possible to build WL without translations. Therefore I don't know if we always want to verify it is present, or make it an optional requirement like doxygen. It also seems rather hard to see if the user want to build translations since compile.sh seem to just run `make lang` afterwards which is not something I believe the first build steps will be able to "see".

(Low importance because presumably most people will install all dependencies listed in the wiki)

Related branches

SirVer (sirver) wrote :

In mac, wl doesn't compile because gettext.h and libintl are not found without gettext.

Also, we do not check for glew, though we use it in some places.

Jens Beyer (qcumber-some) wrote :

We are checking for GLEW: CMakeLists.txt line 311.
It is just that it's not required.

Regarding Gettext: CMake ships FindGettext module, so this would probably be easy to implement.

Hans Joachim Desserud (hjd) wrote :

glew is actually required, if it isn't installed you will get an error message saying widelands_all links to it.

SirVer (sirver) wrote :

yes, glew is required. cmake should barf and stop trying to compile if it is not found.

Changed in widelands:
status: New → Confirmed
Jens Beyer (qcumber-some) wrote :

question is: is glew required in all cases, or should it be possible to compile widelands without glew if opengl is not used? Currently it doesn't.

It is easy to kill the cmake task if libglew was not found, I just want to make it right ;-)

SirVer (sirver) wrote :

I think we should go the extra step and make openlg mandatory - the software renderer is pretty much maintenance only and opengl has been the default renderer for a while.

Hans Joachim Desserud (hjd) wrote :

Regarding opengl, turns out that is actually required as well. Though seems like it is more the result of a bug rather than policy.

In order for CMake to fail detecting opengl, I simply moved my libGL.so file. (Which might not be the cleanest way, but hey, it worked.) When running CMake it first told me that it couldn't detect opengl so it would disable it, but later it failed because widelands_all links to opengl. I therefore think we can tweak the error message when opengl is not found to have it no longer say opengl support is disabled and possibly remove the faulty disabling-related instructions.

Changed in widelands:
milestone: none → build18-rc1
status: Confirmed → Fix Committed
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  Edit
Everyone can see this information.

Other bug subscribers