Jump to content

Trying to compile 0ad nightly-build – Debian Bookworm


zyli
 Share

Recommended Posts

The page https://trac.wildfiregames.com/wiki/BuildInstructionsGettingTheCode is outdated due to migration to gitea. 
I used the description: https://gitea.wildfiregames.com/0ad/0ad/wiki/NightlyBuild

What did I do?

I created the '0ad' directory and in it as a user I issued the command:

svn checkout https://svn.wildfiregames.com/nightly-build/trunk

At the end of the download there is information: "At revision 46.".

A 'trunk' directory was created which takes up about 14 GB.

There is, among other things, a 'pyrogenesis.exe' file in the 'trunk/binaries/system/' directory.

After copying the 'binaries/' directory with its contents to a pendrive (exfat) and connecting it to a Windows laptop, the game starts correctly.
There is information in the lower left corner: "26 Sept 2024 (main,eb3f0)".

Well, yes, but I want to run it on Debian.

Now I followed the instructions according to: https://trac.wildfiregames.com/wiki/BuildInstructions which is identical to: https://gitea.wildfiregames.com/0ad/0ad/wiki/BuildInstructions 

I checked the dependencies – they were all there. There was too much free space on the disk.

On this system, before the migration to gitea, I compiled 0.0.27 beta from time to time - so there was no need to install anything.

Next instructions:

cd trunk/build/workspaces

The files 'clean-workspaces.sh' and 'update-workspaces.sh' did not have the executable attribute, for this:

chmod +x clean-workspaces.sh
chmod +x update-workspaces.sh

The file 'clean-workspaces.sh' informs that: "This script is deprecated and might be removed in a future release."

I run:

./update-workspaces.sh

I get info: "./update-workspaces.sh: 76: ./build.sh: Permission denied ERROR: Premake 5 build failed"

I check:

ls -al ../premake/build.sh


There is: '-rw-r--r--'

Therefore:

chmod +x ../premake/build.sh

Now again:

./update-workspaces.sh

It went well – no comments.

But in my opinion it lasted too short.

After comparing what the './update-workspaces.sh' command printed now with my build records from before the migration (e.g. rel. 28201) I can see that compilation did not occur:
1. FCollada
2. mozjs-91.13.1
3. NVTT
and maybe others.
Hence the short time the './update-workspaces.sh' command has to work.

But I go further: 

cd gcc 
make 

I receive:

==== Building mocks_real (release) ====
Creating obj/mocks_real_Release
mocks_real.cpp
In file included from ../../../source/mocks/mocks_real.cpp:29:
../../../source/mocks/dlfcn.h:19:10: fatal error: cxxtest/Mock.h: No such file or directory
   19 | #include <cxxtest/Mock.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [mocks_real.make:129: obj/mocks_real_Release/mocks_real.o] Error 1
make: *** [Makefile:163: mocks_real] Error 2

The command 'make clean' and then 'make' again did not helps.

What did I do wrong?

Postscriptum
Until the migration I was compiling 0.0.27 beta quite regularly and had no problems with it.
Due to Debian a small correction had to be made: https://wildfiregames.com/forum/topic/104500-0ad-svn-error-spidermonkey-build-failed/page/2/#comment-541019
'hyperion' – thanks again.

Regards.

 

 

Link to comment
Share on other sites

Thanks Stan – it worked.

But ...

I found the file 'build-source-libs.sh' in the 'trunk/libraries/' directory.

It didn't have the executable attribute, so:

cd libraries/
chmod +x build-source-libs.sh

Now:

./build-source-libs.sh

I got the message:

Building third-party dependencies...

./build-source-libs.sh: 58: ./source/cxxtest-4.4/build.sh: Permission denied
ERROR: cxxtest build failed

It turned out that there are five subdirectories in the 'trunk/libraries/source/' directory:

cxxtest-4.4
fcollada
nvtt
spidermonkey
spirv-reflect

and in each of them there is a file 'build.sh' without the executable attribute.

So:

chmod +x source/cxxtest-4.4/build.sh
chmod +x source/fcollada/build.sh
chmod +x source/nvtt/build.sh
chmod +x source/spidermonkey/build.sh
chmod +x source/spirv-reflect/build.sh

Now only:

./build-source-libs.sh

I read that version 28209 was downloaded.
I think the file 'source/spirv-reflect/build.sh' was not used, because running './build-source-libs.sh' again gives the result:

Building third-party dependencies...
cxxtest-4.4 is already up to date.
FCollada is already up to date.
NVTT is already up to date.
Spidermonkey is already up to date.
Done.

I'm going further.

cd ../build/workspaces/
./update-workspaces.sh

It took a very short time – apparently it had already been built with the previously issued './update-workspaces.sh' command.

Now:

cd gcc
make

It built without errors.

Now

cd ../../..
cd binaries/system/
./test

I see: "Running cxxtest tests (407 tests)...OK!"

It's fine, so:

./pyrogenesis

The game has started.

In the lower left corner is: "6 Oct 2024 (main,eb3f0)".
It works correctly.

Summary of what I did (required dependencies are installed).

svn checkout https://svn.wildfiregames.com/nightly-build/trunk
cd trunk/libraries/
chmod +x build-source-libs.sh
chmod +x source/cxxtest-4.4/build.sh
chmod +x source/fcollada/build.sh
chmod +x source/nvtt/build.sh
chmod +x source/spidermonkey/build.sh
chmod +x source/spirv-reflect/build.sh
./build-source-libs.sh
cd ../build/workspaces/
./update-workspaces.sh
cd gcc
make
cd ../../..
cd binaries/system/
./test
./pyrogenesis

Thanks again.

But every solution raises new questions.

1. The version number used to be trivial (e.g. 28177). Now I get:
a) "At revision 46." – 'svn checkout https://svn.wildfiregames.com/nightly-build/trunk
b)"28209" – './build-source-libs.sh' (cxxtest-4.4)
c) "eb3f0" – after starting the game (bottom left corner).
Which one is important? Is "eb3f0" some hash or a consecutive number?

2. During the update ('svn update') before issuing the command './build-source-libs.sh', should I issue the command 'clean-source-libs.sh'.
I think so, but do I need to re-assign the executable attribute (chmod +x) to the 'build.sh' files in the cxxtest-4.4, fcollada, nvtt, spidermonkey, spirv-reflect subdirectories?

3. I understand that the 'clean-workspaces.sh' command ('build-wokspaces' directory) is deprecated and we don't use it anymore?

Postscriptum
I didn't have to use 'SETUPTOOLS_USE_DISTUTILS=stdlib ./update-workspaces.sh'
https://wildfiregames.com/forum/topic/104500-0ad-svn-error-spidermonkey-build-failed/page/2/#comment-541019
Just the command './update-workspaces.sh' (also './build-source-libs.sh') worked fine.

Best regards.

Link to comment
Share on other sites

2 hours ago, zyli said:

 

1. The version number used to be trivial (e.g. 28177). Now I get:
a) "At revision 46." – 'svn checkout https://svn.wildfiregames.com/nightly-build/trunk
b)"28209" – './build-source-libs.sh' (cxxtest-4.4)
c) "eb3f0" – after starting the game (bottom left corner).
Which one is important? Is "eb3f0" some hash or a consecutive number?

1.a) that's the 46th nightly build. That number doesn't mean much

1.b) That's the number you were used to.

1.c) That's the current commit hash, of the now official repo at https://gitea.wildfiregames.com/0ad/0ad the new repository using git.

 

Link to comment
Share on other sites

2 hours ago, zyli said:

ber?

2. During the update ('svn update') before issuing the command './build-source-libs.sh', should I issue the command 'clean-source-libs.sh'.
I think so, but do I need to re-assign the executable attribute (chmod +x) to the 'build.sh' files in the cxxtest-4.4, fcollada, nvtt, spidermonkey, spirv-reflect subdirectories?

3. I understand that the 'clean-workspaces.sh' command ('build-wokspaces' directory) is deprecated and we don't use it anymore?

2. No unless everything is failing. You probably don't need to assign +x again as that command doesn't do svn reverting AFAIK.

3. I think so.

Link to comment
Share on other sites

Two days have passed - time to write how the update went.

In short:
Everything went very smoothly and without any comments.

First, the 

nproc

command - I got the number "20"

I did the following:

cd trunk/
svn update
cd libraries/
./build-source-libs.sh -j20
cd ../build/workspaces/
./update-workspaces.sh -j20
cd gcc
make -j20
cd ../../..
cd binaries/system/
./test
./pyrogenesis

The 'svn update' command printed at the end: "At revision 48." - two numbers more.
The './build-source-libs.sh' command did not print any number, only the information that: "cxxtest-4.4, FCollada, NVTT, Spidermonkey is already up to date."

After starting the game, in the lower left corner there is an inscription: "Oct 6 2024, (main, f9ad0)"

Thanks again for your help.
Regards.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...