LinHES Forums

Shepherd cpan JavaScript problem
Page 1 of 1

Author:  Harveythedog [ Fri Jun 04, 2010 8:18 pm ]
Post subject:  Shepherd cpan JavaScript problem

Having a problem updating perl-JavaScript with CPAN to work properly with the rex and news grabbers in my Shepherd (epg grabber) install - I'm sure it worked last time I tried it??.

I get this error when CPAN gets to the Makefile.PL bit:
Is your SpiderMonkey compiled with JS_THREADSAFE (most things will fail if you answer wrong)? [y/N]  y
Whoa there! Attention! You have asked me to build a that links against a SpiderMonkey built with JS_THREADSAFE defined. Although must things will proabaly work as expected some might not and I really don't put much effort into supporting JS_THREADSAFE (actually none expect accept some patches). If you are using a JS_THREADSAFE it's likely because your OS vendor supplied the SpiderMonkey libs you're using and instead I recommend you to download and build your own SpiderMonkey libs that doesn't use JS_THREADSAFE.
Is your SpiderMonkey compiled with support for unicode (t/23-unicode.t will fail if you answer wrong) ? [y/N] [N] n
Do you want support for E4X (requires SpiderMonkey > 1.5) ? [y/N] [N] n
In file included from test_js.c:2:
JavaScript_Env.h:9:19: error: jsapi.h: No such file or directory
JavaScript_Env.h:10:22: error: jsdbgapi.h: No such file or directory
JavaScript_Env.h:11:22: error: jsinterp.h: No such file or directory
JavaScript_Env.h:12:19: error: jsfun.h: No such file or directory
JavaScript_Env.h:13:19: error: jsobj.h: No such file or directory
JavaScript_Env.h:14:19: error: jsprf.h: No such file or directory
JavaScript_Env.h:15:21: error: jsscope.h: No such file or directory
Failed compiling test_js.c. ABORTING

cc -o /tmp/ZYFd3jgAQp test_js.c -I. -I/usr/include/nspr/  -ljs

Googling hasn't provided the answers (probably asking the wrong question...). Does it not see the spidermonkey install? Have I forgotten to install something else?

Any pointers would be appreciated.


Author:  Ozdemon [ Sun Jun 06, 2010 4:11 am ]
Post subject:  Perl dependencies

In Ubuntu 10.04 the javascript perl module was removed. A manual install is required for full functionality. See

The manual install is then tested against rex and news. It may be a coincidence, but you could also be missing some javascript modules.

Author:  Harveythedog [ Sun Jun 06, 2010 6:01 pm ]
Post subject: 

Thanks for the reply Ozdemon.

Maybe you're right, I didn't try to install all the dependencies with cpan, only replace the wonky perl-javascript module from the linhes repo. Perhaps cpan can't see the other modules installed with pacman -S shepherd-dep??

As far as a "shepherd --check" is concerned everything tests OK, so I don't think I'm actually completely missing any critical perl modules...


Author:  Harveythedog [ Tue Jun 08, 2010 6:44 pm ]
Post subject: 

OK, so after much frustration and colourful language I finally got a working perl JavaScript module up and running by altering the two highlighted lines below (from the Makefile.PL) - adding the path to the SpiderMonkey related JavaScript bits needed for everything to make and install.

# Name of lib to link
my $lib = "js";

# Directories with include files
my @incs = "/usr/include/js/";

# Directories with libraries
my @libs;

# Extra header files (sans .h)
my @extra_headers;

# Directory to prefix #include with
my $inc_dir = "/usr/include/js/";

#test for debian type libsmjs

Hopefully the powers that be can one day replace the perl-JavaScript in the repo's with a version built with the threadsafe box ticked to play nicely with Shepherds Rex and News grabbers!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group