I am attempting to revisit the subject of SuperTux development ;-) - a couple of years ago my daughter had some new badguy ideas that she drew some pictures and descriptions for; we posted them at the time but have not been active on it really since then.
A while back I had a successful ST debug build that I could step through in gdb. I'd started learning the basic class layout and runtime stages of SuperTux.
In the interim I've updated my machine to Ubuntu 16.04. I am having some trouble building ST from either an official source release or one of the nightly builds.
Apologies in advance for the amount of detail below.
I am a bit rusty with C++ and build concerns, so please forgive if I'm missing something obvious. At the final (link) phase things error out with:
- {l Code}: {l Select All Code}
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to `TIFFGetField@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to `TIFFReadRGBAImage@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to `TIFFSetErrorHandler@LIBTIFF_4.0'
I did some digging and I believe I successfully installed libtiff4 according to these posts:
https://github.com/yvt/openspades/issues/580
https://askubuntu.com/questions/449571/dependency-is-not-satisfiable-libtiff4-when-trying-to-install-lightworks-on-ubu
Here is my result from "sudo apt list --installed | grep tiff:
- {l Code}: {l Select All Code}
libtiff-tools/xenial-updates,xenial-security,now 4.0.6-1ubuntu0.4 amd64 [installed,automatic]
libtiff4/now 3.9.7-2ubuntu1 amd64 [installed,local]
libtiff5/xenial-updates,xenial-security,now 4.0.6-1ubuntu0.4 amd64 [installed]
libtiff5-dev/xenial-updates,xenial-security,now 4.0.6-1ubuntu0.4 amd64 [installed]
libtiffxx5/xenial-updates,xenial-security,now 4.0.6-1ubuntu0.4 amd64 [installed]
My latest build attempt used the following command line for cmake:
- {l Code}: {l Select All Code}
chuck@Beans-E6400:~/SuperTux-v0.5.1-1000-ga100d02f0-Source/build$ cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=DEBUG -DlibGLEW_LIBRARY=/usr/lib/x86_64-linux-gnu/libGLEW.so.1.13 .. -Dlibtiff4_LIBRARY=/usr/lib/x86_64-linux-gnu/libtiff.so.4.3.6 ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- filesystem
-- system
-- date_time
-- locale
-- Found ZLIB: /opt/anaconda3/lib/libz.so (found version "1.2.8")
-- Found PNG: /opt/anaconda3/lib/libpng.so (found version "1.6.27")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'sdl2>=2.0.1'
-- Checking for one of the modules 'SDL2_image>=2.0.0'
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
-- Looking for vorbis_bitrate_addblock in vorbis
-- Looking for vorbis_bitrate_addblock in vorbis - found
-- Found OggVorbis: /usr/lib/x86_64-linux-gnu/libvorbisfile.so;/usr/lib/x86_64-linux-gnu/libvorbis.so;/usr/lib/x86_64-linux-gnu/libogg.so
-- Could NOT find PhysFS (missing: PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
-- Looking for PHYSFS_getPrefDir
-- Looking for PHYSFS_getPrefDir - not found
-- Found CURL: /opt/anaconda3/lib/libcurl.so (found version "7.52.1")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Performing Test HAVE_ICONV_CONST
-- Performing Test HAVE_ICONV_CONST - Failed
-- Check size of void*
-- Check size of void* - done
-- Size of void* is 8
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
libGLEW_LIBRARY
libtiff4_LIBRARY
-- Build files have been written to: /home/chuck/SuperTux-v0.5.1-1000-ga100d02f0-Source/build
As evidenced by that last warning, it seems I didn't quite do it right when trying to tell cmake where to find libGLEW and libtiff4. I gave it a go anyway but without success.
The libGLEW is there because in the past I had been able to build ST from either the 5.0 or 5.1 release source tarballs, but ran into this error when running the resulting "suptertux2":
- {l Code}: {l Select All Code}
/home/chuck/SuperTux-v0.5.0-Source/build/supertux2: error while loading shared libraries: libGLEW.so.1.10: cannot open shared object file: No such file or directory
I just verified with the above-referenced old 5.0 build that this error still occurs. I did some googleing and the following link was interesting:
https://www.linuxquestions.org/questions/slackware-14/where-to-find-glew-so-2-1-a-4175613831/
I seem to have a newer-than-expected libGLEW though:
- {l Code}: {l Select All Code}
apt list | grep glew
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
glew-utils/xenial 1.13.0-2 amd64
libglew-dbg/xenial 1.13.0-2 amd64
libglew-dev/xenial,now 1.13.0-2 amd64 [installed]
libglew1.13/xenial,now 1.13.0-2 amd64 [installed]
libglewmx-dbg/xenial 1.13.0-2 amd64
libglewmx-dev/xenial 1.13.0-2 amd64
libglewmx1.13/xenial,now 1.13.0-2 amd64 [installed]
... so I figured perhaps I should try to provide the path to that .so as as well. In the meantime the libtiff4 dependency problem has been added.
Anyway, I've searched the forum here but have not had any luck, nor anything obvious on the wiki. Thanks in advance for any tips.
Best regards,
Chuck Lutz