Closed GoogleCodeExporter closed 9 years ago
Christian,
We're using pkg-config to get the correct include statements.
Yours seems to be failing with the mozjs header.
Can you check the output of
pkg-config --cflags xulrunner-js
please?
Original comment by dominiqu...@gmail.com
on 14 Dec 2008 at 9:56
Addendum:
I assume your the output from the command above would be
-DXP_UNIX -
DJS_THREADSAFE -I/opt/gnome2/include/nspr -I/usr/include/xulrunner-1.9.0.4/
on your machine.
Either the jsapi.h is really in the location /usr/include/xulrunner-1.9.0.4/ (I
doubt, as then the build would actually succeed) or actually the pkg-config
from your
distribution is wrong.
In case the path is wrong in xulrunner-js.pc, you can override it for configure
with
mozjs_CFLAGS="-DXP_UNIX -DJS_THREADSAFE -I/opt/gnome2/include/nspr
-I/usr/include/xulrunner-1.9.0.4/js" ./configure; make
Original comment by dominiqu...@gmail.com
on 14 Dec 2008 at 10:25
hmm in the configure run, this looks odd
checking for mozjs... no
checking for mozjs... no
checking for mozjs... yes
nazgul@rivendell:~$ pkg-config --cflags xulrunner-js
Package xulrunner-js was not found in the pkg-config search path.
Perhaps you should add the directory containing `xulrunner-js.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xulrunner-js' found
I'll investigate tomorrow
Original comment by christia...@gmail.com
on 14 Dec 2008 at 11:28
Thanks Cristian,
There are several ways on how we detect mozjs Seems at least one of them is
broken :(
Question: could you try with the svn snapshot? I'm not certain, but I think
there
were some changes in the configure script since the 0.2.3 release.
Original comment by dominiqu...@gmail.com
on 15 Dec 2008 at 9:00
Tracked a bit more down for you:
PKG_CHECK_MODULES(mozjs, xulrunner-js, have_mozjs=yes,
[PKG_CHECK_MODULES(mozjs, firefox-js, have_mozjs=yes,
[PKG_CHECK_MODULES(mozjs, mozilla-js, have_mozjs=yes, have_mozjs=no)])])
So, we have three checks, all using pkg-config:
pkg-config --cflags xulrunner-js
pkg-config --cflags firefox-js
pkg-config --cflags mozilla-js
From my guess I would say the 3rd one is the one your system replies to.
Can you chck that please?
Original comment by dominiqu...@gmail.com
on 15 Dec 2008 at 9:57
as you predicted
nazgul@rivendell:~$ pkg-config --cflags xulrunner-js
Package xulrunner-js was not found in the pkg-config search path.
Perhaps you should add the directory containing `xulrunner-js.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xulrunner-js' found
nazgul@rivendell:~$ pkg-config --cflags firefox-js
Package firefox-js was not found in the pkg-config search path.
Perhaps you should add the directory containing `firefox-js.pc'
to the PKG_CONFIG_PATH environment variable
No package 'firefox-js' found
nazgul@rivendell:~$ pkg-config --cflags mozilla-js
-DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.0.4/stable
-I/usr/include/
nspr
hmm actually theres not even a single mozilla* package installed on my system
I see exactly the same behaviour for the svn version
could this be a packaging problem? the header file seems to be missing
nazgul@rivendell:/svn/libproxy-read-only$ cat /usr/lib/pkgconfig/mozilla-js.pc
prefix=/usr
sdkdir=/usr/lib/xulrunner-devel-1.9.0.4
includedir=/usr/include/xulrunner-1.9.0.4
Name: JavaScript
Description: The Mozilla JavaScript Library
Version: 1.9.0.4
Requires: nspr >= 3.12.0
Libs: -L${sdkdir}/lib -lmozjs
Cflags: -I${includedir}/stable -DXP_UNIX -DJS_THREADSAFE
nazgul@rivendell:/svn/libproxy-read-only$ ls
/usr/include/xulrunner-1.9.0.4/stable/
js*
nazgul@rivendell:/svn/libproxy-read-only$ ls /usr/lib/xulrunner-devel-1.9.0.4/
include/jsapi*
/usr/lib/xulrunner-devel-1.9.0.4/include/jsapi.h
Original comment by christia...@gmail.com
on 15 Dec 2008 at 7:51
Christian,
To me (well, that does not mean much) it looks like a packaging bug.
Can you find out which package installed mozilla-js ? This should for sure be
installed with the other header files.
The location of jsapi.h which you find in
/usr/lib/xulrunner-devel-1.9.0.4/include is
first of al 'bad practice' (/usr/lib is arch dependent folder typically, include
files don't belong there) and secondly it's not what is written in the .pc
file.
According to this file, the jsapi.h file HAS TO reside in ${includedir}/stable,
wheras includedir=/usr/include/xulrunner-1.9.0.4
I'd suggest raising this with your distro packager.
As a workaround, you can use the command line posted earlier:
mozjs_CFLAGS="-I/usr/lib/xulrunner-devel-1.9.0.4/include -DXP_UNIX
-DJS_THREADSAFE"
./configure; make
Unfortunately without any guarantee that not something else will be failing.
Original comment by dominiqu...@gmail.com
on 15 Dec 2008 at 8:51
[deleted comment]
Some links to keep track off:
- http://paste.ubuntu.com/85795/
- http://paste.ubuntu.com/85797/
- http://paste.ubuntu.com/85798/
Ubuntu devs suggest to create a glue between libproxy and mozjs in order to
avoid
this situation.
Original comment by dominiqu...@gmail.com
on 15 Dec 2008 at 10:48
You need to build against libmozjs0. Install libmozjs-dev. When you do this
pkg-config --cflags xulrunner-js will work properly, so build will succeed.
This is
tested and working on all Ubuntus since 7.10 (including Jaunty).
Original comment by npmccallum@gmail.com
on 17 Jan 2009 at 9:08
Issue 34 has been merged into this issue.
Original comment by dominiqu...@gmail.com
on 25 Feb 2009 at 7:22
I'm using gentoo, and I had the same problem.
In my case I had to modify /usr/lib64/pkgconfig/mozilla-js.pc
so that it pointed to
/usr/include/xulrunner-1.9/unstable
rather than
/usr/include/xulrunner-1.9/stable
so either the xulrunner version in question (1.9.0.7) is bugged on gentoo, or
the
jsapi.h for some reason got shifted to unstable...
I'm afraid it may be the same in this case...
Original comment by karol.sz...@gmail.com
on 19 Mar 2009 at 9:50
Karol Szumski
I suggest you raise this with the mozilla package of your distribution. The
point of
the .pc files is to be able to rely on them. But this requires the packager to
work
properly and deliver accurate information.
Nothing we can change from our side (without ugly hacks for broken distro
detection).
Original comment by dominiqu...@gmail.com
on 21 Mar 2009 at 10:36
Original issue reported on code.google.com by
christia...@gmail.com
on 12 Dec 2008 at 12:13