I was hoping that we could add the ability to do threadsafe version of dev-lang/spidermonkey; possibly on IUSE=ithreads
Yeah, so submit a patch, preferably upstream. ;)
not sure where upsteam I would submit it. http://lxr.mozilla.org/mozilla/source/js/src/README.html#Build contains the instructions for compiling threadsafe... > By default, all platforms build a version of the JS engine that is not > threadsafe. If you require thread-safety, you must also populate the > mozilla/dist directory with NSPR headers and libraries. (NSPR implements a > portable threading library, among other things. The source is downloadable > via CVS from mozilla/nsprpub.) Next, you must define JS_THREADSAFE when > building the JS engine, either on the command-line (gmake/nmake) or in a > universal header file. However, my Gentoo Desktop stopped working, and instead of taking the time to fix I decided for the first time in 3 years to move to another distro. Nothing wrong with Gentoo, just don't have time to maintain it anymore; and decent alternatives (Ubuntu for me) have recently improved to a usable point.
http://svn.netdomination.org/gentoo-voip/browser/trunk/dev-lang/spidermonkey?rev=225 has an ebuild and patches to apply the threadsafe option. It works for me. Could this be considered for inclusion in portage, please?
The thread-safe version of spidermonkey is working for me as well (amd64). I would like to see this in portage as well.
Created attachment 99885 [details] dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild Ebuild with threadsafe USE flag.
Created attachment 99886 [details, diff] spidermonkey-1.5-build.patch
Created attachment 99887 [details, diff] spidermonkey-1.5-header.diff
Created attachment 99888 [details, diff] spidermonkey-1.5-threadsafe.diff
In an attempt to get the latest Avidemux 2.3 preview 1 and preview 2 to build, I used these files in my portage overlay since these versions of Avidemux require a threadsafe spidermonkey. My include file /usr/include/js/jsapi.h has the line: JS_SuspendRequest(JSContext *cx); But doing a strings /usr/lib/libjs.so | grep JS_SuspendRequest doesn't show this function. I know that this version of spidermonkey is building fine. Here are the lines from the start of the build showing the patches being applied: >>> Unpacking source... >>> Unpacking js-1.5.tar.gz to /var/tmp/portage/dev-lang/spidermonkey-1.5-r1/work * Applying spidermonkey-1.5-build.patch ... [ ok ] * Applying spidermonkey-1.5-threadsafe.diff ... [ ok ] * Applying spidermonkey-1.5-header.diff ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/dev-lang/spidermonkey-1.5-r1/work/js/src And it builds without error. What could I be doing wrong or what am I missing? Thanks, Ken
Nevermind the previous post, finally figured out that I had to add "threadsafe" to my USE flags manually by editing /etc/make.conf
Thanks for the patches, I just applied them to the bumped spidermonkey-1.5-r2. Alexis.