test_widelands_scripting compilation fails

Bug #662045 reported by Nasenbaer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

Error during compilation of the test script on Opensuse 11.3 and Opensuse 11.1:

[100%] Building CXX object src/scripting/test/CMakeFiles/test_widelands_scripting.dir///build_info.cc.o
Linking CXX executable test_widelands_scripting
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/crt1.o: In function _start': /usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference tomain' collect2: ld returned 1 exit status make[2]: [src/scripting/test/test_widelands_scripting] Fehler 1 make[1]: [src/scripting/test/CMakeFiles/test_widelands_scripting.dir/all] Fehler 2 make: *** [all] Fehler 2 sandra@linux-jy0v:~/widelands>

Of course Widelands is already compiled at that point, but most of the users do not notice it.

Revision history for this message
Jari Hautio (jarih) wrote :

Which revision did you use and did you explicitly requests tests to be built?

After r5564 tests should not be built by default. If tests are selected for building, there will be helpful message in generation step if unit test library is missing. At least fresh 32-bit ubuntu 10.4 did not try to compile unit tests after checkout and ./compile.sh. If you are using older checkout and did not cleanup cmake files, then there may be a cached flag that enables building unit tests. You can check this out for example by running cmake -i and observing what's value for BUILD_UNIT_TESTS variable.

Anyway, I'll download and install opensuse 10.3 x64 and test it.

Revision history for this message
Jari Hautio (jarih) wrote :

I could not reproduce using opensuse 11.3 x64 and current trunk r5584.
I had to install tiff and jpg development packages in addition to what's stated on the BuildinWidelands wiki page.

Revision history for this message
Jari Hautio (jarih) wrote :

Now I could reproduce it. I forgot to enable test building. Opensuse does not ship static libs and CMake automatically picked shared version. This in turn would require another flag when building unit tests.

I'll make a fix.

Revision history for this message
Jari Hautio (jarih) wrote :

Fixed in trunk r5588. Switched to dynamic unit test framework outside windows platform. Tested on opensuse 11.3 (x64), OS X 10.6, ubuntu 10.4 (x86), windows/MSVC2008.

Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
David Allwicher (aber) wrote :

Why did you disable static linking for the unix like platforms?

Revision history for this message
Jari Hautio (jarih) wrote :

Static boost libs were not found on opensuse 11.3. Dynamic libs are found always. Besides everything else is normally dynamically linked on non windows platforms anyway. On windows static linking is better because then there's no need to copy the dll's or ensure that dll's are found in path.

Revision history for this message
SirVer (sirver) wrote :

Released in build16-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.