wohali commented on issue #2345: port to spidermonkey 60 URL: https://github.com/apache/couchdb/pull/2345#issuecomment-565603871 @jiangphcn on Debian Buster, I did the following: ``` sudo apt install libmozjs-60-0 libmozjs-60-dev git clone https://github.com/apache/couchdb cd couchdb git checkout sm60-davisp ./configure --spidermonkey-version 60 -c make couch ``` This results in the following warnings at build time: ``` Compiling priv/couch_js/60/http.cpp Compiling priv/couch_js/60/main.cpp In file included from /usr/include/time.h:29, from /usr/include/pthread.h:24, from /usr/include/x86_64-linux-gnu/c++/8/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/8/bits/gthr.h:148, from /usr/include/c++/8/ext/atomicity.h:35, from /usr/include/c++/8/bits/basic_string.h:39, from /usr/include/c++/8/string:52, from /usr/include/c++/8/stdexcept:39, from /usr/include/c++/8/array:39, from /usr/include/mozjs-60/mozilla/Span.h:32, from /usr/include/mozjs-60/mozilla/Range.h:12, from /usr/include/mozjs-60/jsapi.h:15, from priv/couch_js/60/main.cpp:23: /usr/include/mozjs-60/js/Proxy.h: In static member function 'static size_t js::BaseProxyHandler::offsetOfFamily()': /usr/include/mozjs-60/js/Proxy.h:212:25: warning: offsetof within non-standard-layout type 'js::BaseProxyHandler' is conditionally-supported [-Winvalid-offsetof] return offsetof(BaseProxyHandler, mFamily); ^ priv/couch_js/60/main.cpp: In function 'bool req_ctor(JSContext*, unsigned int, JS::Value*)': priv/couch_js/60/main.cpp:90:32: warning: too many arguments for format [-Wformat-extra-args] JS_ReportErrorUTF8(cx, "Failed to create CouchHTTP instance.\n", NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Compiling priv/couch_js/60/utf8.cpp In file included from /usr/include/strings.h:23, from /usr/include/string.h:431, from /usr/include/c++/8/cstring:42, from /usr/include/mozjs-60/mozilla/Span.h:33, from /usr/include/mozjs-60/mozilla/Range.h:12, from /usr/include/mozjs-60/jsapi.h:15, from priv/couch_js/60/utf8.cpp:13: /usr/include/mozjs-60/js/Proxy.h: In static member function 'static size_t js::BaseProxyHandler::offsetOfFamily()': /usr/include/mozjs-60/js/Proxy.h:212:25: warning: offsetof within non-standard-layout type 'js::BaseProxyHandler' is conditionally-supported [-Winvalid-offsetof] return offsetof(BaseProxyHandler, mFamily); ^ ``` Do you see these as well? I do see that `make javascript` passes, which is good. Next step for me is to read the code a bit more closely. @davisp if you're able to describe the changes you're making to the upstream JS libraries that'd be most useful. I have asked @tilgovi to look at the sandboxing for this code and SM60. He says he hopes to have time this weekend for a code review.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
