Open mykmelez opened 8 years ago
Does this go away if you applied https://github.com/mozilla/spidernode/blob/master/deps/spidershim/spidermonkey-patches/01-mozglue-linux-fix.patch to your external SpiderMonkey tree and rebuild?
Does this go away if you applied https://github.com/mozilla/spidernode/blob/master/deps/spidershim/spidermonkey-patches/01-mozglue-linux-fix.patch to your external SpiderMonkey tree and rebuild?
I already have that patch applied (as well as the other patch in that directory), and I'm building the same branch on both Mac (where it works) and Linux (where it crashes). This is the branch I'm using to build external SpiderMonkey:
https://github.com/mykmelez/gecko-dev/tree/support-spidernode
The repository is a fork of gecko-dev, but the branch itself is using cinnabar. It's merged with the same upstream commit as SpiderNode (e287e69). Here's the relevant part of js/src/old-configure.in, which is identical to the same section of code in SpiderNode's internal SpiderMonkey:
dnl In stand-alone builds we always only want to link executables against mozglue.
if test "$JS_STANDALONE"; then
MOZ_GLUE_IN_PROGRAM=
else
case "${OS_TARGET}" in
Android|WINNT|Darwin)
MOZ_GLUE_IN_PROGRAM=
;;
*)
dnl On !Android !Windows !OSX, we only want to link executables against mozglue
MOZ_GLUE_IN_PROGRAM=1
AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
;;
esac
fi
And here's the complete comparison between the branch and the upstream revision:
https://github.com/mykmelez/gecko-dev/compare/e287e69...support-spidernode
Hmm. The symptoms of what you're describing (crashing when you first call into mozglue only on Linux). It's totally possible that the fix in the patch mentioned above is insufficient to fix this symptom, but this is way out of my comfort zone. Perhaps @glandium may be able to help?
After #205, building SpiderNode against an external SpiderMonkey with NSPR/NSS on Linux succeeds, but the build crashes when JS::detail::InitWithFailureDiagnostic calls mozilla::TimeStamp::ProcessCreation (which should be provided by mozglue):
The failure does not occur when building against an external SpiderMonkey that doesn't have NSPR/NSS, f.e. in automation. It also doesn't occur with NSPR/NSS on Mac. Nor builds against internal SpiderMonkey. It's specific to external SpiderMonkey with NSPR/NSS on Linux.