Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129222 - dev-lang/spidermonkey threadsafe addition
Summary: dev-lang/spidermonkey threadsafe addition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: http://www.mozilla.org/js/spidermonkey/
Whiteboard:
Keywords:
Depends on:
Blocks: 150175
  Show dependency tree
 
Reported: 2006-04-08 04:32 UTC by Will Robertson
Modified: 2006-11-18 06:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild (spidermonkey-1.5-r1.ebuild,1.01 KB, text/plain)
2006-10-17 08:07 UTC, Ben de Groot (RETIRED)
Details
spidermonkey-1.5-build.patch (spidermonkey-1.5-build.patch,3.38 KB, patch)
2006-10-17 08:07 UTC, Ben de Groot (RETIRED)
Details | Diff
spidermonkey-1.5-header.diff (spidermonkey-1.5-header.diff,243 bytes, patch)
2006-10-17 08:08 UTC, Ben de Groot (RETIRED)
Details | Diff
spidermonkey-1.5-threadsafe.diff (spidermonkey-1.5-threadsafe.diff,507 bytes, patch)
2006-10-17 08:08 UTC, Ben de Groot (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Will Robertson 2006-04-08 04:32:27 UTC
I was hoping that we could add the ability to do threadsafe version of dev-lang/spidermonkey; possibly on IUSE=ithreads
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-08 04:38:30 UTC
Yeah, so submit a patch, preferably upstream. ;)
Comment 2 Will Robertson 2006-04-20 11:19:23 UTC
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.
Comment 3 Ben de Groot (RETIRED) gentoo-dev 2006-07-29 06:31:03 UTC
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?
Comment 4 Markus 2006-09-23 06:08:15 UTC
The thread-safe version of spidermonkey is working for me as well (amd64).
I would like to see this in portage as well.
Comment 5 Ben de Groot (RETIRED) gentoo-dev 2006-10-17 08:07:21 UTC
Created attachment 99885 [details]
dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild

Ebuild with threadsafe USE flag.
Comment 6 Ben de Groot (RETIRED) gentoo-dev 2006-10-17 08:07:51 UTC
Created attachment 99886 [details, diff]
spidermonkey-1.5-build.patch
Comment 7 Ben de Groot (RETIRED) gentoo-dev 2006-10-17 08:08:15 UTC
Created attachment 99887 [details, diff]
spidermonkey-1.5-header.diff
Comment 8 Ben de Groot (RETIRED) gentoo-dev 2006-10-17 08:08:50 UTC
Created attachment 99888 [details, diff]
spidermonkey-1.5-threadsafe.diff
Comment 9 Kenton Groombridge 2006-10-21 10:53:45 UTC
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
Comment 10 Kenton Groombridge 2006-10-25 10:07:57 UTC
Nevermind the previous post, finally figured out that I had to add "threadsafe" to my USE flags manually by editing /etc/make.conf
Comment 11 Alexis Ballier gentoo-dev 2006-10-25 14:12:38 UTC
Thanks for the patches, I just applied them to the bumped spidermonkey-1.5-r2.


Alexis.