Jump to content

cxxtest build failed


danto
 Share

Recommended Posts

ok, i solved this problem but now when i run make i get another error

Generating test root file
/home/user/0ad/libraries/source/cxxtest-4.4/bin/cxxtestgen --root  --include=precompiled.h --runner=ErrorPrinter -o /home/user/0ad/source/test_root.cpp
/usr/bin/env: "python": File or directory does not exist
make[1]: *** [cxxtestroot.make:36: ../../../binaries/system/cxxtestroot] Error 127
make: *** [Makefile:199: cxxtestroot] Error 2

 

Link to comment
Share on other sites

I am trying to build the game from your Gitea source code and have encountered similar failures with cxxtest. I am trying to build the source libraries by running

$ ./libraries/build-source-libs.sh

And the output is:

Building third-party dependencies...

./build-source-libs.sh: line 61: ./source/cxxtest-4.4/build.sh: No such file or directory
ERROR: cxxtest build failed

 

 

I then tried to parse in the arguments mentioned above:

$ ./build-source-libs.sh --with-system-cxxtest 

And I was hit with FCollada build failure due to missing files:


Building third-party dependencies...


./build-source-libs.sh: line 64: ./source/fcollada/build.sh: No such file or directory
ERROR: FCollada build failed

 

Before starting the build, I have installed the dependencies exactly as specified by this page: https://gitea.wildfiregames.com/0ad/0ad/wiki/BuildInstructions

It may be worth noting that the zlib dependency is in conflict with my zlib-ng-compat package. Below is the error from my package manager:

  • resolving dependencies...
    looking for conflicting packages...
    :: zlib-1:1.3.1-2.1 and zlib-ng-compat-2.2.2-6 are in conflict. Remove zlib-ng-compat? [y/N]  
    error: unresolvable package conflicts detected
    error: failed to prepare transaction (conflicting dependencies)
    :: zlib-1:1.3.1-2.1 and zlib-ng-compat-2.2.2-6 are in conflict

     

Link to comment
Share on other sites

Looking at libraries/clean-source-libs.sh I think I know what went wrong.

From the base directory run

git checkout libraries

to restore the extra files deleted by ./libraries/clean-source-libs.sh, then try again.

if you pass --with-system-cxxtest to ./libraries/build-source-libs.sh, then you have to do the same to build/workspaces/update-workspaces.sh and have the cxxtest package installed via package manager.

Edit: https://gitea.wildfiregames.com/0ad/0ad/pulls/7130

  • Thanks 1
Link to comment
Share on other sites

33 minutes ago, hyperion said:

From the base directory run

git checkout libraries

to restore the extra files deleted by ./libraries/clean-source-libs.sh, then try again.

 

Thank you, after following your steps, the build processed advanced a bit further until a new error is encountered:

 

Checked out revision 28209.
Building SpiderMonkey...

SpiderMonkey build options: --disable-tests
           --disable-jemalloc
           --disable-js-shell
           --without-intl-api
           --enable-shared-js
           --disable-jitspew         
patching file js/src/moz.build
patching file js/src/old-configure
patching file python/mozbuild/mozbuild/virtualenv.py
patching file third_party/python/virtualenv/virtualenv/discovery/py_info.py
patching file python/mozbuild/mozbuild/action/process_define_files.py
patching file python/mozbuild/mozbuild/backend/base.py
patching file python/mozbuild/mozbuild/preprocessor.py
patching file python/mozbuild/mozbuild/util.py
patching file python/mozbuild/mozpack/files.py
patching file build/moz.configure/flags.configure
/home/username/build/0ad/libraries/source/spidermonkey/spidermonkey-build/mozjs-91.13.1/python/mozbuild/mozbuild/configure/__init__.py:915: SyntaxWarning: invalid escape sequence '\.'
  RE_MODULE = re.compile("^[a-zA-Z0-9_\.]+$")
Traceback (most recent call last):
  File "/home/username/build/0ad/libraries/source/spidermonkey/spidermonkey-build/mozjs-91.13.1/build-debug/../js/src/../../configure.py", line 22, in <module>
    from mozbuild.configure import (
  File "/home/username/build/0ad/libraries/source/spidermonkey/spidermonkey-build/mozjs-91.13.1/python/mozbuild/mozbuild/configure/__init__.py", line 13, in <module>
    from six.moves import builtins as __builtin__
ModuleNotFoundError: No module named 'six.moves'
ERROR: SpiderMonkey build failed

This looks like Python attempting to import a non  existent module 'six.moves'. However, I do have the python-six package installed.

Link to comment
Share on other sites

Thank you @hyperion, your solution worked. Below are the fully updated build instructions for anyone who is having similar issues:

1. Install the build dependencies as specified in the dependencies section https://trac.wildfiregames.com/wiki/BuildInstructions

But on top of this, you will need to install cxxtest, python-virtualenv, python3.10, git-lfs

 

2. Download the source code from Gitea; the SVN source resulted in permission errors. Run all commands in your terminal:

git lfs install
git clone https://gitea.wildfiregames.com/0ad/0ad.git

 

3. Enter the downloaded folder and create a Python environment there. I named my virtual environment 0ad_build.

cd 0ad
python -m virtualenv 0ad_build --python=python3.10
source 0ad_build/bin/activate

 

4. Now you are in the activated Python 3.10 environment. Build the libraries under this environment:

./libraries/build-source-libs.sh --with-system-cxxtest 

You can add a -j$(nproc) flag to speed up things at the cost of your CPU consumption

 

5. Workspace update:

./build/workspaces/update-workspaces.sh --with-system-cxxtest


6. Making:

cd /build/workspaces/gcc/
make 

 

7. Running:

cd ../../../
binaries/system/pyrogenesis

 

We can put this into a full build script for your convenience, see attached .sh file. Don't forget to chmod +x ;)

0adbuild.sh

Edited by AInur
  • 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...