Skip Menu |

This queue is for tickets about the JavaScript-SpiderMonkey CPAN distribution.

Report information
The Basics
Id: 18696
Status: open
Priority: 0/
Queue: JavaScript-SpiderMonkey

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.15
Fixed in: (no value)



Subject: Makefile.PL INC/LIBS detection
Your detection of INC/LIBS paths fails on windows when the js library is installed and compiled in ../js It fails because if (scalar(@JS_INCL_DIRS) == scalar(@c_header_files)) { evaluates as (scalar(../js/src/) == scalar(jsapi.h jsautocfg.h)) I don't quite understand your logic there, but you were probably going for something like this $JS_LIB_DIR = $libfile; $JS_LIB_DIR =~ s/$possible_lib$//; if (@JS_INCL_DIRS and @c_header_files) { last; } else { @JS_INCL_DIRS = (); } } That works fine. You might want to add a note to INSTALL to mention tar zxfv js-1.5.tar.gz cd ..\js\src\ nmake -f js.mak CFG="js - Win32 Release"
Subject: Re: [rt.cpan.org #18696] Makefile.PL INC/LIBS detection
Date: Fri, 14 Apr 2006 19:09:13 +0200
To: bug-JavaScript-SpiderMonkey [...] rt.cpan.org
From: Thomas Busch <thomas [...] careerjet.com>
Hi, it seems the Makefile.PL is unable to find both jsapi.h and jsautocfg.h. Would it be possible for you to send me the directory path of jsapi.h and jsautocfg.h. I don't have a windows machine to test this on. Thomas. Show quoted text
> Your detection of INC/LIBS paths fails on windows when > the js library is installed and compiled in ../js > It fails because > if (scalar(@JS_INCL_DIRS) == scalar(@c_header_files)) { > evaluates as > (scalar(../js/src/) == scalar(jsapi.h jsautocfg.h)) > > I don't quite understand your logic there, > but you were probably going for something like this > $JS_LIB_DIR = $libfile; > $JS_LIB_DIR =~ s/$possible_lib$//; > > if (@JS_INCL_DIRS and @c_header_files) { > last; > } else { > @JS_INCL_DIRS = (); > } > } > > That works fine. > You might want to add a note to INSTALL to mention > > tar zxfv js-1.5.tar.gz > cd ..\js\src\ > nmake -f js.mak CFG="js - Win32 Release" >
Subject: Re: [rt.cpan.org #18696] Makefile.PL INC/LIBS detection
Date: Fri, 14 Apr 2006 19:09:12 +0200
To: bug-JavaScript-SpiderMonkey [...] rt.cpan.org
From: Thomas Busch <thomas [...] careerjet.com>
Hi, it seems the Makefile.PL is unable to find both jsapi.h and jsautocfg.h. Would it be possible for you to send me the directory path of jsapi.h and jsautocfg.h. I don't have a windows machine to test this on. Thomas. Show quoted text
> Your detection of INC/LIBS paths fails on windows when > the js library is installed and compiled in ../js > It fails because > if (scalar(@JS_INCL_DIRS) == scalar(@c_header_files)) { > evaluates as > (scalar(../js/src/) == scalar(jsapi.h jsautocfg.h)) > > I don't quite understand your logic there, > but you were probably going for something like this > $JS_LIB_DIR = $libfile; > $JS_LIB_DIR =~ s/$possible_lib$//; > > if (@JS_INCL_DIRS and @c_header_files) { > last; > } else { > @JS_INCL_DIRS = (); > } > } > > That works fine. > You might want to add a note to INSTALL to mention > > tar zxfv js-1.5.tar.gz > cd ..\js\src\ > nmake -f js.mak CFG="js - Win32 Release" >
On Fri Apr 14 13:08:05 2006, TBUSCH wrote: Show quoted text
> Hi, > > it seems the Makefile.PL is unable to find both > jsapi.h and jsautocfg.h. Would it be possible for you
No, that isn't the case. They are both found in ../js/src @JS_INCL_DIRS = '../js/src'; @c_header_files = qw' jsapi.h jsautocfg.h '; You're testing if @JS_INCL_DIRS == @c_header_files which is if 1 == 2, which evaluates to false Show quoted text
> Thomas. >
> > Your detection of INC/LIBS paths fails on windows when > > the js library is installed and compiled in ../js > > It fails because > > if (scalar(@JS_INCL_DIRS) == scalar(@c_header_files)) { > > evaluates as > > (scalar(../js/src/) == scalar(jsapi.h jsautocfg.h)) > >
Subject: Re: [rt.cpan.org #18696] Makefile.PL INC/LIBS detection
Date: Mon, 17 Apr 2006 15:18:47 +0200
To: bug-JavaScript-SpiderMonkey [...] rt.cpan.org
From: Thomas Busch <thomas_busch [...] users.sourceforge.net>
Hi again, Show quoted text
> > it seems the Makefile.PL is unable to find both > > jsapi.h and jsautocfg.h. Would it be possible for you
> No, that isn't the case. > They are both found in ../js/src > @JS_INCL_DIRS = '../js/src'; > @c_header_files = qw' jsapi.h jsautocfg.h '; > > You're testing if @JS_INCL_DIRS == @c_header_files > which is if 1 == 2, which evaluates to false
If both header files are in ../js/src then you should have @JS_INCL_DIRS = ('../js/src', '../js/src') Can you have a look why on your set-up @JS_INCL_DIRS contains only one path instead of two ? The following code (which is part of Makefile.PL) should yield TWO paths. One for each header file. foreach my $c_header(@c_header_files) { if (-f "$include_path/$c_header") { my $include_dir = "$include_path/$c_header"; $include_dir =~ s/$c_header$//; push @JS_INCL_DIRS, $include_dir; } foreach my $headerfile(glob "$include_path/*/$c_header") { my $include_dir = $headerfile; $include_dir =~ s/$c_header$//; push @JS_INCL_DIRS, $include_dir; } } Thanks. Thomas.