Public bug reported: Binary package hint: xulrunner-1.9
source package: xulrunner-1.9 version: 1.9.0.1 ubuntu 8.04 and 8.10 I'm working on a project which depends on xulrunner and spidermonkey (libmozjs). I use ubuntu 8.04 and xulrunner 1.9 as my development environment. The problem is, libmozjs.so is in /usr/lib/xulrunner-1.9.0.x/ subdir, the application can't find it if rpath is not used. But if rpath is used, it'll be bound to a specific version of xulrunner, which is not what we want. And there is no way to get the correct library path of libmozjs.so by pkg-config --libs mozilla-js.pc, which returns /usr/lib/xulrunner-devel-1.9.0.x/lib as the library path, which is only available in xulrunner-1.9-dev package. The content of mozilla-js.pc provided by xulrunner-1.9-dev package: ----8<-------------------------------------------------------- prefix=/usr sdkdir=/usr/lib/xulrunner-devel-1.9.0.1 includedir=/usr/include/xulrunner-1.9.0.1 Name: JavaScript Description: The Mozilla JavaScript Library Version: 1.9.0.1 Requires: nspr >= 3.12.0 Libs: -L${sdkdir}/lib -lmozjs Cflags: -I${includedir}/stable -DXP_UNIX -DJS_THREADSAFE ----8<-------------------------------------------------------- You can see that there is no libdir definition in this file, and the -L parameter points to /usr/lib/xulrunner-devel-1.9.0.1/lib, which is only available when xulrunner-1.9-dev is installed. Below is mozilla-js.pc from openSUSE 11: ----8<-------------------------------------------------------- prefix=/usr sdkdir=/usr/lib64/xulrunner-devel-1.9.0.3 libdir=/usr/lib64/xulrunner-1.9 includedir=/usr/include/xulrunner-1.9.0.3 Name: JavaScript Description: The Mozilla JavaScript Library Version: 1.9.0.3 Requires: nspr >= 4.7.1 Libs: -L${sdkdir}/lib -lmozjs Cflags: -I${includedir}/unstable -DXP_UNIX -DJS_THREADSAFE ----8<-------------------------------------------------------- You can see that libdir is provided in this file and "/usr/lib64/xulrunner-1.9" is a symbol link to the real xulrunner path(/usr/lib64/xulrunner-1.9.0.3). Then I can use the libdir as rpath in my application and is still ok after upgrading xulrunner to a newer version. Besides the libdir issue, the Cflags in ubuntu's mozilla-js.pc is incorrect, which should be -I${includedir}/unstable instead of -I${includedir}/stable Both ubuntu 8.04 and 8.10 have this issue. ** Affects: xulrunner-1.9 (Ubuntu) Importance: Undecided Assignee: Alexander Sack (asac) Status: New ** Changed in: xulrunner-1.9 (Ubuntu) Assignee: (unassigned) => Alexander Sack (asac) -- Unable to use libmozjs.so in an application, because of library path problem. https://bugs.launchpad.net/bugs/286906 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs