Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] perl -MCPAN -e 'install JavaScript' fails - no ljs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
JonW
n00b
n00b


Joined: 09 Sep 2004
Posts: 34
Location: Sydney, Australia

PostPosted: Mon Jun 19, 2006 12:54 pm    Post subject: [SOLVED] perl -MCPAN -e 'install JavaScript' fails - no ljs Reply with quote

Hi,

I'm trying to install javascript support in perl, so that I can get my XMLTV grabber going again. I couldn't find any packages in portage that provide this. I've been advised to run:-

Code:
perl -MCPAN -e 'install JavaScript'


but it fails like so:-

Code:

CPAN: File::HomeDir loaded ok
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Thu, 15 Jun 2006 22:28:24 GMT
Running install for module JavaScript
Running make for C/CL/CLAESJAC/JavaScript-0.55.tar.gz
CPAN: Digest::SHA loaded ok
CPAN: Module::Signature loaded ok
WARNING: This key is not certified with a trusted signature!
Primary key fingerprint: 2E66 557A B97C 19C7 91AF  8E20 328D A867 450F 89EC
Signature for /root/.cpan/sources/authors/id/C/CL/CLAESJAC/CHECKSUMS ok
CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/C/CL/CLAESJAC/JavaScript-0.55.tar.gz ok
Scanning cache /root/.cpan/build for sizes
JavaScript-0.55
JavaScript-0.55/Changes
JavaScript-0.55/t
JavaScript-0.55/t/t50object.t
JavaScript-0.55/t/t70file.t
JavaScript-0.55/t/t00basic.t
JavaScript-0.55/t/t90error.t
JavaScript-0.55/t/t40error.t
JavaScript-0.55/t/t20call.t
JavaScript-0.55/t/t30script.t
JavaScript-0.55/t/t70file.js
JavaScript-0.55/t/t60can.t
JavaScript-0.55/t/t10class.t
JavaScript-0.55/MANIFEST
JavaScript-0.55/TODO
JavaScript-0.55/JavaScript.pm
JavaScript-0.55/typemap
JavaScript-0.55/META.yml
JavaScript-0.55/JavaScript.pod
JavaScript-0.55/JavaScript.xs
JavaScript-0.55/README
JavaScript-0.55/Makefile.PL
Removing previously used /root/.cpan/build/JavaScript-0.55
Package came without SIGNATURE


  CPAN.pm: Going to build C/CL/CLAESJAC/JavaScript-0.55.tar.gz

Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -ljs
Writing Makefile for JavaScript
CPAN: YAML loaded ok
cp JavaScript.pm blib/lib/JavaScript.pm
AutoSplitting blib/lib/JavaScript.pm (blib/lib/auto/JavaScript)
cp JavaScript.pod blib/lib/JavaScript.pod
/usr/bin/perl5.8.4 /usr/lib/perl5/vendor_perl/5.8.4/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.4/ExtUtils/typemap -typemap typemap  J
avaScript.xs > JavaScript.xsc && mv JavaScript.xsc JavaScript.c
gcc -c  -I/usr/lib/MozillaFirefox/include/js/ -I/usr/lib/MozillaFirefox/ -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-ali
JavaScript.xs:7:19: jsapi.h: No such file or directory

<SNIP>

JavaScript.xs:1463: error: invalid application of `sizeof' to an incomplete type
JavaScript.xs:1469: error: dereferencing pointer to incomplete type
JavaScript.xs:1470: error: dereferencing pointer to incomplete type
JavaScript.xs:1470: error: dereferencing pointer to incomplete type
JavaScript.xs:1470: error: dereferencing pointer to incomplete type
JavaScript.xs:1470: error: `line' undeclared (first use in this function)
JavaScript.xs:1472: error: dereferencing pointer to incomplete type
make: *** [JavaScript.o] Error 1


Looks like I'm missing ljs, but I don't know how to get it!

My perl version looks like this:-

Code:
server ~ # perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.6.8.1, archname=i686-linux-thread-multi
    uname='linux server 2.6.8.1 #6 sun oct 10 18:44:35 est 2004 i686 pentium iii (katmai) genuineintel gnulinux '
    config_args='-des -Darchname=i686-linux-thread -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dcc=gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth=  -Doptimize=-march=pentium3 -O3 -pipe -fomit-frame-pointer -Duselargefiles -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dinstallman1dir=/usr/share/man/man1 -Dinstallman3dir=/var/tmp/portage/perl-5.8.4-r1/image//usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dcf_by=Gentoo -Ud_csh -Dusethreads -Di_ndbm -Di_gdbm -Di_db'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-march=pentium3 -O3 -pipe -fomit-frame-pointer',
    cppflags='-DPERL5 -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing'
    ccversion='', gccversion='3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.3.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.3'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Dec  2 2004 18:47:50
  @INC:
    /etc/perl
    /usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.4
    /usr/lib/perl5/site_perl/5.8.2
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.4/i686-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.4
    /usr/lib/perl5/vendor_perl/5.8.2
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.4/i686-linux-thread-multi
    /usr/lib/perl5/5.8.4
    /usr/local/lib/site_perl
    /usr/lib/perl5/site_perl/5.8.2
    /usr/lib/perl5/site_perl/5.8.0
    .
server ~ #


Any help is greatly appreciated.

Cheers,

Jon


Last edited by JonW on Tue Jun 20, 2006 7:15 am; edited 1 time in total
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Mon Jun 19, 2006 3:25 pm    Post subject: Reply with quote

From the README with the module:

http://search.cpan.org/src/CLAESJAC/JavaScript-0.55/README

Quote:
To install JavaScript.pm, make sure you have libjs installed. Otherwize, grab a recent one from ftp://ftp.mozilla.org/pub/js. The module is tested with 1.5 and later.


Although, I would use the following URL to get the latest copy: ftp://ftp.mozilla.org/pub/mozilla.org/js
Back to top
View user's profile Send private message
JonW
n00b
n00b


Joined: 09 Sep 2004
Posts: 34
Location: Sydney, Australia

PostPosted: Mon Jun 19, 2006 11:50 pm    Post subject: Reply with quote

Quote:
From the README...


Oops... forgot to RTFM. Thanks for pointing me in the right direction. I have downloaded js, and built it according to the README like so :-

Code:

cd /js/src
gmake -f Makefile.ref


which gives me a directory called Linux_All_DBG.OBJ. However, I assume I need to install the libraries I've built, and the README doesn't tell me how to do that! Any hints?

Cheers,

Jon
Back to top
View user's profile Send private message
Snaketails
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2003
Posts: 78
Location: Boronia.Vic.Oz.Au

PostPosted: Tue Jun 20, 2006 3:31 am    Post subject: Reply with quote

I has the same problem with the missing JavaScript.pm file

Its not currently in portage at the moment, so I had to follow the same `perl -MCPAN -e shell` command line that you had done, but I didn't get the problem with the missing file, not sure why.

After I got it installed (JavaScript.pm) I had the Ask.pm file problem that is in my posting here =>

https://forums.gentoo.org/viewtopic-t-472825.html

de-installing xmltv and reinstalling didn't work :(
Back to top
View user's profile Send private message
JonW
n00b
n00b


Joined: 09 Sep 2004
Posts: 34
Location: Sydney, Australia

PostPosted: Tue Jun 20, 2006 7:11 am    Post subject: Reply with quote

OK, I've got a further. Instrall seems to work OK now. Google came up with these steps:

Code:
tar xfvz js-1.5-rc4.tar.gz
cd js/src
make -f Makefile.ref BUILD_OPT=1
cp js*.h /usr/include/
cd Linux_All_OPT.OBJ
cp js*.h /usr/include/
cp libjs.* /usr/lib/
ldconfig
Back to top
View user's profile Send private message
riscycdj
n00b
n00b


Joined: 09 Oct 2005
Posts: 61

PostPosted: Tue Jun 27, 2006 4:04 am    Post subject: Reply with quote

I installed Firefox with the java use flag enabled. Then I copied the libjs files to the location that the Perl module wants (which incidently is only wrong because of where Gentoo installs it) and then I build Javascript with cpan (install Javascript)

This works. I can give you absolute paths when I get home. Actually now that I think about it I should have just made a symbolic link....duh!
Back to top
View user's profile Send private message
riscycdj
n00b
n00b


Joined: 09 Oct 2005
Posts: 61

PostPosted: Tue Jun 27, 2006 1:02 pm    Post subject: Reply with quote

I had to put the header files in /usr/lib/MozillaFirefox/include/js
Back to top
View user's profile Send private message
awyeah
n00b
n00b


Joined: 25 Mar 2005
Posts: 18

PostPosted: Mon Jul 10, 2006 12:34 pm    Post subject: Reply with quote

Thanks for the info, managed to get the new tv_grab_au working finally :)

I ended up needing to copy all the files from '/usr/include/js/' into '/usr/lib/MozillaFirefox/include/js' and then run 'perl -MCPAN -e 'install JavaScript''
_________________
Desktop PC: AthlonXP 2700+, 1024meg DDR400, 9600xt 256meg, 8.26.18 ati drivers, nForce2, 2.6.16-gentoo-r7
MythTV Box: Athlon64 X2 3800+, 2048meg DDR400, 6800gs 512meg, nForce4 Ultra, 2.6.16-gentoo-r9
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum