coin
coin copied to clipboard
coin fails to build vs spidermonkey-52.9.1_pre1
Original report by Fabio Rossi (Bitbucket: efferre79, GitHub: efferre79).
Attachments: coin-9999:20190309-121941.log.gz
The first errors start as
#!c++
[ 26%] Building CXX object src/base/CMakeFiles/base.dir/SbRotation.cpp.o
cd /var/tmp/portage/media-libs/coin-9999/work/coin-9999_build/src/base && /usr/bin/x86_64-pc-linux-gnu-g
In file included from m/usr/include/mozjs-52/jsalloc.h:17:0,
from m/usr/include/mozjs-52/jsapi.h:26,
from m/var/tmp/portage/media-libs/coin-9999/work/Coin-9999/src/glue/spidermonkey.cpp:58
m/usr/include/mozjs-52/js/TypeDecls.h:25:8: error: using typedef-name ‘mJSContext’ after ‘mstruct’
struct JSContext;
^~~~~~~~~
In file included from m/var/tmp/portage/media-libs/coin-9999/work/Coin-9999/src/glue/spidermonkey.cpp:34
m/var/tmp/portage/media-libs/coin-9999/work/Coin-9999/include/Inventor/C/glue/spidermonkey.h:104:14: not
typedef void JSContext;
^~~~~~~~~
In file included from m/usr/include/mozjs-52/jsalloc.h:17:0,
from m/usr/include/mozjs-52/jsapi.h:26,
from m/var/tmp/portage/media-libs/coin-9999/work/Coin-9999/src/glue/spidermonkey.cpp:58
m/usr/include/mozjs-52/js/TypeDecls.h:26:7: error: using typedef-name ‘mJSFunction’ after ‘mclass’
class JSFunction;
^~~~~~~~~~
I am attaching the full build log
Original comment by Fabio Rossi (Bitbucket: efferre79, GitHub: efferre79).
The JSVERSION_IS_ECMA macro has been removed from upstream jspubtd.h in 2013, commit 6bdee6d353f6fa350bd8b607c1a3b14073966095, this causes redefinition of js-related types, structures, etc in include/Inventor/C/glue/spidermonkey.h
Original comment by Fabio Rossi (Bitbucket: efferre79, GitHub: efferre79).
of course I am trying to build with -DCOIN_HAVE_JAVASCRIPT=ON
Original comment by Giampiero Gabbiani (Bitbucket: ggabbiani, GitHub: ggabbiani).
Hi Fabio,
you're right, things changed so much from the originally supported js version, that fixing this issue would involve a re-writing of the coin glue code.
Any idea from someone skilled about js/spidermonkey is welcome...
Regards Giampiero
Original comment by Fabio Rossi (Bitbucket: efferre79, GitHub: efferre79).
The latest spidermonkey with JSVERSION_IS_ECMA defined is version 17 but it still doesn't compile. Latest supported version by coin is than 1.8.5. If the patch to the coin code is not straight forward, I would start adding a fix in cmake system to avoid looking for newer versions of spidermonkey
Original comment by Fabio Rossi (Bitbucket: efferre79, GitHub: efferre79).
I have opened pull request #347 to temporarily fix the issue restricting spidermonkey versions to search for
Original comment by Fabio Rossi (Bitbucket: efferre79, GitHub: efferre79).
When applying the diff included with pull request #347 (basically there is a fix on the detection of SpiderMonkey include/libs with versions 1.7.0 and 1.8.5), I get the same error reported in this issue even with version 1.7.0. So it seems coin is not compatible with any SpiderMonkey version