Page MenuHomeWildfire Games

[SM68] Build system changes
ClosedPublic

Authored by wraitii on Nov 25 2020, 3:42 PM.

Details

Summary

Windows users: see https://github.com/wraitii/0ad/tree/sm68

These are the build system changes necessary for SM68. A few new patches, some fixed upstream.

Test Plan

Compile on all major platforms.

Event Timeline

wraitii created this revision.Nov 25 2020, 3:42 PM
Owners added a subscriber: Restricted Owners Package.Nov 25 2020, 3:42 PM

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

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

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

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

Freagarach added inline comments.
build/premake/extern_libs5.lua
589

Variable?

libraries/source/spidermonkey/build.sh
6

You still could make 68.12.1 into a variable ;)

77
81

You may want to exit with a code other than 0.

Freagarach added inline comments.Nov 26 2020, 12:16 PM
libraries/source/spidermonkey/build.sh
78

Only without the ampersand it passes for me. Perhaps you forgot a 2?

Freagarach added a comment.EditedNov 26 2020, 12:42 PM

I needed to install the llvm and rustc package now. And autoconf2.13 is no longer needed. Lubuntu 18.04, GCC 7.5.
(Builds SM fine.)

wraitii updated this revision to Diff 14263.Nov 28 2020, 6:08 PM

Updated to HEAD

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

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

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

builderr-debug-macos.txt
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
../../../source/scriptinterface/ScriptInterface.h:84:2: error: unknown type name 'JSCompartment'; did you mean 'JS::Compartment'?
        JSCompartment* m_formerCompartment;
        ^~~~~~~~~~~~~
        JS::Compartment
../../../libraries/source/spidermonkey/include-unix-debug/js/RealmOptions.h:27:21: note: 'JS::Compartment' declared here
class JS_PUBLIC_API Compartment;
                    ^
In file included from ../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
../../../source/scriptinterface/ScriptInterface.h:84:2: error: unknown type name 'JSCompartment'; did you mean 'JS::Compartment'?
        JSCompartment* m_formerCompartment;
        ^~~~~~~~~~~~~
        JS::Compartment
../../../libraries/source/spidermonkey/include-unix-debug/js/RealmOptions.h:27:21: note: 'JS::Compartment' declared here
class JS_PUBLIC_API Compartment;
                    ^
In file included from ../../../source/network/NetClient.cpp:20:
In file included from ../../../source/network/NetClient.h:24:
../../../source/scriptinterface/ScriptInterface.h:333:37: error: use of undeclared identifier 'JSStructuredCloneData'
        using StructuredClone = shared_ptr<JSStructuredCloneData>;
                                           ^
In file included from ../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
../../../source/scriptinterface/ScriptInterface.h:333:37: error: use of undeclared identifier 'JSStructuredCloneData'
        using StructuredClone = shared_ptr<JSStructuredCloneData>;
                                           ^
../../../source/scriptinterface/ScriptInterface.h:335:2: error: unknown type name 'StructuredClone'
        StructuredClone WriteStructuredClone(JS::HandleValue v, bool sameThread) const;
        ^
../../../source/scriptinterface/ScriptInterface.h:335:2: error: unknown type name 'StructuredClone'
        StructuredClone WriteStructuredClone(JS::HandleValue v, bool sameThread) const;
        ^
../../../source/scriptinterface/ScriptInterface.h:336:33: error: unknown type name 'StructuredClone'
        void ReadStructuredClone(const StructuredClone& ptr, JS::MutableHandleValue ret) const;
                                       ^
../../../source/scriptinterface/ScriptInterface.h:336:33: error: unknown type name 'StructuredClone'
        void ReadStructuredClone(const StructuredClone& ptr, JS::MutableHandleValue ret) const;
                                       ^
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:486:
../../../source/scriptinterface/NativeWrapperDefns.h:164:64: error: no type named 'AutoValueVector' in namespace 'JS'; did you mean 'ValueVector'?
static void AssignOrToJSValHelper(const ScriptRequest& rq, JS::AutoValueVector& argv, const T& a, const Ts&... params)
                                                           ~~~~^~~~~~~~~~~~~~~
                                                               ValueVector
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:95In file included from :7: note: 'ValueVector' declared here
using ValueVector = JS::GCVector<JS::Value>;
      ^
../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:486:
../../../source/scriptinterface/NativeWrapperDefns.h:164:64: error: no type named 'AutoValueVector' in namespace 'JS'; did you mean 'ValueVector'?
static void AssignOrToJSValHelper(const ScriptRequest& rq, JS::AutoValueVector& argv, const T& a, const Ts&... params)
                                                           ~~~~^~~~~~~~~~~~~~~
                                                               ValueVector
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:95:7: note: 'ValueVector' declared here
using ValueVector = JS::GCVector<JS::Value>;
      ^
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:486:
../../../source/scriptinterface/NativeWrapperDefns.h:171:72: error: no type named 'AutoValueVector' in namespace 'JS'; did you mean 'ValueVector'?
static void AssignOrToJSValHelper(const ScriptRequest& UNUSED(rq), JS::AutoValueVector& UNUSED(argv))
                                                                   ~~~~^~~~~~~~~~~~~~~
                                                                       ValueVector
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:95:7: note: 'ValueVector' declared here
using ValueVector = JS::GCVector<JS::Value>;
      ^
In file included from ../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:486:
../../../source/scriptinterface/NativeWrapperDefns.h:171:72: error: no type named 'AutoValueVector' in namespace 'JS'; did you mean 'ValueVector'?
static void AssignOrToJSValHelper(const ScriptRequest& UNUSED(rq), JS::AutoValueVector& UNUSED(argv))
                                                                   ~~~~^~~~~~~~~~~~~~~
                                                                       ValueVector
../../../libraries/source/spidermonkey/include-unix-debug/jsapi.h:95:7: note: 'ValueVector' declared here
using ValueVector = JS::GCVector<JS::Value>;
      ^
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:486:
../../../source/scriptinterface/NativeWrapperDefns.h:182:21: error: expected ';' after expression
        JS::AutoValueVector argv(rq.cx);
                           ^
                           ;
In file included from ../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:486:
../../../source/scriptinterface/NativeWrapperDefns.h:182:21: error: expected ';' after expression
        JS::AutoValueVector argv(rq.cx);
                           ^
                           ;
../../../source/scriptinterface/NativeWrapperDefns.h:182:6: error: no member named 'AutoValueVector' in namespace 'JS'
../../../source/scriptinterface/NativeWrapperDefns.h:182:6: error: no member named 'AutoValueVector' in namespace 'JS'
        JS::AutoValueVector argv(rq.cx);
        ~~~~^
        JS::AutoValueVector argv(rq.cx);
        ~~~~^
../../../source/scriptinterface/NativeWrapperDefns.h:182:22: error: use of undeclared identifier 'argv'
        JS::AutoValueVector argv(rq.cx);
                            ^
../../../source/scriptinterface/NativeWrapperDefns.h:182:22: error: use of undeclared identifier 'argv'
        JS::AutoValueVector argv(rq.cx);
                            ^
../../../source/scriptinterface/NativeWrapperDefns.h:183:10: error: use of undeclared identifier 'argv'
        DISCARD argv.resize(sizeof...(Ts));
                ^
../../../source/scriptinterface/NativeWrapperDefns.h:183:10: error: use of undeclared identifier 'argv'
        DISCARD argv.resize(sizeof...(Ts));
                ^
../../../source/scriptinterface/NativeWrapperDefns.h:184:31: error: use of undeclared identifier 'argv'; did you mean 'nargs'?
        AssignOrToJSValHelper<0>(rq, argv, params...);
                                     ^~~~
                                     nargs
../../../source/scriptinterface/NativeWrapperDecls.h:93:15: note: 'nargs' declared here
static size_t nargs() { return sizeof...(Ts); }
              ^
../../../source/scriptinterface/NativeWrapperDefns.h:184:31: error: use of undeclared identifier 'argv'; did you mean 'nargs'?
        AssignOrToJSValHelper<0>(rq, argv, params...);
                                     ^~~~
                                     nargs
../../../source/scriptinterface/NativeWrapperDecls.h:93:15: note: 'nargs' declared here
static size_t nargs() { return sizeof...(Ts); }
              ^
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:486:
../../../source/scriptinterface/NativeWrapperDefns.h:185:32: error: use of undeclared identifier 'argv'
        if (!CallFunction_(val, name, argv, &jsRet))
                                      ^
In file included from ../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:486:
../../../source/scriptinterface/NativeWrapperDefns.h:185:32: error: use of undeclared identifier 'argv'
        if (!CallFunction_(val, name, argv, &jsRet))
                                      ^
../../../source/scriptinterface/NativeWrapperDefns.h:195:21: error: expected ';' after expression
        JS::AutoValueVector argv(rq.cx);
                           ^
                           ;
../../../source/scriptinterface/NativeWrapperDefns.h:195:6: error: no member named 'AutoValueVector' in namespace 'JS'
        JS::AutoValueVector argv(rq.cx);
        ~~~~^
../../../source/scriptinterface/NativeWrapperDefns.h:195:21: error: expected ';' after expression
        JS::AutoValueVector argv(rq.cx);
                           ^
                           ;
../../../source/scriptinterface/NativeWrapperDefns.h:195:6: error: no member named 'AutoValueVector' in namespace 'JS'
        JS::AutoValueVector argv(rq.cx);
        ~~~~^
../../../source/scriptinterface/NativeWrapperDefns.h:195:22: error: use of undeclared identifier 'argv'
        JS::AutoValueVector argv(rq.cx);
                            ^
../../../source/scriptinterface/NativeWrapperDefns.h:195:22: error: use of undeclared identifier 'argv'
        JS::AutoValueVector argv(rq.cx);
                            ^
../../../source/scriptinterface/NativeWrapperDefns.h:196:10: error: use of undeclared identifier 'argv'
        DISCARD argv.resize(sizeof...(Ts));
                ^
../../../source/scriptinterface/NativeWrapperDefns.h:196:10: error: use of undeclared identifier 'argv'
        DISCARD argv.resize(sizeof...(Ts));
                ^
../../../source/scriptinterface/NativeWrapperDefns.h:197:31: error: use of undeclared identifier 'argv'; did you mean 'nargs'?
        AssignOrToJSValHelper<0>(rq, argv, params...);
                                     ^~~~
                                     nargs
../../../source/scriptinterface/NativeWrapperDecls.h:93:15: note: 'nargs' declared here
static size_t nargs() { return sizeof...(Ts); }
              ^
../../../source/scriptinterface/NativeWrapperDefns.h:197:31: error: use of undeclared identifier 'argv'; did you mean 'nargs'?
        AssignOrToJSValHelper<0>(rq, argv, params...);
                                     ^~~~
                                     nargs
../../../source/scriptinterface/NativeWrapperDecls.h:93:15: note: 'nargs' declared here
static size_t nargs() { return sizeof...(Ts); }
              ^
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:486:
../../../source/scriptinterface/NativeWrapperDefns.h:198:34: error: use of undeclared identifier 'argv'; did you mean 'nargs'?
        return CallFunction_(val, name, argv, jsRet);
                                        ^~~~
                                        nargs
../../../source/scriptinterface/NativeWrapperDecls.h:93:15: note: 'nargs' declared here
static size_t nargs() { return sizeof...(Ts); }
              ^
In file included from ../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:486:
../../../source/scriptinterface/NativeWrapperDefns.h:198:34: error: use of undeclared identifier 'argv'; did you mean 'nargs'?
        return CallFunction_(val, name, argv, jsRet);
                                        ^~~~
                                        nargs
../../../source/scriptinterface/NativeWrapperDecls.h:93:15: note: 'nargs' declared here
static size_t nargs() { return sizeof...(Ts); }
              ^
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:486:
../../../source/scriptinterface/NativeWrapperDefns.h:205:21: error: expected ';' after expression
        JS::AutoValueVector argv(rq.cx);
                           ^
                           ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from ../../../source/network/NetClientTurnManager.cpp:21:
In file included from ../../../source/network/NetClient.h:24:
In file included from ../../../source/scriptinterface/ScriptInterface.h:486:
../../../source/scriptinterface/NativeWrapperDefns.h:205:21: error: expected ';' after expression
        JS::AutoValueVector argv(rq.cx);
                           ^
                           ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [obj/network_Debug/NetClientTurnManager.o] Error 1
make[1]: *** Waiting for unfinished jobs....
20 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/2174/display/redirect

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

builderr-debug-gcc7.txt
In file included from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../source/scriptinterface/ScriptInterface.h:84:2: error: 'JSCompartment' does not name a type; did you mean 'JSContext'?
  JSCompartment* m_formerCompartment;
  ^~~~~~~~~~~~~
  JSContext
In file included from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../source/scriptinterface/ScriptInterface.h:333:37: error: 'JSStructuredCloneData' was not declared in this scope
  using StructuredClone = shared_ptr<JSStructuredCloneData>;
                                     ^~~~~~~~~~~~~~~~~~~~~
../../../source/scriptinterface/ScriptInterface.h:333:37: note: suggested alternative: 'JSStructuredCloneWriter'
  using StructuredClone = shared_ptr<JSStructuredCloneData>;
                                     ^~~~~~~~~~~~~~~~~~~~~
                                     JSStructuredCloneWriter
../../../source/scriptinterface/ScriptInterface.h:333:58: error: template argument 1 is invalid
  using StructuredClone = shared_ptr<JSStructuredCloneData>;
                                                          ^
../../../source/scriptinterface/ScriptInterface.h:335:2: error: 'StructuredClone' does not name a type; did you mean 'JSStructuredCloneWriter'?
  StructuredClone WriteStructuredClone(JS::HandleValue v, bool sameThread) const;
  ^~~~~~~~~~~~~~~
  JSStructuredCloneWriter
../../../source/scriptinterface/ScriptInterface.h:336:33: error: 'StructuredClone' does not name a type; did you mean 'JSStructuredCloneWriter'?
  void ReadStructuredClone(const StructuredClone& ptr, JS::MutableHandleValue ret) const;
                                 ^~~~~~~~~~~~~~~
                                 JSStructuredCloneWriter
In file included from ../../../source/scriptinterface/ScriptInterface.h:486,
                 from ../../../source/network/NetClient.h:24,
                 from ../../../source/network/NetClient.cpp:20:
../../../source/scriptinterface/NativeWrapperDefns.h:164:64: error: 'JS::AutoValueVector' has not been declared
 static void AssignOrToJSValHelper(const ScriptRequest& rq, JS::AutoValueVector& argv, const T& a, const Ts&... params)
                                                                ^~~~~~~~~~~~~~~
../../../source/scriptinterface/NativeWrapperDefns.h: In function 'void AssignOrToJSValHelper(const ScriptRequest&, int&, const T&, const Ts& ...)':
../../../source/scriptinterface/NativeWrapperDefns.h:166:45: error: invalid types 'int[int]' for array subscript
  ScriptInterface::AssignOrToJSVal(rq, argv[i], a);
                                             ^
../../../source/scriptinterface/NativeWrapperDefns.h: At global scope:
../../../source/scriptinterface/NativeWrapperDefns.h:171:72: error: 'JS::AutoValueVector' has not been declared
 static void AssignOrToJSValHelper(const ScriptRequest& UNUSED(rq), JS::AutoValueVector& UNUSED(argv))
                                                                        ^~~~~~~~~~~~~~~
../../../source/scriptinterface/NativeWrapperDefns.h: In member function 'bool ScriptInterface::CallFunction(JS::HandleValue, const char*, R&, const Ts& ...) const':
../../../source/scriptinterface/NativeWrapperDefns.h:182:6: error: 'AutoValueVector' is not a member of 'JS'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
../../../source/scriptinterface/NativeWrapperDefns.h:182:6: note: suggested alternative: 'ValueVector'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
      ValueVector
../../../source/scriptinterface/NativeWrapperDefns.h:183:10: error: 'argv' was not declared in this scope
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
../../../source/scriptinterface/NativeWrapperDefns.h:183:10: note: suggested alternative: 'nargs'
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
          nargs
../../../source/scriptinterface/NativeWrapperDefns.h: In member function 'bool ScriptInterface::CallFunction(JS::HandleValue, const char*, JS::Rooted<T>*, const Ts& ...) const':
../../../source/scriptinterface/NativeWrapperDefns.h:195:6: error: 'AutoValueVector' is not a member of 'JS'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
../../../source/scriptinterface/NativeWrapperDefns.h:195:6: note: suggested alternative: 'ValueVector'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
      ValueVector
../../../source/scriptinterface/NativeWrapperDefns.h:196:10: error: 'argv' was not declared in this scope
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
../../../source/scriptinterface/NativeWrapperDefns.h:196:10: note: suggested alternative: 'nargs'
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
          nargs
../../../source/scriptinterface/NativeWrapperDefns.h: In member function 'bool ScriptInterface::CallFunction(JS::HandleValue, const char*, JS::MutableHandle<T>, const Ts& ...) const':
../../../source/scriptinterface/NativeWrapperDefns.h:205:6: error: 'AutoValueVector' is not a member of 'JS'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
../../../source/scriptinterface/NativeWrapperDefns.h:205:6: note: suggested alternative: 'ValueVector'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
      ValueVector
../../../source/scriptinterface/NativeWrapperDefns.h:206:10: error: 'argv' was not declared in this scope
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
../../../source/scriptinterface/NativeWrapperDefns.h:206:10: note: suggested alternative: 'nargs'
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
          nargs
../../../source/scriptinterface/NativeWrapperDefns.h: In member function 'bool ScriptInterface::CallFunctionVoid(JS::HandleValue, const char*, const Ts& ...) const':
../../../source/scriptinterface/NativeWrapperDefns.h:217:6: error: 'AutoValueVector' is not a member of 'JS'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
../../../source/scriptinterface/NativeWrapperDefns.h:217:6: note: suggested alternative: 'ValueVector'
  JS::AutoValueVector argv(rq.cx);
      ^~~~~~~~~~~~~~~
      ValueVector
../../../source/scriptinterface/NativeWrapperDefns.h:218:10: error: 'argv' was not declared in this scope
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
../../../source/scriptinterface/NativeWrapperDefns.h:218:10: note: suggested alternative: 'nargs'
  DISCARD argv.resize(sizeof...(Ts));
          ^~~~
          nargs
make[1]: *** [network.make:145: obj/network_Debug/NetClient.o] Error 1
make: *** [Makefile:77: network] Error 2

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

wraitii requested review of this revision.Nov 28 2020, 8:04 PM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 30 2020, 10:17 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.