Changing Oolite...

General discussion for players of Oolite.

Moderators: another_commander, winston

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6053
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Oolite...

Post by another_commander »

Quoting from README_LINUX.txt inside the Doc folder:
Building
========
Type:
make

If this fails and you're certain you have GNUstep's development
stuff installed, make sure you have this in your .bashrc or
equivalent:

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
[...]
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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 »

hiran wrote: Wed Jan 26, 2022 9:20 pm
another_commander wrote: Wed Jan 26, 2022 9:17 pm
hiran wrote: Wed Jan 26, 2022 9:14 pm

Code: Select all

$(shell echo $(GNUSTEP_HOST_CPU) | sed -e s/i.86/x86/ -e s/amd64/x86_64/ )
gives nothing as $(GNUSTEP_HOST_CPU) is undefined.
Whoa! This is not OK. GNUSTEP_HOST should be defined before the build starts, as well as a bunch of other gnustep environment variables. You are probably missing a step somewhere. Please check - on Windows we are running /mingw/../devlibs/gnustep1201/System/Library/Makefiles/GNUstep.sh inside the profile file. Make sure that this Makefiles/GNUstep.sh script runs before you start the build.

If you want to recreate the build system from scratch be my guest. But I cannot help you with that.
Well, I will not be able to recreate the build system alone. :?

The first variable is getting set in ./deps/Linux-deps/oolite.src
Is that one called automatically? Would I have to call it? I will add a call before running make...
What a joke! I just stumbled over the oolite wrapper script that needs to be used at runtime.

So checking what I might call for the build variables to be initialized...

Code: Select all

$ find -name "*.sh"
./installers/posix/makeself-header.sh
./installers/posix/makeself.sh
./installers/posix/make_installer.sh
./tests/mac-build-clean/build-clean.sh
./tools/mkwininst.sh
./tools/mkwinsnapshotinst.sh
./tools/mkmanifest.sh
./deps/Linux-deps/x86/lib_linker/make_so_links.sh
./deps/Linux-deps/x86_64/lib_linker/make_so_links.sh
./deps/Cocoa-deps/scripts/update-mozilla.sh
./deps/Cocoa-deps/scripts/update-sparkle.sh
./deps/Cocoa-deps/scripts/update-library.sh
./deps/mozilla/nsprpub/pr/tests/runtests.sh
./deps/mozilla/nsprpub/admin/makeTargetDirs.sh
./deps/mozilla/nsprpub/admin/repackage.sh
./deps/mozilla/nsprpub/admin/symlinks.sh
./deps/mozilla/js/src/time.sh
./deps/mozilla/js/src/bench.sh
./deps/mozilla/js/src/build/autoconf/match-dir.sh
./deps/mozilla/js/src/build/unix/print-failed-commands.sh
./deps/mozilla/js/src/tests/config.sh
./deps/mozilla/js/src/tests/changes.sh
./deps/mozilla/js/src/tests/process-logs.sh
./deps/mozilla/js/src/tests/bisect.sh
./deps/mozilla/js/src/tests/remove-fixed-failures.sh
./deps/mozilla/js/src/tests/detect-universe.sh
./deps/mozilla/js/src/tests/get-universe.sh
./deps/mozilla/js/src/tests/test.sh
./deps/mozilla/js/src/tests/runtests.sh
./deps/mozilla/js/src/ctypes/libffi/msvcc.sh
./deps/mozilla/js/src/ctypes/libffi/ltmain.sh
./deps/mozilla/js/src/lirasm/testlirc.sh
./deps/libogg/ltmain.sh
./deps/libvorbis/autogen.sh
./deps/libvorbis/ltmain.sh
$
Apart from the make_so_links.sh, which I am running anyway there isn't much...
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6053
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Oolite...

Post by another_commander »

See my last post.

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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 »

I will now define the variables myself.

HOST_ARCH=x86_64

What is GNUSTEP_HOST expected to be?
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6053
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Oolite...

Post by another_commander »

I've told you exactly which script you need to run. Please read my earlier responses.
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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: Wed Jan 26, 2022 9:40 pm See my last post.

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
Good you mention. I missed the blank after the dot.
Now I found /usr/share/GNUstep/Makefiles/GNUstep.sh, and the content is a real eye-opener.
I will run this before make.
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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 now I executed

Code: Select all

. /usr/share/GNUstep/Makefiles/GNUstep.sh; make -fMakefile pkg-posix-nightly
I received an exit code of 2 and this on stderr:

Code: Select all

           "/usr/share/GNUstep/Makefiles/objc.make:30: objc.make is deprecated.  Please use tool.make instead",
            "make[1]: *** No rule to make target 'deps-nightly'.  Stop.",
            "make: *** [Makefile:224: pkg-posix-nightly] Error 2"
Not really a big change. Also when I look at stdout, which contains

Code: Select all

installers/posix/make_installer.sh  1.91.0.7444-220126-d52b6be \"release-snapshot\" \"nightly\"
Again no HOST_ARCH.
Even more strange. if I logon to the system and invoke

Code: Select all

. /usr/share/GNUstep/Makefiles/GNUstep.sh;printenv
I see none of the variables that should get 'exported' in the environment. Same effect with

Code: Select all

source /usr/share/GNUstep/Makefiles/GNUstep.sh;printenv
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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 »

For crying out loud! Why does the script undo everything it performs before?

Code: Select all

$ bash -x /usr/share/GNUstep/Makefiles/GNUstep.sh 2>&1 | grep GNUSTEP_HO
+ GNUSTEP_HOME=/home/vagrant
+ GNUSTEP_HOST=x86_64-pc-linux-gnu
+ GNUSTEP_HOST_CPU=x86_64
+ GNUSTEP_HOST_VENDOR=pc
+ GNUSTEP_HOST_OS=linux-gnu
+ unset GNUSTEP_HOME
+ case "$GNUSTEP_HOST_OS" in
+ case "$GNUSTEP_HOST_OS" in
+ case "$GNUSTEP_HOST_OS" in
+ case "$GNUSTEP_HOST_OS" in
+ unset GNUSTEP_HOST
+ unset GNUSTEP_HOST_CPU
+ unset GNUSTEP_HOST_VENDOR
+ unset GNUSTEP_HOST_OS
$
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6053
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Oolite...

Post by another_commander »

Probably because GNUSTEP_MAKE_STRICT_V2_MODE is set to yes inside the GNUstep.sh script. FWIW, it is set to no in my version of GNUstep.sh, which indicates that it might have to do with the gnustep version used.
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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: Wed Jan 26, 2022 10:28 pm Probably because GNUSTEP_MAKE_STRICT_V2_MODE is set to yes inside the GNUstep.sh script. FWIW, it is set to no in my version of GNUstep.sh, which indicates that it might have to do with the gnustep version used.
Inside that GNUstep.sh I found a variable named GNUSTEP_SH_EXPORT_ALL_VARIABLES and initialized that to 'yes' before running the GNUstep.sh.
The next build succeeded, and I see this on stdout:

Code: Select all

            "Self-extractible archive \"oolite-trunk-1.91.0.d52b6be-dev.linux-x86_64.run\" successfully created.",
            "It is located in the \"installers/posix/\" folder."
I shall leave it like that and call it a night. TBC...
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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 »

hiran wrote: Wed Jan 26, 2022 10:40 pm The next build succeeded, and I see this on stdout:

Code: Select all

            "Self-extractible archive \"oolite-trunk-1.91.0.d52b6be-dev.linux-x86_64.run\" successfully created.",
            "It is located in the \"installers/posix/\" folder."
So I setup the Github Action similarly, and now we get Linux installers automatically:
https://github.com/HiranChaudhuri/oolit ... ag/nightly

I have not tested the content of the file but yet another step is covered.
Thank you another_commander and Commander_X for your patience and support. :-)
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6053
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Oolite...

Post by another_commander »

Regarding this part in the nightly.yml, I see some redundancy, which may or may not be a cause of problems down the line. All this:

Code: Select all

pushd .
cd deps/Linux-deps/x86_64/lib_linker; ./make_so_links.sh
popd
# build the release
make -f Makefile release use_deps=yes pkg-posix-nightly
should be replaced by this:

Code: Select all

# build the release
make -f Makefile pkg-posix-nightly
deps=yes and the make_so_links.sh script are set automatically by the installer script. Also, you don't want both release and pkg-posix-nightly there, you may actually be building a configuration different to the nightly one. pkg-posix-nightly is the only argument that is needed.
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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: Thu Jan 27, 2022 7:26 am Regarding this part in the nightly.yml, I see some redundancy, which may or may not be a cause of problems down the line. All this:

Code: Select all

pushd .
cd deps/Linux-deps/x86_64/lib_linker; ./make_so_links.sh
popd
# build the release
make -f Makefile release use_deps=yes pkg-posix-nightly
should be replaced by this:

Code: Select all

# build the release
make -f Makefile pkg-posix-nightly
deps=yes and the make_so_links.sh script are set automatically by the installer script. Also, you don't want both release and pkg-posix-nightly there, you may actually be building a configuration different to the nightly one. pkg-posix-nightly is the only argument that is needed.
I configured your suggestion. The build is now performed as

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
          # make sure the GNUSTEP_MAKEFILES property is set
          export GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes
          . /usr/share/GNUstep/Makefiles/GNUstep.sh
          # build the release
          make -f Makefile pkg-posix-nightly
When building on Ubuntu 18 and running on Ubuntu 20 I get the message that the libgnustep-base version 1.25 is not found. Which tells me we are not compiling with 1.20 that is part of the oolite directory. Which is also the reason why I need to run apt install libgnustep-base-dev at all.

Something is still wrong, and I believe the problems will continue as long as all these apt install lines are required.
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6053
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Oolite...

Post by another_commander »

Can't you apt-get-install the specific gnustep-base 1.20 version and build against it?

Edit: Hello dependency hell, how are you? :-)
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 854
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: Thu Jan 27, 2022 11:48 am Can't you apt-get-install the specific gnustep-base 1.20 version and build against it?

Edit: Hello dependency hell, how are you? :-)
In practice I never tried - always went for the most up to date one. Let me investigate.

But the real point is: Why do we store specific versions of a library within Github if we then still compile with external references? Should we not try to link towards the stuff we later distribute with the release?
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
Post Reply