mozilla-js CFLAGS are unusable

Bug #220964 reported by Tommi Komulainen
6
Affects Status Importance Assigned to Milestone
xulrunner-1.9 (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Hardy by Micah Gersten

Bug Description

Binary package hint: xulrunner-1.9-dev

% pkg-config --cflags mozilla-js
-DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9b5/stable -I/usr/include/nspr

% ls /usr/include/xulrunner-1.9b5/stable/*js*
zsh: no matches found: /usr/include/xulrunner-1.9b5/stable/*js*

jsapi.h is in /usr/include/xulrunner-1.9b5/unstable/

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in xulrunner-1.9:
status: New → Incomplete
Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 220964] Re: mozilla-js CFLAGS are unusable

On Mon, Dec 15, 2008 at 12:30:56AM -0000, Daniel T Chen wrote:
> Is this symptom still reproducible in 8.10 or 9.04?
>
> ** Changed in: xulrunner-1.9 (Ubuntu)
> Status: New => Incomplete
>

i think there is no difference. The CFLAGS are indeed wrong ... but
just because all headers for js are in /unstable and not in /stable.

We can fix the .pc, but that would also mean that authors will start
to look for solutions for the problem that libmozjs.so is not shipped
in a -rpath'able dir ... but well.

In the end the right solution would be to make a proper lib out of
spidermonkey (or whatever name is used by then). This of course
requires upstream to do the effort to make a source tarball, track
API, ABI and all the other stuff attached to good libs.

 - Alexander

Revision history for this message
Michel Briand (michelbriand) wrote :

Comment:

I didn't find the equivalent of Debian libmozjs-dev in Ubuntu. Since I do not need full xulrunner sources but only SpiderMonkey.

Furthermore full xulrunner CFLAGS provided by pkg-config have 2 drawbacks that makes my build to fail :

- include subdir stable and unstable (confusing)
- include an embedded expat.h (serious)

---
$ diff /usr/include/xulrunner-1.9/unstable/expat.h /usr/include/expat.h
986c986,987
< XML_FEATURE_NS
---
> XML_FEATURE_NS,
> XML_FEATURE_LARGE_SIZE
1007,1012c1008
< #define XML_MICRO_VERSION 0
<
< /* BEGIN MOZILLA CHANGE (Report opening tag of mismatched closing tag) */
< XMLPARSEAPI(const XML_Char*)
< MOZ_XML_GetMismatchedTag(XML_Parser parser);
< /* END MOZILLA CHANGE */
---
> #define XML_MICRO_VERSION 1
---

So to build FreeWRL package, I'm using libmozjs-dev (1.9.0.x) from Debian stable.

And I install libmozjs1d (1.9.0.x) from Debian too, for runtime.

In configure.ac, thanks to Ian, we have :

AC_MSG_NOTICE([Determining Javascript engine to build against])
found_JAVASCRIPT_ENGINE=no
case "$os_type" in
     mac)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,spidermonkey,1.7.0)
        ;;
     *)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,mozilla-js,1.9)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,xulrunner-js,1.8)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,seamonkey-js)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,firefox-js)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,firefox2-js)
        ;;
esac

$ pkg-config --cflags mozilla-js
-DXP_UNIX -DJS_THREADSAFE -I/usr/include/mozjs -I/usr/include/nspr

Cheers,
Michel

Revision history for this message
Alex Denvir (coldfff) wrote :

We are closing this bug report because it has not been updated for some time. Please reopen it if you have more information to submit, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in xulrunner-1.9 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Tommi Komulainen (tommi-komulainen) wrote :

I don't follow, what information are you missing? It's still broken the same way in 1.9.1.8 in karmic:

% cat /tmp/test.c
#include <jsapi.h>
% gcc `pkg-config --cflags mozilla-js` /tmp/test.c
/tmp/test.c:1:19: error: jsapi.h: No such file or directory

for "The Mozilla JavaScript Library" pkg-config file that's a fairly fatal bug I'd think.

Changed in xulrunner-1.9 (Ubuntu):
status: Invalid → New
Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

Is this still an issue for you? What Ubuntu version do you use? Thank you for telling us!

Changed in xulrunner-1.9 (Ubuntu):
status: New → Incomplete
Revision history for this message
Michel Briand (michelbriand) wrote :

Did you fixed/changed anything ?

affects: xulrunner-1.9 (Ubuntu) → xulrunner (Ubuntu)
Revision history for this message
Micah Gersten (micahg) wrote :

The xulrunner source was for xulrunner 1.8, xulrunner-1.9 was the correct source for this, but all releases that had it are now EOL, so marking invalid.

affects: xulrunner (Ubuntu) → xulrunner-1.9 (Ubuntu)
Changed in xulrunner-1.9 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.