Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Can anybody get CPAN JavaScript libraries to build?

by Rhandom (Curate)
on Jul 15, 2013 at 22:32 UTC ( #1044466=perlquestion: print w/replies, xml ) Need Help??

Rhandom has asked for the wisdom of the Perl Monks concerning the following question:

Has anybody succeeded recently at installing either JavaScript or JavaScript::V8. I am running ubuntu raring and have had no shortage of trouble getting either one to install. I have a long standing perl module requiring a JavaScript engine that I've been wanting to publish to CPAN for over a year, but neither of these modules seems to be in actual working order. I'v been trying to get this to go since at least summer of last year.

If anybody has successfully built it, and you remember how you did it (or can still duplicate the build) please let me know.

Paul
my @a=qw(random brilliant braindead); print $a[rand(@a)];
  • Comment on Can anybody get CPAN JavaScript libraries to build?

Replies are listed 'Best First'.
Re: Can anybody get CPAN JavaScript libraries to build?
by jeffa (Bishop) on Jul 15, 2013 at 23:29 UTC

    I had success with JavaScript 10 years ago: (jeffa) Re: Encrypt web files!. The only hint that i gave then was ensuring you had the right Javascript libs installed ...

    For example, when i try to install JavaScript now, i see that Makefile.PL fails to create a makefile because the jsapi.h header is not found. Perhaps you don't have the necessary files installed ...

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: Can anybody get CPAN JavaScript libraries to build?
by tobyink (Canon) on Jul 16, 2013 at 06:38 UTC

    I've successfully used JavaScript::SpiderMonkey and JE.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: Can anybody get CPAN JavaScript libraries to build?
by mtmcc (Hermit) on Jul 16, 2013 at 08:22 UTC
    You might have a good point.

    I've been trying for an hour or so, and this is as far as I can get, but no further.

    Out of interest, did ~/.cpanm/build.log tell you anything?

    Let me know if you figure it out, it's bugging me now!

    -Michael

      Yes, for JavaScript, I started out with errors about jsapi.h - which I found in the mozjs bits, which I then got into a path, but then it started not finding other headers, some of which appear to no longer exist.

      It feels like SpiderMonkey has changed its API and JavaScript and JavaScript::SeaMonkey haven't been updated to follow allong.

      my @a=qw(random brilliant braindead); print $a[rand(@a)];
        I think you're probably right.

        -Michael

Re: Can anybody get CPAN JavaScript libraries to build?
by Anonymous Monk on Jul 15, 2013 at 23:18 UTC

    I am running ubuntu raring and have had no shortage of trouble getting either one to install.

    Such as? Maybe you want to install an older version, one released the same time period as the perl module

      Such as?

      Really? Such as not being able to install. I can tell you what I've tried. I know my installation isn't working. I'm more interested if other people have tried and actually succeeded. Which is why I asked if anybody has actually succeeded in installing.

      In the case of V8, I've tried the native libraries that come with ubuntu (currently v8 3.8.9). I've worked with native checkouts of v8 codebase (v8 3.20.5), building them with gyp, and not ending up with any loadable objects (so that directly isn't a JavaScript::V8 issue). I've succeeded in installing Alien::V8 (v8 3.1.5). For the versions I have successfully installed when I then try and build JavaScript::V8 against it and then run tests I get the error listed in the bug that I filed in RT back in April (rt://84478). Around a year ago I got added to the JavaScript::V8 project and started to poke around, and was able to git-bisect when the errors began occuring. I have asked the authors but have heard nothing. The 0.06 version will build against current libraries, but has a terrible conversion bug (Unknown sv type in sv2v8) that was fixed long ago, but not released and is now combined with the other major (but broken) features of 0.07. At work, I had patched the JavaScript::V8 0.06 library 18 months ago to get around this bug and have used it very successfully in a production environment.

      On the JavaScript and JavaScript::SpiderMonkey, I have tried various combinations of libraries available on recent ubuntu builds and have not come up with a working combination. I have spent less time on seamonkey and mozjs than with V8, but have come up with less of a working solution.

      So again, my question - has anybody successfully installed a CPAN JavaScript library recently?

      I am asking because it has been a broken mess for well over a year and doesn't appear to be getting better. If somebody has, awesome!!! I want to see how you did it. But if not, I'll use my already granted git repo access and backout changes in 0.07 to get back to a more working state from which we can make babysteps towards the more fully functional object support of 0.07.

      my @a=qw(random brilliant braindead); print $a[rand(@a)];

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1044466]
Approved by NetWallah
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2020-10-20 03:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (208 votes). Check out past polls.

    Notices?