Get oolite trunk working on archlinux using system libs

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: another_commander, winston, Getafix

Post Reply
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 794
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Get oolite trunk working on archlinux using system libs

Post by Lone_Wolf »

When trying to build oolite trunk on archlinux with the release target the executable is linked to libpng16.so.16 instead of libpng14.so.14 .

This causes severe graphical issues when running the built executable making oolite unplayable .
I have tried many things but failed to convince gnustep to use system installed libpng14 .

An attempt to use oolite provided binaries also failed and is discussed at viewtopic.php?t=21896 .

ADDED
building with only libpng14 present fails with /usr/bin/ld: cannot find -lpng: No such file or directory
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 794
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Get oolite trunk working on archlinux using system libs

Post by Lone_Wolf »

I found a workaround for the libpng issue .

GNUmakefile has

Code: Select all

ADDITIONAL_OBJC_LIBS         = $(OOLITE_SHARED_LIBS) -lGLU -lGL -lX11 -lSDL -lgnustep-base -L$(LIBJS_DIR) -l$(LIBJS) -lopenal -lz -lvorbisfile -lpng `nspr-config --libs` -lstdc++ 
man ldconfig wrote:
ldconfig will look only at files that are named lib*.so* (for regular shared objects) or ld-*.so* (for the dynamic loader itself).
There's one big difference between repo libpng and aur libpng14 packages on archlinux :
repo libpng contains libpng.so , libpng14 doesn't .

I patched the above line in GNUMakefile to use -lpng14 instead of -lpng .
This allowed the linker to link with the correct libpng version.

linux-force-use-of-libpng14.patch

Code: Select all

diff -ura oolite/GNUmakefile oolite.new/GNUmakefile
--- oolite/GNUmakefile	2025-07-19 19:17:21.145145764 +0200
+++ oolite.new/GNUmakefile	2025-07-20 13:10:08.594962756 +0200
@@ -70,7 +70,7 @@
     endif
 
     ADDITIONAL_INCLUDE_DIRS      = -I$(LIBJS_INC_DIR) -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -Isrc/Core/Scripting -Isrc/Core/Materials -Isrc/Core/Entities -Isrc/Core/OXPVerifier -Isrc/Core/Debug -Isrc/Core/Tables -Isrc/Core/MiniZip -Ideps/Linux-deps/include 
-    ADDITIONAL_OBJC_LIBS         = $(OOLITE_SHARED_LIBS) -lGLU -lGL -lX11 -lSDL -lgnustep-base -L$(LIBJS_DIR) -l$(LIBJS) -lopenal -lz -lvorbisfile -lpng `nspr-config --libs` -lstdc++ 
+    ADDITIONAL_OBJC_LIBS         = $(OOLITE_SHARED_LIBS) -lGLU -lGL -lX11 -lSDL -lgnustep-base -L$(LIBJS_DIR) -l$(LIBJS) -lopenal -lz -lvorbisfile -lpng14 `nspr-config --libs` -lstdc++ 
     ADDITIONAL_OBJCFLAGS         = -Wall -std=gnu99 -DLOADSAVEGUI -DLINUX -DXP_UNIX -Wno-import `sdl-config --cflags` `nspr-config --cflags`
     ADDITIONAL_CFLAGS            = -Wall -DLINUX -DNEED_STRLCPY `sdl-config --cflags` `nspr-config --cflags`

oolite-git is now playable and I'll upload a working PKGBUILD to https://aur.archlinux.org/packages/oolite-git sometime this week.

There's a lot more work ahead, f.e. spoken messages can't be enabled in game and my current PKGBUILD is not yet compliant with Arch package guidelines, but I've made good progress.
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 794
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Get oolite trunk working on archlinux using system libs

Post by Lone_Wolf »

After loading/starting a commander the spoken message option became editable. it does look like reaching full functionality is close.

ADDED

fully working PKGBUILD for oolite-git uploaded to AUR, I also adopted oolite (stable) aur package and will try to get 1.90 working .
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 794
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Get oolite trunk working on archlinux using system libs

Post by Lone_Wolf »

https://github.com/OoliteProject/oolite ... 706554e852 breaks runtime when building with espeak-ng .

Workaround :
Set path with

Code: Select all

export ESPEAK_DATA_PATH=/usr/share/espeak-ng-data/
before starting oolite.
OS : Arch Linux 64-bit - rolling release

From: The Netherlands, Europe

OXPs : My user page (needs updating)

Retired, occasionally active
Post Reply