Page MenuHomeWildfire Games

Use pkg-config with spidermonkey when not using --with-system-mozjs
Needs ReviewPublic

Authored by s0600204 on May 9 2021, 3:25 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

As mentioned in D3611, we currently only use pkg-config with spidermonkey when the --with-system-mozjs argument is passed to update-workspaces.sh.

This revision changes things so we always use pkg-config with spidermonkey on Linux, BSD, and Mac OSX systems. In the process, this revision also changes the spidermonkey build process to use make install instead of manually copying all relevant artefacts out of spidermonkey's build process.

Depends on D3611 (and until that is merged to svn, this revision will fail to build on the CI).


A previous version of this revision moved the version-tracked Windows build artefacts to libraries/win32/ so as to keep them out the way. This is no longer being done (as it made this too large to be reviewable) but could be reconsidered.

Test Plan
  • Apply parent revision
  • Apply this revision
  • Run update_workspaces.sh if on Linux, BSD, or OSX.
  • Rebuild pyrogenesis
  • Report any build errors

Event Timeline

s0600204 created this revision.May 9 2021, 3:25 AM
s0600204 created this object with visibility "Custom Policy".
Owners added a subscriber: Restricted Owners Package.May 9 2021, 3:25 AM
Vulcan added a comment.May 9 2021, 4:02 AM

Successful build - Chance fights ever on the side of the prudent.

Debug: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Release: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

    22>e:\jenkins\workspace\vs2015-differential\source\maths\fixed.h(158): warning C4724: potential mod by 0 [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\test.vcxproj]

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/5283/display/redirect

Vulcan added a comment.May 9 2021, 4:04 AM

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-macos.txt
In file included from ../../../source/ps/VisualReplay.cpp:25:
../../../source/lib/external_libraries/libsdl.h:32:11: fatal error: 'SDL.h' file not found
# include "SDL.h"
          ^~~~~~~
In file included from ../../../source/ps/GameSetup/GameSetup.cpp:25:
../../../source/lib/external_libraries/libsdl.h:32:11: fatal error: 'SDL.h' file not found
# include "SDL.h"
          ^~~~~~~
fatal error: malformed or corrupted AST file: 'could not find file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/source/spidermonkey/include-unix-debug/mozilla/LinkedList.h' referenced by AST file 'obj/engine_Debug/precompiled.h.gch''
fatal error: malformed or corrupted AST file: 'could not find file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/source/spidermonkey/include-unix-debug/mozilla/LinkedList.h' referenced by AST file 'obj/engine_Debug/precompiled.h.gch''
1 error generated.
make[1]: *** [obj/engine_Debug/SavedGame.o] Error 1
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[1]: *** [obj/engine_Debug/VisualReplay.o] Error 1
1 error generated.
make[1]: *** [obj/engine_Debug/GameSetup.o] Error 1
1 error generated.
make[1]: *** [obj/engine_Debug/ModIo.o] Error 1
make: *** [engine] Error 2

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/4190/display/redirect

s0600204 requested review of this revision.May 9 2021, 4:50 AM
s0600204 updated this revision to Diff 17464.May 9 2021, 5:42 PM
s0600204 edited the summary of this revision. (Show Details)

A version of this that doesn't move the Win32 build artefacts.

This does make the code a little messier, but means this change is a lot smaller and easier to review as we're not moving hundreds of files.

Note that I don't actually know where mozmake install will place things on a Windows system, so parts of spidermonkey/build.sh are guess work.

Vulcan added a comment.May 9 2021, 5:43 PM

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-macos.txt
In file included from ../../../source/ps/GameSetup/GameSetup.cpp:25:
../../../source/lib/external_libraries/libsdl.h:32:11: fatal error: 'SDL.h' file not found
# include "SDL.h"
          ^~~~~~~
In file included from ../../../source/ps/ModIo.cpp:25:
In file included from ../../../source/ps/ModIo.h:28:
In file included from ../../../source/scriptinterface/ScriptInterface.h:25:
In file included from ../../../source/scriptinterface/ScriptRequest.h:21:
../../../source/scriptinterface/ScriptForward.h:37:10: fatal error: 'js/TypeDecls.h' file not found
#include "js/TypeDecls.h"
         ^~~~~~~~~~~~~~~~
In file included from ../../../source/ps/Mod.cpp:20:
In file included from ../../../source/ps/Mod.h:23:
In file included from ../../../source/scriptinterface/ScriptInterface.h:25:
In file included from ../../../source/scriptinterface/ScriptRequest.h:21:
../../../source/scriptinterface/ScriptForward.h:37:10: fatal error: 'js/TypeDecls.h' file not found
#include "js/TypeDecls.h"
         ^~~~~~~~~~~~~~~~
In file included from ../../../source/ps/Replay.cpp:30:
In file included from ../../../source/ps/Mod.h:23:
In file included from ../../../source/scriptinterface/ScriptInterface.h:25:
In file included from ../../../source/scriptinterface/ScriptRequest.h:21:
../../../source/scriptinterface/ScriptForward.h:37:10: fatal error: 'js/TypeDecls.h' file not found
#include "js/TypeDecls.h"
         ^~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [obj/engine_Debug/Replay.o] Error 1
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[1]: *** [obj/engine_Debug/GameSetup.o] Error 1
1 error generated.
make[1]: *** [obj/engine_Debug/ModIo.o] Error 1
1 error generated.
make[1]: *** [obj/engine_Debug/Mod.o] Error 1
make: *** [engine] Error 2

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/4204/display/redirect

Vulcan added a comment.May 9 2021, 5:48 PM

Successful build - Chance fights ever on the side of the prudent.

Debug: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

    13>e:\jenkins\workspace\vs2015-differential\source\ps\mod.cpp(146): warning C4100: 'flags': unreferenced formal parameter [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\engine.vcxproj]
    13>e:\jenkins\workspace\vs2015-differential\source\ps\mod.cpp(146): warning C4100: 'args': unreferenced formal parameter [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\engine.vcxproj]
Release: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

    13>e:\jenkins\workspace\vs2015-differential\source\ps\mod.cpp(146): warning C4100: 'flags': unreferenced formal parameter [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\engine.vcxproj]
    13>e:\jenkins\workspace\vs2015-differential\source\ps\mod.cpp(146): warning C4100: 'args': unreferenced formal parameter [E:\Jenkins\workspace\vs2015-differential\build\workspaces\vs2017\engine.vcxproj]

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/5296/display/redirect

Vulcan added a comment.May 9 2021, 5:57 PM

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-gcc7.txt
In file included from ../../../source/ps/XMB/XMBStorage.h:21,
                 from ../../../source/ps/XML/Xeromyces.h:34,
                 from ../../../source/simulation2/system/ComponentTest.h:24,
                 from ../../../source/pch/test/precompiled.h:22:
../../../source/scriptinterface/ScriptForward.h:37:10: fatal error: js/TypeDecls.h: No such file or directory
 #include "js/TypeDecls.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [test.make:387: obj/test_Debug/precompiled.h.gch] Error 1
make: *** [Makefile:197: test] Error 2

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/5918/display/redirect

s0600204 updated this revision to Diff 17739.May 22 2021, 8:54 PM
s0600204 edited the summary of this revision. (Show Details)
s0600204 edited the test plan for this revision. (Show Details)

Revision now contains just the changes for this revision, and not also the changes of its parent.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/6096/display/redirect

s0600204 changed the visibility from "Custom Policy" to "Public (No Login Required)".May 25 2021, 5:09 PM
s0600204 updated this revision to Diff 18735.Sep 25 2021, 3:08 AM

Rebase now that parent revision has been committed

(This should now build on the CI... I hope)

Successful build - Chance fights ever on the side of the prudent.

Debug: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Release: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/6107/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-macos.txt
fatal error: malformed or corrupted AST file: 'could not find file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/source/spidermonkey/include-unix-debug/mozilla/MathAlgorithms.h' referenced by AST file 'obj/test_Debug/precompiled.h.gch''
fatal error: malformed or corrupted AST file: 'could not find file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/source/spidermonkey/include-unix-debug/mozilla/MathAlgorithms.h' referenced by AST file 'obj/test_Debug/precompiled.h.gch''
1 error generated.
1 error generated.
make[1]: *** [obj/test_Debug/test_tex.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [obj/test_Debug/test_root.o] Error 1
make: *** [test] Error 2

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/5013/display/redirect