Page MenuHomeWildfire Games

[SM52] Spidermonkey Upgrade 1/2 : build system upgrade to 52.9.1
ClosedPublic

Authored by wraitii on Nov 11 2020, 8:15 PM.

Details

Summary

This incorporates the build system changes to upgrade to SM52.

You will need to download the tarball at https://github.com/wraitii/0ad/blob/sm52/libraries/source/spidermonkey/mozjs-52.9.1pre1.tar.bz2
Test the full branch at https://github.com/wraitii/0ad/tree/sm52.

Patch by @Itms
Part of the SM52 migration.

Test Plan

Review the build changes for oddities. Try compiling them on all major systems.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
wraitii updated this revision to Diff 13940.Nov 15 2020, 2:58 PM

Pro-gamer move.

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

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

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

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

Stan added inline comments.Nov 15 2020, 3:39 PM
libraries/source/spidermonkey/build.sh
166

What's this for?

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

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

wraitii updated this revision to Diff 13942.Nov 15 2020, 4:16 PM

I believe

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

builderr-debug-macos.txt
In file included from ../../../source/network/NetClientTurnManager.cpp:20:
In file included from ../../../source/network/NetClientTurnManager.h:21:
In file included from ../../../source/simulation2/system/TurnManager.h:22:
In file included from ../../../source/simulation2/helpers/SimulationCommand.h:21:
../../../source/scriptinterface/ScriptInterface.h:362:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
../../../source/scriptinterface/ScriptInterface.h:362:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetClientTurnManager.cpp:20:
In file included from ../../../source/network/NetClientTurnManager.h:21:
In file included from ../../../source/simulation2/system/TurnManager.h:22:
In file included from ../../../source/simulation2/helpers/SimulationCommand.h:21:
../../../source/scriptinterface/ScriptInterface.h:375:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Cannot retrieve private JS class data because from a non-object value!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
../../../source/scriptinterface/ScriptInterface.h:375:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Cannot retrieve private JS class data because from a non-object value!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetClientTurnManager.cpp:20:
In file included from ../../../source/network/NetClientTurnManager.h:21:
In file included from ../../../source/simulation2/system/TurnManager.h:22:
In file included from ../../../source/simulation2/helpers/SimulationCommand.h:21:
../../../source/scriptinterface/ScriptInterface.h:381:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
../../../source/scriptinterface/ScriptInterface.h:381:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
../../../source/network/NetClient.cpp:83:2: error: no matching function for call to 'JS_AddExtraGCRootsTracer'
        JS_AddExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1610:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_AddExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
../../../source/network/NetClient.cpp:147:2: error: no matching function for call to 'JS_RemoveExtraGCRootsTracer'
        JS_RemoveExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1614:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_RemoveExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
3 errors generated.
make[1]: *** [obj/network_Debug/NetClientTurnManager.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:23:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetClient.cpp:74:2: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        m_GameAttributes(game->GetSimulation2()->GetScriptInterface().GetJSRuntime()),
        ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
In file included from ../../../source/network/NetMessageSim.cpp:23:
../../../source/scriptinterface/ScriptInterface.h:362:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetMessageSim.cpp:23:
../../../source/scriptinterface/ScriptInterface.h:375:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Cannot retrieve private JS class data because from a non-object value!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetMessageSim.cpp:23:
../../../source/scriptinterface/ScriptInterface.h:381:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetMessage.cpp:24:
In file included from ../../../source/simulation2/Simulation2.h:22:
In file included from ../../../source/simulation2/helpers/SimulationCommand.h:21:
../../../source/scriptinterface/ScriptInterface.h:362:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetMessage.cpp:24:
In file included from ../../../source/simulation2/Simulation2.h:22:
In file included from ../../../source/simulation2/helpers/SimulationCommand.h:21:
../../../source/scriptinterface/ScriptInterface.h:375:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Cannot retrieve private JS class data because from a non-object value!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
In file included from ../../../source/network/NetMessage.cpp:24:
In file included from ../../../source/simulation2/Simulation2.h:22:
In file included from ../../../source/simulation2/helpers/SimulationCommand.h:21:
../../../source/scriptinterface/ScriptInterface.h:381:4: error: use of undeclared identifier 'JS_ReportError'; did you mean 'JS_ReportErrorUTF8'?
                        JS_ReportError(rq.cx, "Private data of the given object is null!");
                        ^~~~~~~~~~~~~~
                        JS_ReportErrorUTF8
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:5258:1: note: 'JS_ReportErrorUTF8' declared here
JS_ReportErrorUTF8(JSContext* cx, const char* format, ...)
^
6 errors generated.
make[1]: *** [obj/network_Debug/NetClient.o] Error 1
In file included from ../../../source/network/NetMessageSim.cpp:20:
In file included from ../../../source/network/NetMessage.h:26:
In file included from ../../../source/network/NetMessages.h:27:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:113:75: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        CNetMessage(NMT_SIMULATION_COMMAND), m_ScriptInterface(scriptInterface), m_Data(scriptInterface.GetJSRuntime())
                                                                                 ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1118:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:119:52: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *, JS::Handle<JS::Value> &>' requested here
        m_Client(client), m_Player(player), m_Turn(turn), m_Data(scriptInterface.GetJSRuntime(), data)
                                                          ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
3 errors generated.
5 errors generated.
make[1]: *** [obj/network_Debug/NetMessageSim.o] Error 1
make[1]: *** [obj/network_Debug/NetMessage.o] Error 1
make: *** [network] Error 2

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

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

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

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

builderr-debug-gcc6.txt
In file included from ../../../source/network/NetClient.h:24:0,
                 from ../../../source/network/NetClient.cpp:20:
../../../source/scriptinterface/ScriptInterface.h: In static member function 'static T* ScriptInterface::GetPrivate(const ScriptInterface::Request&, JS::HandleObject, JSClass*)':
../../../source/scriptinterface/ScriptInterface.h:362:69: error: there are no arguments to 'JS_ReportError' that depend on a template parameter, so a declaration of 'JS_ReportError' must be available [-fpermissive]
    JS_ReportError(rq.cx, "Private data of the given object is null!");
                                                                     ^
../../../source/scriptinterface/ScriptInterface.h:362:69: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../../../source/scriptinterface/ScriptInterface.h: In static member function 'static T* ScriptInterface::GetPrivate(const ScriptInterface::Request&, JS::CallArgs&, JSClass*)':
../../../source/scriptinterface/ScriptInterface.h:375:98: error: there are no arguments to 'JS_ReportError' that depend on a template parameter, so a declaration of 'JS_ReportError' must be available [-fpermissive]
    JS_ReportError(rq.cx, "Cannot retrieve private JS class data because from a non-object value!");
                                                                                                  ^
../../../source/scriptinterface/ScriptInterface.h:381:69: error: there are no arguments to 'JS_ReportError' that depend on a template parameter, so a declaration of 'JS_ReportError' must be available [-fpermissive]
    JS_ReportError(rq.cx, "Private data of the given object is null!");
                                                                     ^
../../../source/network/NetClient.cpp: In constructor 'CNetClient::CNetClient(CGame*, bool)':
../../../source/network/NetClient.cpp:83:87: error: cannot convert 'JSRuntime*' to 'JSContext*' for argument '1' to 'bool JS_AddExtraGCRootsTracer(JSContext*, JSTraceDataOp, void*)'
  JS_AddExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
                                                                                       ^
In file included from ../../../source/scriptinterface/ScriptTypes.h:60:0,
                 from ../../../source/scriptinterface/ScriptInterface.h:23,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/jspubtd.h:106:8: note: class type 'JSRuntime' is incomplete
 struct JSRuntime;
        ^~~~~~~~~
../../../source/network/NetClient.cpp: In destructor 'virtual CNetClient::~CNetClient()':
../../../source/network/NetClient.cpp:147:90: error: cannot convert 'JSRuntime*' to 'JSContext*' for argument '1' to 'void JS_RemoveExtraGCRootsTracer(JSContext*, JSTraceDataOp, void*)'
  JS_RemoveExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
                                                                                          ^
In file included from ../../../source/scriptinterface/ScriptTypes.h:60:0,
                 from ../../../source/scriptinterface/ScriptInterface.h:23,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/jspubtd.h:106:8: note: class type 'JSRuntime' is incomplete
 struct JSRuntime;
        ^~~~~~~~~
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:0,
                 from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29,
                 from ../../../source/scriptinterface/ScriptTypes.h:61,
                 from ../../../source/scriptinterface/ScriptInterface.h:23,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h: In instantiation of 'JS::PersistentRooted<T>::PersistentRooted(const RootingContext&) [with RootingContext = JSRuntime*; T = JS::Value]':
../../../source/network/NetClient.cpp:77:16:   required from here
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:40: error: no matching function for call to 'JS::PersistentRooted<JS::Value>::rootLists(JSRuntime* const&)'
         registerWithRootLists(rootLists(cx));
                               ~~~~~~~~~^~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate: js::RootLists& JS::PersistentRooted<T>::rootLists(JSContext*) [with T = JS::Value]
     js::RootLists& rootLists(JSContext* cx) {
                    ^~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note:   no known conversion for argument 1 from 'JSRuntime* const' to 'JSContext*'
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate: js::RootLists& JS::PersistentRooted<T>::rootLists(JS::RootingContext*) [with T = JS::Value]
     js::RootLists& rootLists(JS::RootingContext* cx) {
                    ^~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note:   no known conversion for argument 1 from 'JSRuntime* const' to 'JS::RootingContext*'
make[1]: *** [obj/network_Debug/NetClient.o] Error 1
make: *** [network] Error 2

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

Freagarach added inline comments.Nov 16 2020, 8:19 AM
libraries/osx/build-osx-libs.sh
921–922
libraries/source/spidermonkey/build.sh
92

One could also use wget since curl is not always present in light images? Not sure what pro's and cons of curl vs wget are.

wraitii updated this revision to Diff 13962.Nov 16 2020, 2:06 PM

Link statically and fix a few other mistakes.

wraitii edited the summary of this revision. (Show Details)Nov 16 2020, 2:09 PM

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

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

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

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

I've manually tested that tests compile and run under Mac & Windows+Debian via the CI. I would like confirmation from real users (use the git branch, it's easier).

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

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

wraitii updated this revision to Diff 13969.Nov 16 2020, 4:52 PM

I need to stop testing this on dirty repos

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

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

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

builderr-debug-macos.txt
../../../source/network/NetClient.cpp:83:2: error: no matching function for call to 'JS_AddExtraGCRootsTracer'
        JS_AddExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1610:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_AddExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
../../../source/network/NetClient.cpp:147:2: error: no matching function for call to 'JS_RemoveExtraGCRootsTracer'
        JS_RemoveExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1614:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_RemoveExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
In file included from ../../../source/network/NetMessageSim.cpp:20:
In file included from ../../../source/network/NetMessage.h:26:
In file included from ../../../source/network/NetMessages.h:27:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:113:75: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        CNetMessage(NMT_SIMULATION_COMMAND), m_ScriptInterface(scriptInterface), m_Data(scriptInterface.GetJSRuntime())
                                                                                 ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1118:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:119:52: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *, JS::Handle<JS::Value> &>' requested here
        m_Client(client), m_Player(player), m_Turn(turn), m_Data(scriptInterface.GetJSRuntime(), data)
                                                          ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:25:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetClient.cpp:74:2: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        m_GameAttributes(game->GetSimulation2()->GetScriptInterface().GetJSRuntime()),
        ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
2 errors generated.
make[1]: *** [obj/network_Debug/NetMessageSim.o] Error 1
make[1]: *** Waiting for unfinished jobs....
3 errors generated.
make[1]: *** [obj/network_Debug/NetClient.o] Error 1
make: *** [network] Error 2

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

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

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

Stan added a comment.Nov 16 2020, 6:38 PM

Link statically and fix a few other mistakes.

libraries/source/spidermonkey/build.sh
46

Extra "?

92

No wget on mac IIRC.

117

Inline?

150

We still use those on Windows.

wraitii updated this revision to Diff 13970.Nov 16 2020, 6:47 PM

Fix staticness of libs on Linux. Use wget or curl for fetching the lib.
Few cleanups. Ought to build libs on linux and MacOS on CI.

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

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

Freagarach added inline comments.Nov 16 2020, 7:11 PM
libraries/source/spidermonkey/build.sh
92

My linux doesn't like this, it complains that is misses a fi. Also the link is dead ;(

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

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

wraitii updated this revision to Diff 13971.Nov 16 2020, 7:32 PM

This one ought to be functional.

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

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

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

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

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

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

wraitii updated this revision to Diff 13972.Nov 16 2020, 8:14 PM

I'm hopeful this fixes wget woes

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

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

Freagarach added inline comments.Nov 16 2020, 8:28 PM
libraries/source/spidermonkey/build.sh
92–93

?

93

wget -o does not do what you'd expect ^^'

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

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

wraitii updated this revision to Diff 13973.Nov 16 2020, 9:01 PM

At least I'm testing the windows CI :p

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

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

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

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

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

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

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

builderr-debug-macos.txt
In file included from ../../../source/network/NetMessageSim.cpp:20:
In file included from ../../../source/network/NetMessage.h:26:
In file included from ../../../source/network/NetMessages.h:27:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:113:75: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        CNetMessage(NMT_SIMULATION_COMMAND), m_ScriptInterface(scriptInterface), m_Data(scriptInterface.GetJSRuntime())
                                                                                 ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1118:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:119:52: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *, JS::Handle<JS::Value> &>' requested here
        m_Client(client), m_Player(player), m_Turn(turn), m_Data(scriptInterface.GetJSRuntime(), data)
                                                          ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
../../../source/network/NetClient.cpp:83:2: error: no matching function for call to 'JS_AddExtraGCRootsTracer'
        JS_AddExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1610:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_AddExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
../../../source/network/NetClient.cpp:147:2: error: no matching function for call to 'JS_RemoveExtraGCRootsTracer'
        JS_RemoveExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1614:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_RemoveExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:25:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetClient.cpp:74:2: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        m_GameAttributes(game->GetSimulation2()->GetScriptInterface().GetJSRuntime()),
        ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
2 errors generated.
make[1]: *** [obj/network_Debug/NetMessageSim.o] Error 1
make[1]: *** Waiting for unfinished jobs....
3 errors generated.
make[1]: *** [obj/network_Debug/NetClient.o] Error 1
make: *** [network] Error 2

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

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

builderr-debug-gcc6.txt
../../../source/network/NetClient.cpp: In constructor 'CNetClient::CNetClient(CGame*, bool)':
../../../source/network/NetClient.cpp:83:87: error: cannot convert 'JSRuntime*' to 'JSContext*' for argument '1' to 'bool JS_AddExtraGCRootsTracer(JSContext*, JSTraceDataOp, void*)'
  JS_AddExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
                                                                                       ^
In file included from ../../../source/scriptinterface/ScriptTypes.h:60:0,
                 from ../../../source/scriptinterface/ScriptInterface.h:25,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/jspubtd.h:106:8: note: class type 'JSRuntime' is incomplete
 struct JSRuntime;
        ^~~~~~~~~
../../../source/network/NetClient.cpp: In destructor 'virtual CNetClient::~CNetClient()':
../../../source/network/NetClient.cpp:147:90: error: cannot convert 'JSRuntime*' to 'JSContext*' for argument '1' to 'void JS_RemoveExtraGCRootsTracer(JSContext*, JSTraceDataOp, void*)'
  JS_RemoveExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
                                                                                          ^
In file included from ../../../source/scriptinterface/ScriptTypes.h:60:0,
                 from ../../../source/scriptinterface/ScriptInterface.h:25,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/jspubtd.h:106:8: note: class type 'JSRuntime' is incomplete
 struct JSRuntime;
        ^~~~~~~~~
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:0,
                 from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29,
                 from ../../../source/scriptinterface/ScriptTypes.h:61,
                 from ../../../source/scriptinterface/ScriptInterface.h:25,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h: In instantiation of 'JS::PersistentRooted<T>::PersistentRooted(const RootingContext&) [with RootingContext = JSRuntime*; T = JS::Value]':
../../../source/network/NetClient.cpp:77:16:   required from here
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:40: error: no matching function for call to 'JS::PersistentRooted<JS::Value>::rootLists(JSRuntime* const&)'
         registerWithRootLists(rootLists(cx));
                               ~~~~~~~~~^~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate: js::RootLists& JS::PersistentRooted<T>::rootLists(JSContext*) [with T = JS::Value]
     js::RootLists& rootLists(JSContext* cx) {
                    ^~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note:   no known conversion for argument 1 from 'JSRuntime* const' to 'JSContext*'
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate: js::RootLists& JS::PersistentRooted<T>::rootLists(JS::RootingContext*) [with T = JS::Value]
     js::RootLists& rootLists(JS::RootingContext* cx) {
                    ^~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note:   no known conversion for argument 1 from 'JSRuntime* const' to 'JS::RootingContext*'
make[1]: *** [obj/network_Debug/NetClient.o] Error 1
make: *** [network] Error 2

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

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

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

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

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

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

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

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

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

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

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

Merging this later today.

Stan requested changes to this revision.Nov 18 2020, 1:21 PM
Stan added inline comments.
libraries/osx/build-osx-libs.sh
921

Won't that mess other software ?

libraries/source/spidermonkey/build.sh
93

Remove this ?

99

Why do you need to be specific?

102

Unrelated to comment.

117

?

150

Do you still plan to statically link it for this version? If not you should continue to copy the dlls.

libraries/source/spidermonkey/patch.sh
34

Wonder if we should check for GCC version

source/tools/tracelogger/tracelogger_options.sh
12

?

This revision now requires changes to proceed.Nov 18 2020, 1:21 PM
wraitii added inline comments.Nov 18 2020, 2:12 PM
libraries/source/spidermonkey/build.sh
99

because I've set it up locally to have include-unix-debug-sm45/52/60/68/78 folders, and less precise would delete everything.

150

Not the latest version, I'm linking dynamically.

Stan added inline comments.Nov 18 2020, 2:17 PM
libraries/source/spidermonkey/build.sh
99

Probably something that shouldn't be commited?

150

Okay, cause you said it was too big :) .

wraitii updated this revision to Diff 14016.Nov 18 2020, 2:18 PM

For internal coherence, final build script update.

wraitii added inline comments.Nov 18 2020, 2:22 PM
libraries/source/spidermonkey/build.sh
117

I didn't inline these two because:

  • that makes the debug symmetrical with the release (and might be missed otherwise).
  • it's convenient when commenting parts out which I had to do a lot of.

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

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

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

builderr-debug-gcc6.txt
../../../source/network/NetClient.cpp: In constructor 'CNetClient::CNetClient(CGame*, bool)':
../../../source/network/NetClient.cpp:83:87: error: cannot convert 'JSRuntime*' to 'JSContext*' for argument '1' to 'bool JS_AddExtraGCRootsTracer(JSContext*, JSTraceDataOp, void*)'
  JS_AddExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
                                                                                       ^
In file included from ../../../source/scriptinterface/ScriptTypes.h:60:0,
                 from ../../../source/scriptinterface/ScriptInterface.h:25,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/jspubtd.h:106:8: note: class type 'JSRuntime' is incomplete
 struct JSRuntime;
        ^~~~~~~~~
../../../source/network/NetClient.cpp: In destructor 'virtual CNetClient::~CNetClient()':
../../../source/network/NetClient.cpp:147:90: error: cannot convert 'JSRuntime*' to 'JSContext*' for argument '1' to 'void JS_RemoveExtraGCRootsTracer(JSContext*, JSTraceDataOp, void*)'
  JS_RemoveExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
                                                                                          ^
In file included from ../../../source/scriptinterface/ScriptTypes.h:60:0,
                 from ../../../source/scriptinterface/ScriptInterface.h:25,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/jspubtd.h:106:8: note: class type 'JSRuntime' is incomplete
 struct JSRuntime;
        ^~~~~~~~~
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:0,
                 from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29,
                 from ../../../source/scriptinterface/ScriptTypes.h:61,
                 from ../../../source/scriptinterface/ScriptInterface.h:25,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h: In instantiation of 'JS::PersistentRooted<T>::PersistentRooted(const RootingContext&) [with RootingContext = JSRuntime*; T = JS::Value]':
../../../source/network/NetClient.cpp:77:16:   required from here
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:40: error: no matching function for call to 'JS::PersistentRooted<JS::Value>::rootLists(JSRuntime* const&)'
         registerWithRootLists(rootLists(cx));
                               ~~~~~~~~~^~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate: js::RootLists& JS::PersistentRooted<T>::rootLists(JSContext*) [with T = JS::Value]
     js::RootLists& rootLists(JSContext* cx) {
                    ^~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note:   no known conversion for argument 1 from 'JSRuntime* const' to 'JSContext*'
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate: js::RootLists& JS::PersistentRooted<T>::rootLists(JS::RootingContext*) [with T = JS::Value]
     js::RootLists& rootLists(JS::RootingContext* cx) {
                    ^~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note:   no known conversion for argument 1 from 'JSRuntime* const' to 'JS::RootingContext*'
make[1]: *** [obj/network_Debug/NetClient.o] Error 1
make: *** [network] Error 2

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

Stan added inline comments.Nov 18 2020, 3:01 PM
source/scriptinterface/ScriptTypes.h
75

Would be nice to print it only once

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

builderr-debug-macos.txt
../../../source/network/NetClient.cpp:83:2: error: no matching function for call to 'JS_AddExtraGCRootsTracer'
        JS_AddExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1610:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_AddExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
../../../source/network/NetClient.cpp:147:2: error: no matching function for call to 'JS_RemoveExtraGCRootsTracer'
        JS_RemoveExtraGCRootsTracer(GetScriptInterface().GetJSRuntime(), CNetClient::Trace, this);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:1614:1: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *' to 'JSContext *'
JS_RemoveExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data);
^
In file included from ../../../source/network/NetMessageSim.cpp:20:
In file included from ../../../source/network/NetMessage.h:26:
In file included from ../../../source/network/NetMessages.h:27:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:113:75: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        CNetMessage(NMT_SIMULATION_COMMAND), m_ScriptInterface(scriptInterface), m_Data(scriptInterface.GetJSRuntime())
                                                                                 ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1118:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetMessageSim.cpp:119:52: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *, JS::Handle<JS::Value> &>' requested here
        m_Client(client), m_Player(player), m_Turn(turn), m_Data(scriptInterface.GetJSRuntime(), data)
                                                          ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
2 errors generated.
make[1]: *** [obj/network_Debug/NetMessageSim.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:25:
In file included from ../../../source/scriptinterface/ScriptTypes.h:61:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:29:
In file included from ../../../libraries/source/spidermonkey/include-unix-debug/js/CallArgs.h:73:
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1111:31: error: no matching member function for call to 'rootLists'
        registerWithRootLists(rootLists(cx));
                              ^~~~~~~~~
../../../source/network/NetClient.cpp:74:2: note: in instantiation of function template specialization 'JS::PersistentRooted<JS::Value>::PersistentRooted<JSRuntime *>' requested here
        m_GameAttributes(game->GetSimulation2()->GetScriptInterface().GetJSRuntime()),
        ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1093:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JSContext *'
    js::RootLists& rootLists(JSContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1096:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'JS::RootingContext *'
    js::RootLists& rootLists(JS::RootingContext* cx) {
                   ^
../../../libraries/source/spidermonkey/include-unix-debug/js/RootingAPI.h:1102:20: note: candidate function not viable: cannot convert argument of incomplete type 'JSRuntime *const' to 'js::ContextFriendFields *'
    js::RootLists& rootLists(js::ContextFriendFields* cx) = delete;
                   ^
3 errors generated.
make[1]: *** [obj/network_Debug/NetClient.o] Error 1
make: *** [network] Error 2

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

This revision was not accepted when it landed; it landed in state Needs Review.Nov 18 2020, 3:40 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.