83 /* Dense index into cached prototypes and class atoms for standard objects. */
84 enum JSProtoKey {
85 #define PROTOKEY_AND_INITIALIZER(name, clasp) JSProto_##name,
86 JS_FOR_EACH_PROTOTYPE(PROTOKEY_AND_INITIALIZER)
87 #undef PROTOKEY_AND_INITIALIZER
88 JSProto_LIMIT
89 };
or
C:\tools\Windows-mozjs-128\include\js/Class.h(589): error C2131: expression did not evaluate to a constant
C:\tools\Windows-mozjs-128\include\js/Class.h(589): note: failure was caused by non-constant arguments or reference to a non-constant symbol
C:\tools\Windows-mozjs-128\include\js/Class.h(589): note: see usage of 'JSProto_LIMIT'
Class.h:
589 static_assert(JSProto_LIMIT <= (JSCLASS_CACHED_PROTO_MASK + 1),
590 "JSProtoKey must not exceed the maximum cacheable proto-mask");
or
C:\tools\Windows-mozjs-128\include\js/Symbol.h(74): error C2146: syntax error: missing '}' before identifier 'Limit'
C:\tools\Windows-mozjs-128\include\js/Symbol.h(75): error C2440: 'initializing': cannot convert from 'const uint32_t' to 'JS::SymbolCode'
C:\tools\Windows-mozjs-128\include\js/Symbol.h(75): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or parenthesized function-style cast)
C:\tools\Windows-mozjs-128\include\js/Symbol.h(76): error C2440: 'initializing': cannot convert from 'unsigned int' to 'JS::SymbolCode'
C:\tools\Windows-mozjs-128\include\js/Symbol.h(76): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or parenthesized function-style cast)
C:\tools\Windows-mozjs-128\include\js/Symbol.h(77): error C2440: 'initializing': cannot convert from 'unsigned int' to 'JS::SymbolCode'
C:\tools\Windows-mozjs-128\include\js/Symbol.h(77): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or parenthesized function-style cast)
C:\tools\Windows-mozjs-128\include\js/Symbol.h(79): error C2440: 'initializing': cannot convert from 'unsigned int' to 'JS::SymbolCode'
C:\tools\Windows-mozjs-128\include\js/Symbol.h(79): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or parenthesized function-style cast)
C:\tools\Windows-mozjs-128\include\js/Symbol.h(80): error C2143: syntax error: missing ';' before '}'
Symbol.h:
68 enum class SymbolCode : uint32_t {
69 // There is one SymbolCode for each well-known symbol.
70 #define JS_DEFINE_SYMBOL_ENUM(name) name,
71 JS_FOR_EACH_WELL_KNOWN_SYMBOL(
72 JS_DEFINE_SYMBOL_ENUM) // SymbolCode::iterator, etc.
73 #undef JS_DEFINE_SYMBOL_ENUM
74 Limit,
75 WellKnownAPILimit = JS::shadow::Symbol::WellKnownAPILimit,
76 PrivateNameSymbol = 0xfffffffd, // created by the #PrivateName syntax.
77 InSymbolRegistry =
78 0xfffffffe, // created by Symbol.for() or JS::GetSymbolFor()
79 UniqueSymbol = 0xffffffff // created by Symbol() or JS::NewSymbol()
80 };
A complete list of warnings and errors are in the full log: mozjs128.txt
My first idea is, that it maybe has something to do with the Microsoft compiler cl.exe or maybe a C++ standard?
Maybe the compiler switch get not recognized by rebar from the script?
Steps to Reproduce
All happens on Windows
Checkout couchdb with the branch jenkins-simplify-spidermonkeys
Checkout couchdb-glazier
Download Windows-mozjs-128
Add it to the $env:{PATH,LIB,INCLUDE,LIBPATH} environment variables in couchdb-glazier/bin/shell.ps1
Open Powershell and call shell.ps1
CD into the couchdb source directory
Run .\configure.ps1 -SpiderMonkeyVersion 128 -DisableDocs -DisableFauxton
Run .\make.cmd
See the errors from above
A did a quick test for SpiderMonkey v102 too and the problems are similar!
Maybe @nickva and @pgj can have a look and try to reproduce this?
Description
Trying to compile CouchDB with SpiderMonkey 128 (102, 115) on Windows. I used the provided SM binaries from https://github.com/big-r81/couchdb-sm/releases/tag/v0.0.7
We get many compiler warnings from the Mozilla sources and some errors too (Full log: mozjs128.txt).
For example:
Opening
jspubtd.h
shows the following:or
Class.h
:or
Symbol.h
:A complete list of warnings and errors are in the full log: mozjs128.txt
My first idea is, that it maybe has something to do with the Microsoft compiler
cl.exe
or maybe a C++ standard? Maybe the compiler switch get not recognized by rebar from the script?Steps to Reproduce
couchdb
with the branchjenkins-simplify-spidermonkeys
couchdb-glazier
Windows-mozjs-128
$env:{PATH,LIB,INCLUDE,LIBPATH}
environment variables incouchdb-glazier/bin/shell.ps1
shell.ps1
.\configure.ps1 -SpiderMonkeyVersion 128 -DisableDocs -DisableFauxton
.\make.cmd
A did a quick test for SpiderMonkey v102 too and the problems are similar!
Maybe @nickva and @pgj can have a look and try to reproduce this?