News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Compilation fails on Debian (and ubuntu)

Started by joendter, Yesterday at 02:04:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

joendter

I am trying to compile simutrans on a headless machine (a hetzner VPS to be precise). I have tried it both on Debian and Ubuntu
I am following the instructions provided in the readme:
clone the repo
sh tools/setup-debian.sh
autoconf
./configure
make -j 2
It apparently compiles all C files fine, but fails on ld:
[color=#000000]===> HOSTCXX src/simutrans/sound/sdl2_sound.cc[/color]
[color=#000000]===> LD  /root/simutrans/sim[/color]
[color=#000000]/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libfontconfig.a(fcxml.o): undefined reference to symbol 'XML_GetBuffer'[/color]
[color=#000000]/usr/bin/ld: /lib/x86_64-linux-gnu/libexpat.so.1: error adding symbols: DSO missing from command line[/color]
[color=#000000]collect2: error: ld returned 1 exit status[/color]
[color=#000000]make: *** [common.mk:29: /root/simutrans/sim] Error [/color]
any idea what I am doing wrong?


Roboron

To compile a headless version of Simutrans, you need to configure it manually. See https://simutrans-germany.com/wiki/wiki/en_CompilingSimutrans for more information.

"backend" should be set to "posix" in the Makefile configuration, or "none" if you go the CMake route (which I recommend).