libjs.so

105 views
Skip to first unread message

willjames

unread,
Mar 21, 2007, 1:54:07 PM3/21/07
to pactester
Just to say I had to copy this file from build/js/src/
Linux_All_DBG.OBJ to /usr/lib to get pactester to work.

Maybe could put something in the install script to do this
automatically...

Thanks for the tool anyway!

Will

Manu Garg

unread,
Mar 21, 2007, 5:46:53 PM3/21/07
to pact...@googlegroups.com
Hey Will,

Thanks for the feedback.

On 3/21/07, willjames <wj7...@gmail.com> wrote:
>
> Just to say I had to copy this file from build/js/src/
> Linux_All_DBG.OBJ to /usr/lib to get pactester to work.

You don't need to copy this file as long as you're keeping the
directory structure same. By default, JavaScript-SpiderMonkey module's
make process looks for js files in '../js/src':

JavaScript-SpiderMonkey-0.17/Makefile.PL:
---------------------------------------------
my %possible_install_paths = (
"../js/src/*" => "../js/src",
"/usr/lib" => "/usr/include",
"/usr/local/lib" => "/usr/local/include",
);
----------------------------------------------

So, as long as your "js" directory is in the same directory as
JavaScript-SpiderMonkey-0.17, installation should work fine. (It did
for me :) )

> Maybe could put something in the install script to do this
> automatically...
> Thanks for the tool anyway!
>
> Will
>
>

--
Manu Garg
http://www.manugarg.com
"Journey is the destination of the life."

Manu Garg

unread,
Mar 21, 2007, 5:49:57 PM3/21/07
to pact...@googlegroups.com
On 3/22/07, Manu Garg <manu...@gmail.com> wrote:
> Hey Will,
>
> Thanks for the feedback.
>
> On 3/21/07, willjames <wj7...@gmail.com> wrote:
> >
> > Just to say I had to copy this file from build/js/src/
> > Linux_All_DBG.OBJ to /usr/lib to get pactester to work.

Forgot to ask earlier, you had to copy this file to get pactester
installed or to get it "work".

willjames

unread,
Mar 22, 2007, 5:53:05 AM3/22/07
to pactester
It installed fine, but I had to copy it get it to run otherwise I got
the following message

Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/
auto/JavaScript/SpiderMonkey/SpiderMonkey.so' for module
JavaScript::SpiderMonkey: libjs.so: cannot open shared object file: No
such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/
DynaLoader.pm line 230.
at ./pactester line 31
Compilation failed in require at ./pactester line 31.
BEGIN failed--compilation aborted at ./pactester line 31.

The js dir and the spidermonkey dir are in the same directory, so am
not sure why it needs to be copied... I'm not really a perl person so
not sure if I'd be able to work this out! Am using fc5 with perl
v5.8.8 if that helps...

Thanks

Will

On Mar 21, 9:49 pm, "Manu Garg" <manug...@gmail.com> wrote:

> Manu Garghttp://www.manugarg.com

Manu Garg

unread,
Mar 22, 2007, 9:55:44 AM3/22/07
to pact...@googlegroups.com
Thanks for more information, Will! I could trace it after further
investigation. It was actually a bug in installation process, which is
difficult to detect on a non-redhat system.

JavaScript::SpiderMonkey module is linked against dynamic library
'libjs.so'. On my system, SpiderMonkey.so was linking to libjs.so in
the build directory. Since I never deleted my build directory, the bug
went undetected. I could reproduce it after deleting the 'build'
directory from my system.

Why was it linking to libjs.so in build directory?
MakeMaker, perl module that generates Makefile, sets LD_RUN_PATH in
Makefile to the path in build directory. This variable is used by
linker script to include search path in the dynamic object itself.

Why doesn't it work on Redhat systems?
On Redhat systems, it doesn't set LD_RUN_PATH in Makefile. For more
information on this, search for LD_RUN_PATH on this page:
http://www.squarebox.co.uk/cgi-squarebox/manServer/usr/share/man/man3/ExtUtils::MakeMaker.3pm

What have I done to fix it?
I have modified install.sh so that it now
- copies libjs.so to $prefix/lib or /usr/lib after compiling js.
- deletes LD_RUN_PATH setting from Makefile for
JavaScript::SpiderMonkey before starting compilation.
- calls make as 'LD_RUN_PATH=$prefix/lib make'

I have checked in the script to SVN repository (also included with
this mail). I'll include the modified script in the next release after
some more testing is done.

Thank you Will for reporting this issue!

Cheers,
Manu


--
Manu Garg

install.sh
Reply all
Reply to author
Forward
0 new messages