Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Changing Oolite...

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 667
Joined: Sat Aug 09, 2014 4:16 pm

Re: Changing Oolite...

Post by Commander_X »

hiran wrote: Fri Jan 21, 2022 12:44 pm
[...] has not been tested in any way. [...]
I did a quick check-up (on my quite out-dated Slackware-current).

Good news: it works.

Other news:
- it seems to have picked on the system's libpng (v6), instead of Linux-deps libpng4 (I hope you used the use_deps option, and also ran the make_so_links.sh script)
- I had to manually copy the "deps" libs in a local folder, and point my LD_LIBRARY_PATH to it
- I had to manually copy the espeak-data in the Resources folder
- I had to use my own wrapper script to point LD_LIBRARY_PATH and ESPEAK_DATA_PATH to the appropriate folders
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Fri Jan 21, 2022 2:03 pm
hiran wrote: Fri Jan 21, 2022 12:44 pm
[...] has not been tested in any way. [...]
I did a quick check-up (on my quite out-dated Slackware-current).

Good news: it works.

Other news:
- it seems to have picked on the system's libpng (v6), instead of Linux-deps libpng4 (I hope you used the use_deps option, and also ran the make_so_links.sh script)
- I had to manually copy the "deps" libs in a local folder, and point my LD_LIBRARY_PATH to it
- I had to manually copy the espeak-data in the Resources folder
- I had to use my own wrapper script to point LD_LIBRARY_PATH and ESPEAK_DATA_PATH to the appropriate folders
Thank you for taking the effort.

I received some hints how to build and just dropped them in https://github.com/HiranChaudhuri/oolit ... -linux.yml

Code: Select all

          # install required subsystems
          sudo apt install libgnustep-base-dev
          sudo apt install libsdl1.2-dev
          sudo apt install libvorbis-dev
          sudo apt install libopenal-dev
          sudo apt install libespeak-dev
          sudo apt install libnspr4-dev
          sudo apt install g++
          cd oolite
          # remove png headers
          rm deps/Linux-deps/include/png*
          # make sure the GNUSTEP_MAKEFILES property is set
          export GNUSTEP_MAKEFILES=/usr/lib/GNUstep/Makefiles
          # build the release
          make -f Makefile release
It seems the explanation for the png library is in the rm command.
I will try to run again without that.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

another_commander wrote: Fri Jan 21, 2022 12:52 pm
@hiran: Please check my comment here: https://github.com/OoliteProject/oolite ... 1018476874
This is something we may need to consider if we are to have more than one builds generated from within the Oolite repository.

Edit: Also, the source code has been packaged in the Linux result. This will need some clean up.
Commander_X wrote: Fri Jan 21, 2022 2:03 pm
Other news:
- it seems to have picked on the system's libpng (v6), instead of Linux-deps libpng4 (I hope you used the use_deps option, and also ran the make_so_links.sh script)
- I had to manually copy the "deps" libs in a local folder, and point my LD_LIBRARY_PATH to it
- I had to manually copy the espeak-data in the Resources folder
- I had to use my own wrapper script to point LD_LIBRARY_PATH and ESPEAK_DATA_PATH to the appropriate folders
I tried to address some things now:
  • The linux build is a lot smaller now. Let's see if it contains what it needs
  • The three workflows are now combined in one - therefore more artifacts are available per release. However I have no clue what will happen now if one of the jobs fails.
  • The retention period seems to depend on whether we perform a prerelease or nightly or if we go for a release. Still to be verified.
  • Some way of automatic testing would be very welcome, but right now I would not know how to implement that.
Sunshine - Moonlight - Good Times - Oolite
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 667
Joined: Sat Aug 09, 2014 4:16 pm

Re: Changing Oolite...

Post by Commander_X »

hiran wrote: Fri Jan 21, 2022 4:52 pm
[...] I tried to address some things now: [...]
The smaller release still has the last two issues I mentioned (i.e. doesn't come with everything in the package -- deps and espeak-data -- and doesn't have a wrapper).
This also has a drawback from the initial one: there I could only "mask" the libpng14 in the deps folder and I could run it with the system's libpng, here, I need to "mask" both libpng14 and libz in the deps folder, and the outcome is that there are not fonts present on the screen, but only rectangles (i.e. no transparency).
You will need to make sure you run the make_so_links.sh (in deps/Linux-deps/x86_64/lib_linker) script, and when you run make, you add use_deps=yes in the command line (otherwise most of the deps won't be found)
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Fri Jan 21, 2022 5:48 pm
hiran wrote: Fri Jan 21, 2022 4:52 pm
[...] I tried to address some things now: [...]
The smaller release still has the last two issues I mentioned (i.e. doesn't come with everything in the package -- deps and espeak-data -- and doesn't have a wrapper).
This also has a drawback from the initial one: there I could only "mask" the libpng14 in the deps folder and I could run it with the system's libpng, here, I need to "mask" both libpng14 and libz in the deps folder, and the outcome is that there are not fonts present on the screen, but only rectangles (i.e. no transparency).
You will need to make sure you run the make_so_links.sh (in deps/Linux-deps/x86_64/lib_linker) script, and when you run make, you add use_deps=yes in the command line (otherwise most of the deps won't be found)
Now I am trying to run the expanded tgz on my system and get this:

Code: Select all

$ openapp ./oolite.app
oolite.app/oolite: error while loading shared libraries: libespeak.so.1: cannot open shared object file: No such file or directory
$
When checking for dependencies I get this:

Code: Select all

$ ldd oolite 
	linux-vdso.so.1 (0x00007ffd78acc000)
	libGLU.so.1 => /lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f9bca1d6000)
	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f9bca14e000)
	libSDL-1.2.so.0 => /lib/x86_64-linux-gnu/libSDL-1.2.so.0 (0x00007f9bca0b2000)
	libgnustep-base.so.1.26 => /lib/libgnustep-base.so.1.26 (0x00007f9bc9a87000)
	libopenal.so.1 => /lib/x86_64-linux-gnu/libopenal.so.1 (0x00007f9bc999f000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9bc9983000)
	libvorbisfile.so.3 => /lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007f9bc9976000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f9bc993e000)
	libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007f9bc98fe000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9bc98db000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9bc96f9000)
	libespeak.so.1 => not found
	libobjc.so.4 => /lib/x86_64-linux-gnu/libobjc.so.4 (0x00007f9bc96dc000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9bc958d000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9bc9572000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9bc9380000)
	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f9bc92c8000)
	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f9bc9294000)
	libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f9bc9197000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9bc9191000)
	libpulse-simple.so.0 => /lib/x86_64-linux-gnu/libpulse-simple.so.0 (0x00007f9bc918a000)
	libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x00007f9bc9135000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f9bc8ff8000)
	libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f9bc8fe3000)
	libcaca.so.0 => /lib/x86_64-linux-gnu/libcaca.so.0 (0x00007f9bc8f15000)
	libavahi-common.so.3 => /lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007f9bc8f07000)
	libavahi-client.so.3 => /lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007f9bc8ef4000)
	libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f9bc8d1e000)
	libxslt.so.1 => /lib/x86_64-linux-gnu/libxslt.so.1 (0x00007f9bc8cdc000)
	libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f9bc8b22000)
	libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f9bc8b14000)
	libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007f9bc8815000)
	libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f9bc862f000)
	libsndio.so.7.0 => /lib/x86_64-linux-gnu/libsndio.so.7.0 (0x00007f9bc861e000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9bc8613000)
	libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f9bc85e5000)
	libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007f9bc85d6000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f9bcad6d000)
	libpulsecommon-13.99.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so (0x00007f9bc8554000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f9bc8503000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f9bc84d9000)
	libslang.so.2 => /lib/x86_64-linux-gnu/libslang.so.2 (0x00007f9bc81e2000)
	libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007f9bc81a6000)
	libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f9bc8176000)
	libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f9bc8040000)
	libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f9bc801f000)
	libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f9bc7e9d000)
	libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f9bc7e87000)
	libnettle.so.7 => /lib/x86_64-linux-gnu/libnettle.so.7 (0x00007f9bc7e4b000)
	libhogweed.so.5 => /lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007f9bc7e14000)
	libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f9bc7d90000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f9bc7d67000)
	libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f9bc62a6000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f9bc628a000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f9bc61db000)
	libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f9bc61cf000)
	libsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f9bc6151000)
	libasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007f9bc5f4b000)
	libapparmor.so.1 => /lib/x86_64-linux-gnu/libapparmor.so.1 (0x00007f9bc5f36000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f9bc5f2e000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f9bc5f26000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f9bc5f05000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f9bc5de7000)
	libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f9bc5dca000)
	libFLAC.so.8 => /lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f9bc5d8a000)
	libvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f9bc5cdf000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f9bc5cc3000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f9bc5ca0000)
Trying to find more suitable libraries from the package itself:

Code: Select all

$ find -name "li*"
$
That tells me that none of the required libraries is contained in the package.

I will change the call to make into

Code: Select all

make -f Makefile release use_deps=yes
and my gut feeling tells me that

Code: Select all

deps/Linux-deps/x86_64/lib_linker/make_so_links.sh
has to be invoked before calling make.

Finally I need to investigate where all these libs are so I can add them to the release.
Last edited by hiran on Fri Jan 21, 2022 8:43 pm, edited 1 time in total.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Fri Jan 21, 2022 5:48 pm
hiran wrote: Fri Jan 21, 2022 4:52 pm
[...] I tried to address some things now: [...]
The smaller release still has the last two issues I mentioned (i.e. doesn't come with everything in the package -- deps and espeak-data -- and doesn't have a wrapper).
This also has a drawback from the initial one: there I could only "mask" the libpng14 in the deps folder and I could run it with the system's libpng, here, I need to "mask" both libpng14 and libz in the deps folder, and the outcome is that there are not fonts present on the screen, but only rectangles (i.e. no transparency).
You will need to make sure you run the make_so_links.sh (in deps/Linux-deps/x86_64/lib_linker) script, and when you run make, you add use_deps=yes in the command line (otherwise most of the deps won't be found)
A new build with the beforementioned changes. I still get

Code: Select all

$ openapp ./oolite.app
oolite.app/oolite: error while loading shared libraries: libespeak.so.1: cannot open shared object file: No such file or directory
$
When checking for dependencies I get this:

Code: Select all

$ ldd oolite.app/oolite 
	linux-vdso.so.1 (0x00007fffda9cf000)
	libGLU.so.1 => /lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f6196161000)
	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f61960d9000)
	libSDL-1.2.so.0 => /lib/x86_64-linux-gnu/libSDL-1.2.so.0 (0x00007f619603d000)
	libgnustep-base.so.1.26 => /lib/libgnustep-base.so.1.26 (0x00007f6195a12000)
	libopenal.so.1 => /lib/x86_64-linux-gnu/libopenal.so.1 (0x00007f619592a000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f619590e000)
	libvorbisfile.so.3 => /lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007f6195901000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f61958c9000)
	libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007f6195889000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6195866000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6195684000)
	libespeak.so.1 => not found
	libobjc.so.4 => /lib/x86_64-linux-gnu/libobjc.so.4 (0x00007f6195667000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6195518000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f61954fd000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f619530b000)
	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f6195253000)
	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f619521f000)
	libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f6195122000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f619511c000)
	libpulse-simple.so.0 => /lib/x86_64-linux-gnu/libpulse-simple.so.0 (0x00007f6195115000)
	libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x00007f61950c0000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f6194f83000)
	libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f6194f6e000)
	libcaca.so.0 => /lib/x86_64-linux-gnu/libcaca.so.0 (0x00007f6194ea0000)
	libavahi-common.so.3 => /lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007f6194e92000)
	libavahi-client.so.3 => /lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007f6194e7f000)
	libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f6194ca9000)
	libxslt.so.1 => /lib/x86_64-linux-gnu/libxslt.so.1 (0x00007f6194c67000)
	libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f6194aad000)
	libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f6194a9f000)
	libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007f61947a0000)
	libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f61945ba000)
	libsndio.so.7.0 => /lib/x86_64-linux-gnu/libsndio.so.7.0 (0x00007f61945a9000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f619459e000)
	libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f6194570000)
	libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007f6194561000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f6196cf8000)
	libpulsecommon-13.99.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so (0x00007f61944df000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f619448e000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f6194464000)
	libslang.so.2 => /lib/x86_64-linux-gnu/libslang.so.2 (0x00007f619416d000)
	libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007f6194131000)
	libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f6194101000)
	libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f6193fcb000)
	libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f6193faa000)
	libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f6193e28000)
	libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f6193e12000)
	libnettle.so.7 => /lib/x86_64-linux-gnu/libnettle.so.7 (0x00007f6193dd6000)
	libhogweed.so.5 => /lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007f6193d9f000)
	libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f6193d1b000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f6193cf2000)
	libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f6192231000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f6192215000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f6192166000)
	libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f619215a000)
	libsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f61920dc000)
	libasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007f6191ed6000)
	libapparmor.so.1 => /lib/x86_64-linux-gnu/libapparmor.so.1 (0x00007f6191ec1000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f6191eb9000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f6191eb1000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f6191e90000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f6191d72000)
	libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f6191d55000)
	libFLAC.so.8 => /lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f6191d15000)
	libvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f6191c6a000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f6191c4e000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f6191c2b000)
Trying to find more suitable libraries from the package itself:

Code: Select all

$ find -name "lib*"
./lib
./lib/libgcrypt.so.20
./lib/libobjc.so.2
./lib/libhogweed.so.4
./lib/libespeak.so.1.pulseaudio
./lib/libnettle.so.6
./lib/libportaudio.so.2
./lib/libffi.so.4
./lib/libpng14.so.14
./lib/libopenal.so.1
./lib/libSDL-1.2.so.0
./lib/libogg.so.0
./lib/libplc4.so.0d
./lib/libnspr4.so.0d
./lib/libespeak.so.1
./lib/libgnustep-base.so.1.20
./lib/libplds4.so.0d
./lib/libvorbis.so.0
./lib/libnsl.so.1
./lib/libgnutls.so.30
./lib/libvorbisfile.so.3
./lib/libz.so.1
./lib/libgmp.so.10
./lib/libgpg-error.so.0
$
At least a bunch of libraries is contained in the package - but regardless of their location - the compiled oolite application still searches for the system libraries.
Last edited by hiran on Fri Jan 21, 2022 8:42 pm, edited 1 time in total.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Fri Jan 21, 2022 5:48 pm
hiran wrote: Fri Jan 21, 2022 4:52 pm
[...] I tried to address some things now: [...]
The smaller release still has the last two issues I mentioned (i.e. doesn't come with everything in the package -- deps and espeak-data -- and doesn't have a wrapper).
This also has a drawback from the initial one: there I could only "mask" the libpng14 in the deps folder and I could run it with the system's libpng, here, I need to "mask" both libpng14 and libz in the deps folder, and the outcome is that there are not fonts present on the screen, but only rectangles (i.e. no transparency).
You will need to make sure you run the make_so_links.sh (in deps/Linux-deps/x86_64/lib_linker) script, and when you run make, you add use_deps=yes in the command line (otherwise most of the deps won't be found)
A new build with yet more changes. I now get

Code: Select all

 openapp ./oolite.app
version `ZLIB_1.2.9' not found (required by /lib/x86_64-linux-gnu/libpng16.so.16)
$
I patched the RPATH in oolite to point to the lib directory so shared libraries are preferredly loaded from there. Still a bunch of more libraries are coming from the system. I that a desired situation?

Code: Select all

$ ldd oolite.app/oolite | grep "=> /lib"
	libGLU.so.1 => /lib/x86_64-linux-gnu/libGLU.so.1 (0x00007fcc92a46000)
	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007fcc929be000)
	libgnustep-base.so.1.26 => /lib/libgnustep-base.so.1.26 (0x00007fcc920f8000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fcc91a4e000)
	libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007fcc91a0e000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcc919eb000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcc91809000)
	libobjc.so.4 => /lib/x86_64-linux-gnu/libobjc.so.4 (0x00007fcc91583000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcc91434000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcc91419000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcc91227000)
	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fcc9116f000)
	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fcc9113b000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcc91133000)
	libavahi-common.so.3 => /lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007fcc91125000)
	libavahi-client.so.3 => /lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007fcc91112000)
	libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fcc90f3c000)
	libxslt.so.1 => /lib/x86_64-linux-gnu/libxslt.so.1 (0x00007fcc90efa000)
	libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fcc90d40000)
	libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007fcc90d32000)
	libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007fcc90a33000)
	libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007fcc9084d000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fcc90842000)
	libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007fcc90814000)
	libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007fcc90805000)
	libportaudio.so.2 => /lib/x86_64-linux-gnu/libportaudio.so.2 (0x00007fcc907d3000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fcc90696000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fcc90645000)
	libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fcc9050f000)
	libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fcc904ec000)
	libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fcc9036a000)
	libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fcc90354000)
	libnettle.so.7 => /lib/x86_64-linux-gnu/libnettle.so.7 (0x00007fcc9031a000)
	libhogweed.so.5 => /lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007fcc902e3000)
	libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fcc9025f000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fcc90234000)
	libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007fcc8e773000)
	libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007fcc8e678000)
	libjack.so.0 => /lib/x86_64-linux-gnu/libjack.so.0 (0x00007fcc8e62c000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fcc8e602000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fcc8e551000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fcc8e54b000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fcc8e543000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fcc8e522000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fcc8e404000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fcc8e3e8000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fcc8e3c5000)
$
Sunshine - Moonlight - Good Times - Oolite
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 667
Joined: Sat Aug 09, 2014 4:16 pm

Re: Changing Oolite...

Post by Commander_X »

hiran wrote: Fri Jan 21, 2022 8:42 pm
[...]

Code: Select all

version `ZLIB_1.2.9' not found (required by /lib/x86_64-linux-gnu/libpng16.so.16)

Code: Select all

$ ldd oolite.app/oolite | grep "=> /lib"
[...]
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fcc91a4e000)
[...]
[...]
That should need to be fixed by the "wrapper" script I was talking about.
Here's what I get in my local build environment:

Code: Select all

$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./Linux-deps ldd oolite | grep deps
	libz.so.1 => ./Linux-deps/libz.so.1 (0x00007f07a7c2b000)
	libvorbisfile.so.3 => ./Linux-deps/libvorbisfile.so.3 (0x00007f07a7a23000)
	libpng14.so.14 => ./Linux-deps/libpng14.so.14 (0x00007f07a77ff000)
	libespeak.so.1 => ./Linux-deps/libespeak.so.1 (0x00007f07a735d000)
	libvorbis.so.0 => ./Linux-deps/libvorbis.so.0 (0x00007f07a3cc7000)
That is, you'd need to package the contents of the deps/Linux-deps/x86_64/lib folder in the tar.gz/tgz file (I'm using a Linux-deps folder, at the same level with Resources, under oolite.app; and don't forget the espeak-data in deps/Cross-platform-deps copied to the oolite.app/Resources folder), and issue at least a LD_LIBRARY_PATH pointing to the "lib deps" folder, and a ESPEAK_DATA_PATH pointing to the Resources folder before starting oolite binary (either in the command line, or by exporting them).

For the record, the original packaging script creates a Oolite folder under GNUstep/Applications, and our main concerns are addressed this way:
- LD_LIBRARY_PATH points to an oolite-deps/lib folder (included, and populated with the contents of the deps/Linux-deps/x86_64/lib folder)
- ESPEAK_DATA_PATH points to the oolite.app/Resources folder (espeak-data also pre-included in the package under Resources)

Both are exported in the wrapper before the binary is launched.
hiran wrote: Fri Jan 21, 2022 7:39 pm
[...]
I will change the call to make into

Code: Select all

make -f Makefile release use_deps=yes
and my gut feeling tells me that

Code: Select all

deps/Linux-deps/x86_64/lib_linker/make_so_links.sh
has to be invoked before calling make.
[...]
Yes, before calling make, you'd need to run the "make_so_links.sh" script, and then make sure "use_deps=yes" is in your make command line.
I think some libraries are not captured in the make_so_links.sh file, some manual intervention (or patching of the script) might be needed (I usually go for manual).
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Sat Jan 22, 2022 1:02 am
That should need to be fixed by the "wrapper" script I was talking about.
Where in the git repo is the wrapper? I guess it just needs to be copied to the right location?
Commander_X wrote: Sat Jan 22, 2022 1:02 am
That is, you'd need to package the contents of the deps/Linux-deps/x86_64/lib folder in the tar.gz/tgz file (I'm using a Linux-deps folder, at the same level with Resources, under oolite.app; and don't forget the espeak-data in deps/Cross-platform-deps copied to the oolite.app/Resources folder), and issue at least a LD_LIBRARY_PATH pointing to the "lib deps" folder, and a ESPEAK_DATA_PATH pointing to the Resources folder before starting oolite binary (either in the command line, or by exporting them).

For the record, the original packaging script creates a Oolite folder under GNUstep/Applications, and our main concerns are addressed this way:
- LD_LIBRARY_PATH points to an oolite-deps/lib folder (included, and populated with the contents of the deps/Linux-deps/x86_64/lib folder)
- ESPEAK_DATA_PATH points to the oolite.app/Resources folder (espeak-data also pre-included in the package under Resources)

Both are exported in the wrapper before the binary is launched.
Ok, point taken. But where is that wrapper?
Commander_X wrote: Sat Jan 22, 2022 1:02 am
hiran wrote: Fri Jan 21, 2022 7:39 pm
[...]
I will change the call to make into

Code: Select all

make -f Makefile release use_deps=yes
and my gut feeling tells me that

Code: Select all

deps/Linux-deps/x86_64/lib_linker/make_so_links.sh
has to be invoked before calling make.
[...]
Yes, before calling make, you'd need to run the "make_so_links.sh" script, and then make sure "use_deps=yes" is in your make command line.
I think some libraries are not captured in the make_so_links.sh file, some manual intervention (or patching of the script) might be needed (I usually go for manual).
I just looked at that script, and all it does is to create a few symlinks in the current working directory.
But from which directory is it supposed to be called? Or where do we expect the symlinks to appear before going into make?
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Sat Jan 22, 2022 1:02 am
hiran wrote: Fri Jan 21, 2022 7:39 pm
[...]
I will change the call to make into

Code: Select all

make -f Makefile release use_deps=yes
and my gut feeling tells me that

Code: Select all

deps/Linux-deps/x86_64/lib_linker/make_so_links.sh
has to be invoked before calling make.
[...]
Yes, before calling make, you'd need to run the "make_so_links.sh" script, and then make sure "use_deps=yes" is in your make command line.
I think some libraries are not captured in the make_so_links.sh file, some manual intervention (or patching of the script) might be needed (I usually go for manual).
I just looked at that script, and all it does is to create a few symlinks in the current working directory.
But from which directory is it supposed to be called? Or where do we expect the symlinks to appear before going into make?
[/quote]

Just out of the blue I suspected the script should create the symlinks in it's own directory. So I called it like

Code: Select all

cd deps/Linux-deps/x86_64/lib_linker; ./make_so_links.sh
The release I obtained actually got one step further: For a short moment I could see the Oolite splash screen before the application terminated.

Code: Select all

$ openapp ./oolite.app/
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
Can't read data file: '/usr/share/espeak-data/phontab'
Failed to load espeak-data
AL lib: (EE) alc_cleanup: 1 device not closed
$
This should be the moment where the path you mentioned is required. So now I need to find the wrapper script.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

So when I look at my Oolite installation 1.90, I can see in ~/GNUstep/Applications/Oolite there is

Code: Select all

oolite -> shell script, calling
  oolite.app/oolite-wrapper -> shell script, calling
    oolite -> elf binary
For whatever reason, I find none of these scripts in the git repository. Where are they hosted? Where are the scripts that used to assemble a release?
Sunshine - Moonlight - Good Times - Oolite
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 667
Joined: Sat Aug 09, 2014 4:16 pm

Re: Changing Oolite...

Post by Commander_X »

hiran wrote: Sat Jan 22, 2022 2:53 pm
[...] Where are they hosted? Where are the scripts that used to assemble a release?
I'd guess these scripts are in "installers" folder and subfolders. But what they "assemble" is all over the map.
I found the "source" for Linux wrappers in the "deps/Linux-deps" folder (main one being "oolite.src", and the update one "oolite-update.src").
Hope this helps.
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Sat Jan 22, 2022 6:54 pm
hiran wrote: Sat Jan 22, 2022 2:53 pm
[...] Where are they hosted? Where are the scripts that used to assemble a release?
I'd guess these scripts are in "installers" folder and subfolders. But what they "assemble" is all over the map.
I found the "source" for Linux wrappers in the "deps/Linux-deps" folder (main one being "oolite.src", and the update one "oolite-update.src").
Hope this helps.
Oh my, now that you mention it...
It is in a different repository: https://github.com/OoliteProject/oolite ... oolite.src

Meanwhile I have a linux tar ball that works for me. And I soon have an AppImge that hopefully works for me...
Sunshine - Moonlight - Good Times - Oolite
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 667
Joined: Sat Aug 09, 2014 4:16 pm

Re: Changing Oolite...

Post by Commander_X »

hiran wrote: Sat Jan 22, 2022 7:51 pm
[...]
Meanwhile I have a linux tar ball that works for me. And I soon have an AppImge that hopefully works for me...
Neither one worked for me. I won't go into any issue research with AppImage, as I'm not too aware of how it's supposed to be packaged -- my only experiences are with rpcs3 and lmms, which simply work.

In the tar ball, though, I noticed some issues. First you're relying on "openapp" to start oolite, and that's only available for Linux users that have "GNUstep-base" installed. Oolite comes with its own GNUstep-base shared library, so openapp might not be available.

You don't set the LD_LIBRARY_PATH, thus you rely on the local versions of the libraries Oolite uses (not those in the lib folder you package). I managed to overcome the

Code: Select all

./oolite.app/oolite: error while loading shared libraries: libportaudio.so.2: cannot open shared object file: No such file or directory
message only after I set the value of this variable to its absolute path (did the same for ESPEAK_DATA_PATH).
User avatar
hiran
Theorethicist
Posts: 2179
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Changing Oolite...

Post by hiran »

Commander_X wrote: Sat Jan 22, 2022 9:09 pm
hiran wrote: Sat Jan 22, 2022 7:51 pm
[...]
Meanwhile I have a linux tar ball that works for me. And I soon have an AppImge that hopefully works for me...
Neither one worked for me. I won't go into any issue research with AppImage, as I'm not too aware of how it's supposed to be packaged -- my only experiences are with rpcs3 and lmms, which simply work.

In the tar ball, though, I noticed some issues. First you're relying on "openapp" to start oolite, and that's only available for Linux users that have "GNUstep-base" installed. Oolite comes with its own GNUstep-base shared library, so openapp might not be available.

You don't set the LD_LIBRARY_PATH, thus you rely on the local versions of the libraries Oolite uses (not those in the lib folder you package). I managed to overcome the

Code: Select all

./oolite.app/oolite: error while loading shared libraries: libportaudio.so.2: cannot open shared object file: No such file or directory
message only after I set the value of this variable to its absolute path (did the same for ESPEAK_DATA_PATH).
I should have listened to your advice more closely. Meanwhile I added the LD_LIBRARY_PATH but it does not resolve all the missing libraries.
When running the tar ball I get

Code: Select all

$ ./oolite
+ ESPEAK_DATA_PATH=oolite.app/Resources
+ LD_LIBRARY_PATH=oolite.app/lib
+ oolite.app/oolite
oolite.app/oolite: error while loading shared libraries: libgnustep-base.so.1.25: cannot open shared object file: No such file or directory
$
and I can verify only libgnustep-base.so.1.20 is contained. So something is wrong during compilation as we link versus the wrong lib.

The AppImage is still under heavy construction so do not bother right now. I'm learning a lot about an otherwise fine publishing format. It has it's internal quirks...
Sunshine - Moonlight - Good Times - Oolite
Post Reply