Polls

Best Build 21 Screenshot

Log in to vote!

Latest Posts

Topic: Compiling Ancient Widelands

Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 952
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-06-14, 20:27

Out of interest I have downloaded the source tarballs for build10rc and widelands-0.0.1a from SourceForge, but unsurprisingly they don't compile just like that on Ubuntu 20.04.

The compile readme for build10rc says to just run make, but that fails with

make: *** Keine Regel vorhanden, um das Ziel „src/config.h.default“, 
  benötigt von „src/config.h“, zu erstellen.  Schluss.

("no rule present to create the target src/config.h.default, which is needed by src/config.h; cancel")

The very first release compiles fine but fails to link with several undefined references. Edit: After hacking the makefile to add -lm -lSDL I reduced these errors to:

gcc  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUSE_SDL_LIB -O3 -Wall   -o widelands  widelands.o card.o field.o SDL_input.o SDL_Medialib.o draw.o -lm -lSDL 
/usr/bin/ld: widelands.o: in function `but1':
widelands.c:(.text+0xbf): undefined reference to `intern_GetField'
/usr/bin/ld: widelands.c:(.text+0xcf): undefined reference to `intern_GetField'
/usr/bin/ld: widelands.c:(.text+0xdf): undefined reference to `intern_GetField'
/usr/bin/ld: card.o: in function `a_CardDraw':
card.c:(.text+0x182e): undefined reference to `a_SDLPicGetPixel'
/usr/bin/ld: card.c:(.text+0x1972): undefined reference to `a_SDLGraphDrawPixel'
/usr/bin/ld: card.c:(.text+0x1be6): undefined reference to `a_SDLPicGetPixel'
/usr/bin/ld: card.c:(.text+0x1d2a): undefined reference to `a_SDLGraphDrawPixel'
/usr/bin/ld: card.c:(.text+0x1fe2): undefined reference to `a_SDLPicGetPixel'
/usr/bin/ld: card.c:(.text+0x213b): undefined reference to `a_SDLGraphDrawPixel'
/usr/bin/ld: card.c:(.text+0x23f2): undefined reference to `a_SDLPicGetPixel'
/usr/bin/ld: card.c:(.text+0x254c): undefined reference to `a_SDLGraphDrawPixel'
collect2: error: ld returned 1 exit status

Does someone perhaps have an idea how to get these slightly outdated builds up and compiling?

Edited: 2020-06-14, 20:49

Top Quote
niektory
Avatar
Joined: 2019-06-03, 20:06
Posts: 138
Ranking
At home in WL-forums
Location: Poland
Posted at: 2020-06-14, 20:55

I can't even build a version from two months ago on my system without backporting fixes, so good luck, it's probably going to be a pain face-tongue.png


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 952
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-06-14, 21:07

It certainly will be face-smile.png

I can compile version 0.0.1a now. The linker errors were caused by some functions being declared inline that shouldn't be, now I can run it and watch a black window segfaulting… face-smile.png


Top Quote
teppo
Joined: 2012-01-30, 09:42
Posts: 401
Ranking
Tribe Member
Posted at: 2020-06-15, 17:00

Nordfriese wrote:

Out of interest I have downloaded the source tarballs for build10rc and widelands-0.0.1a from SourceForge, but unsurprisingly they don't compile just like that on Ubuntu 20.04. ... Does someone perhaps have an idea how to get these slightly outdated builds up and compiling?

I did some old versions for sake of curiosity a few years back. The easiest is to use a virtual machine with equally old guest OS. Did not try 0.0.1a, probably something like 5 and 10.


Top Quote