Jump to content

Errors when Compiling with system mozjs on Manjaro 22


andy5995
 Share

Recommended Posts

This is the first time I tried compiling with system mozjs. On Manjaro LInux, I've installed the js78 package.

js78 --version

reports 78.15.0

In the 0ad workspaces directory, I ran

./update-workspaces.sh --with-system-mozjs  -j5

 

 

It completed:

Quote

 

...

Generated ../workspaces/gcc/ActorEditor.make...
Generated ../workspaces/gcc/Collada.make...
Generated ../workspaces/gcc/cxxtestroot.make...
Generated ../workspaces/gcc/test.make...
Done (1636ms).

 

 

But when I ran

make -C gcc -j5

I got a failure very quickly:

 

Quote

make: Entering directory '/home/andy/src/0ad-svn/build/workspaces/gcc'
==== Building mocks_real (release) ====
Creating obj/mocks_real_Release
mocks_real.cpp
Linking mocks_real
==== Building network (release) ====
Creating obj/network_Release
precompiled.h
In file included from ../../../source/network/NetMessages.h:27,
                 from ../../../source/network/NetMessage.h:26,
                 from ../../../source/pch/network/precompiled.h:26:
../../../source/scriptinterface/ScriptTypes.h:77:2: error: #error Your compiler is trying to use an incorrect major version of the SpiderMonkey library. The only version that works is the one in the libraries/spidermonkey/ directory, and it will not work with a typical system-installed version. Make sure you have got all the right files and include paths.
   77 | #error Your compiler is trying to use an incorrect major version of the \
      |  ^~~~~
../../../source/scriptinterface/ScriptTypes.h:85:2: error: #error Your compiler is trying to use an untested minor version of the SpiderMonkey library. If you are a package maintainer, please make sure to check very carefully that this version does not change the behaviour of the code executed by SpiderMonkey. Different parts of the game (e.g. the multiplayer mode) rely on deterministic behaviour of the JavaScript engine. A simple way for testing this would be playing a network game with one player using the old version and one player using the new version. Another way for testing is running replays and comparing the final hash (check trac.wildfiregames.com/wiki/Debugging#Replaymode). For more information check this link: trac.wildfiregames.com/wiki/Debugging#Outofsync
   85 | #error Your compiler is trying to use an untested minor version of the \
      |  ^~~~~
make[1]: *** [network.make:138: obj/network_Release/precompiled.h.gch] Error 1
make: *** [Makefile:79: network] Error 2
make: Leaving directory '/home/andy/src/0ad-svn/build/workspaces/gcc'

 

 

Edited by andy5995
code formatting
Link to comment
Share on other sites

Unfortunately system won't work, because it's likely vendored it with an older icu version (maybe 69). Source:

Yesterday someone tried to build it with ArchLinuxARM, and got a lot of

undefined reference to icu_69::Locale::getUS()

See [Differential] D3127 Change when system-provided mozjs headers are searched (wildfiregames.com)

The problem is the game won't go look for /usr/include/mozjs-91/unicode and it shouldn't anyway.

You can still try after the [Diffusion] rP27440 (wildfiregames.com) commit.

  • 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...