lokigames:creatures3

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
lokigames:creatures3 [2026/06/22 07:02] – créée twolifelokigames:creatures3 [2026/06/23 07:20] (Version actuelle) – [Adventures in the dark age of broken toolchain - Part 2] twolife
Ligne 3: Ligne 3:
 Nothing exciting to say about installing the game & running it with the bundled SDL-1.2. Nothing exciting to say about installing the game & running it with the bundled SDL-1.2.
  
-But things get really nasty if you want to use you system libraries & sdl12-compat in particular... +But things get really nasty if you want to use your system libraries & sdl12-compat in particular...
- +
-===== Adventures in the dark age of broken toolchain - Part 1 =====+
 <code> <code>
 mkdir libs_backup mkdir libs_backup
Ligne 11: Ligne 9:
 </code> </code>
  
 +===== Adventures in the dark age of broken toolchain - Part 1 =====
 <code> <code>
 $ creatures3 $ creatures3
Ligne 18: Ligne 17:
  
 ''lc2e'' is a very old ELF binary, and unfortunately it is very broken by modern standards: ''lc2e'' is a very old ELF binary, and unfortunately it is very broken by modern standards:
-  * it contains explicit symbol-version requirements against ''libdl.so.2 '' (''readelf -V lc2e''+  * it contains explicit symbol-version requirements against ''libdl.so.2'' (''readelf -V lc2e''
-  * but it doesn't declare a dependency on ''libdl.so.2 '' (''readelf -d lc2e'')+  * but it doesn't declare a dependency on ''libdl.so.2'' (''readelf -d lc2e'')
  
 You can use patchelf to fix this: You can use patchelf to fix this:
Ligne 26: Ligne 25:
 But why does it work with the bundled ''libSDL-1.2.so.0'' ? But why does it work with the bundled ''libSDL-1.2.so.0'' ?
  
-Because that library has a dependency on libdl (and that make the loader happy), while any modern versions (be it a real SDL-1.2 or sdl12-compat) won't. Again: why ?+Because the bundled ''libSDL-1.2.so.0'' has a dependency on libdl (and that makes the loader happy), while any modern versions (be it a real SDL-1.2 or sdl12-compat) won'have it. Again: why ?
  
-Because with the release of GLIBC 2.34 in 2021, libpthread, libdl, libutil, libanl have all been integrated into libc; new build does not link with them anymore.+Because with the release of GLIBC 2.34 in 2021, libpthread, libdl, libutil, libanl have all been integrated into libc; new build does not link with any of them anymore.
  
  
Ligne 38: Ligne 37:
 </code> </code>
  
-This is a fun one. ''lc2elib.so'' use some private symbols that are not part of SDL-1.2’s public ABI, that are exported by the bundled ''libSDL-1.2.so.0''but that aren't exposed in any build of SDL-1.2 made in the last 2 decades.+This is a fun one. ''lc2elib.so'' use some private symbols that are not part of SDL-1.2’s public ABI, that are surprisingly exported by the bundled ''libSDL-1.2.so.0'' but that aren't exposed in any other build of SDL-1.2 made in the last 2 decades. 
 + 
 +Here is the list of symbols we need to provide: 
 +<code> 
 +void SDL_Convert16LSB(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_Convert16MSB(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_Convert8(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_ConvertEndian(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_ConvertMono(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_ConvertSign(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_ConvertStereo(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_RateDIV2(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_RateMUL2(SDL_AudioCVT *cvt, Uint16 format) 
 +void SDL_RateSLOW(SDL_AudioCVT *cvt, Uint16 format) 
 +</code> 
 + 
 +The solution I choose is simple: reuse the code from SDL-1.2 in [[https://github.com/libsdl-org/SDL-1.2/blob/main/src/audio/SDL_audiocvt.c|src/audio/SDL_audiocvt.c]] and make it available to the game. 
 + 
 +===== Solution ===== 
 +Just compile the code from [[https://github.com/twolife/creatures3-linux-sdl]] and replace ''libSDLStretch.so'' in the game directory. 
 + 
 +<code> 
 +SDL_VIDEODRIVER=x11 creatures3 
 +Welcome to Creatures 3! 
 +[...] 
 +</code>
  • lokigames/creatures3.1782111756.txt.gz
  • Dernière modification : 2026/06/22 07:02
  • de twolife