After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 561524 - gjs-console also needs rpath for libmozjs.so
gjs-console also needs rpath for libmozjs.so
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-19 14:29 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2010-02-16 23:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add ldflags for gjs-console (349 bytes, patch)
2008-11-19 14:30 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
[gjs-console] Add -rpath for libmozjs.so (847 bytes, patch)
2010-02-16 23:31 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review
[gjs-console] Add -rpath for libmozjs.so (847 bytes, patch)
2010-02-16 23:32 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2008-11-19 14:29:05 UTC
$ ldd /usr/bin/gjs-console
	libgjs.so.0 => /usr/lib/libgjs.so.0 (0xb7f6f000)
	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7f6a000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7f2c000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7e75000)
	libmozjs.so => not found
	libplds4.so.0d => /usr/lib/libplds4.so.0d (0xb7e71000)
	libplc4.so.0d => /usr/lib/libplc4.so.0d (0xb7e6c000)
	libnspr4.so.0d => /usr/lib/libnspr4.so.0d (0xb7e35000)
	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7e1c000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e18000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7cba000)
	libmozjs.so => /usr/lib/xulrunner-1.9.0.4/libmozjs.so (0xb7c26000)
	libpcre.so.3 => /lib/libpcre.so.3 (0xb7bfb000)
	/lib/ld-linux.so.2 (0xb7fa3000)
	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7bd5000)
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2008-11-19 14:30:42 UTC
Created attachment 123037 [details] [review]
add ldflags for gjs-console

Should "-R $(FIREFOX_JS_LIBDIR) -rdynamic" actually be in gjs-1.0.pc.in as part of "Libs:"?
Comment 2 Havoc Pennington 2008-11-19 22:48:13 UTC
From libtool manual,

`-R LIBDIR'
     If OUTPUT-FILE is a program, add LIBDIR to its run-time path.  If
     OUTPUT-FILE is a library, add -RLIBDIR to its DEPENDENCY_LIBS, so
     that, whenever the library is linked into a program, LIBDIR will
     be added to its run-time path.

So if we have -R for libgjs, gjs-console should not require it, as I read that ...

The other thing we could do is install gjs-console as a wrapper script that sets LD_LIBRARY_PATH.
Comment 3 Johan (not receiving bugmail) Dahlin 2009-09-26 16:46:41 UTC
I think this patch should go in, I ended up writing an identical in my tree.
For some reason -rpath/-R is not working properly with our libtool/automake combination.
Comment 4 Tommi Komulainen 2009-09-26 17:34:48 UTC
Err, considering that 1) it breaks only in some exceptional cases and 2) according to documentation we're doing the right thing, shouldn't that be considered a bug in libtool/automake (until proven otherwise at which point we can fix gjs) ?
Comment 5 Johan (not receiving bugmail) Dahlin 2009-10-05 14:09:48 UTC
Tommi: It breaks for all known users of gjs, including gnome-shell and at litl.
All of them currently set LD_LIBRARY_PATH to xulrunners libdir, which is broken, it should just run out of the box. Yes it might be a big in libtool/automake but we can fix it instead of waiting for the long cycle of them to be fixed & released & included in stable distributions.
Comment 6 Johan (not receiving bugmail) Dahlin 2009-12-09 17:50:58 UTC
Ping? 

I still want this to go in, this happens on all my machines (which are Ubuntu based). There are no downsides of adding LD_LIBRARY_PATH, it won't do anything nasty on working machines, just adding a bit of ugliness to an imperfect world.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2009-12-10 11:05:46 UTC
Tommi, whats the "exceptional cases" you are refering to? I also still like to commit this.
Comment 8 Johan (not receiving bugmail) Dahlin 2010-02-16 23:31:52 UTC
Created attachment 153981 [details] [review]
[gjs-console] Add -rpath for libmozjs.so

This should not be needed by libtool, but as libtool
is broken we need to pass it in anyway. This has been
done in practice by both gnome-shell and other projects
using gjs.
Comment 9 Johan (not receiving bugmail) Dahlin 2010-02-16 23:32:32 UTC
The following fix has been pushed:
db40281 [gjs-console] Add -rpath for libmozjs.so
Comment 10 Johan (not receiving bugmail) Dahlin 2010-02-16 23:32:36 UTC
Created attachment 153982 [details] [review]
[gjs-console] Add -rpath for libmozjs.so

This should not be needed by libtool, but as libtool
is broken we need to pass it in anyway. This has been
done in practice by both gnome-shell and other projects
using gjs.