why not check if mozjs is compiled with the right parameters
Closed this issue · 0 comments
If mozjs185 is compiled without --enable-threadsafe --use-system-nspr the build is failing with this :
uilding libcjs_la-byteArray.lo
CC libcjs_la-byteArray.lo
cjs/byteArray.c: In function 'gjs_byte_array_constructor':
cjs/byteArray.c:467:5: warning: passing argument 1 of 'JS_GetClass' from incompatible pointer type [enabled by default]
/nix/store/shccnsykqkyiampwica54srm942g70kf-spidermonkey-185-1.0.0/include/js/jsapi.h:2122:1: note: expected 'struct JSObject *' but argument is of type 'struct JSContext *'
cjs/byteArray.c:467:5: error: too many arguments to function 'JS_GetClass'
/nix/store/shccnsykqkyiampwica54srm942g70kf-spidermonkey-185-1.0.0/include/js/jsapi.h:2122:1: note: declared here
cjs/byteArray.c:468:5: warning: passing argument 1 of 'JS_GetClass' from incompatible pointer type [enabled by default]
/nix/store/shccnsykqkyiampwica54srm942g70kf-spidermonkey-185-1.0.0/include/js/jsapi.h:2122:1: note: expected 'struct JSObject *' but argument is of type 'struct JSContext *'
cjs/byteArray.c:468:5: error: too many arguments to function 'JS_GetClass'
/nix/store/shccnsykqkyiampwica54srm942g70kf-spidermonkey-185-1.0.0/include/js/jsapi.h:2122:1: note: declared here
Why not add a check for this at configure time so inexperienced users see a proper error message instead of a make error.
Roelof