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 678410 - Missing compability for mozjs187-1.0.0 (mozjs187.pc) in configure.ac
Missing compability for mozjs187-1.0.0 (mozjs187.pc) in configure.ac
Status: RESOLVED OBSOLETE
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal major
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-19 14:38 UTC by Samuli Suominen
Modified: 2015-10-28 00:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remove obsolete TRACE_MARK API (1.56 KB, patch)
2012-12-12 04:45 UTC, darkxst
none Details | Review
build fixes for mozjs187 (2.95 KB, patch)
2012-12-12 04:46 UTC, darkxst
none Details | Review
bump pkgkit version for mozjs (2.72 KB, patch)
2012-12-12 04:46 UTC, darkxst
none Details | Review
Build fixes (3.60 KB, patch)
2012-12-12 20:28 UTC, darkxst
reviewed Details | Review
js187 build fixes (2.72 KB, patch)
2012-12-12 20:30 UTC, darkxst
needs-work Details | Review
Build fixes (3.21 KB, patch)
2012-12-13 02:02 UTC, darkxst
committed Details | Review
tests: Fix a few bad jsval compares (1.33 KB, patch)
2012-12-13 02:29 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
tests: Don't use deprecated/removed API (720 bytes, patch)
2012-12-13 02:29 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Samuli Suominen 2012-06-19 14:38:26 UTC
To reproduce:

1. Build and install spidermonkey (mozjs) 187-1.0.0.

2. Try to build gjs:

checking for GJS... no
configure: error: Package requirements (gmodule-2.0 gthread-2.0 gobject-introspection-1.0 >= 0.10.1 glib-2.0 >= 2.31.0 gobject-2.0 >= 2.18.0 mozjs185) were not met:

No package 'mozjs185' found

3. Notice that the pkg-config file changed from mozjs185.pc to mozjs187.pc
Comment 1 Samuli Suominen 2012-06-19 14:41:10 UTC
4. After patching configure.ac from mozjs185 to mozjs187 the build fails with:

/bin/sh ./libtool --silent --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.   -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gobject-introspection-1.0 -I/usr/lib64/libffi-3.0.11/include -I/usr/include/js -I/usr/include/nspr   -DGJS_TOP_SRCDIR=\".\" -DGJS_JS_DIR=\"/usr/share/gjs-1.0\" -DGJS_NATIVE_DIR=\"/usr/lib64/gjs-1.0\" -DPKGLIBDIR=\"/usr/lib64/gjs\" -I./gi -DGJS_COMPILATION   -Wnested-externs -Wmissing-prototypes -Wsign-compare -Wcast-align -Wpointer-arith -Wmissing-declarations -Wchar-subscripts -Wall -march=native -O2 -pipe -c -o libgjs_la-jsapi-util-error.lo `test -f 'gjs/jsapi-util-error.c' || echo './'`gjs/jsapi-util-error.c
modules/console.c: In function 'gjs_console_interact':
modules/console.c:201:9: warning: passing argument 2 of 'JS_BufferIsCompilableUnit' makes integer from pointer without a cast [enabled by default]
/usr/include/js/jsapi.h:3797:1: note: expected 'JSBool' but argument is of type 'struct JSObject *'
modules/console.c:201:9: warning: passing argument 3 of 'JS_BufferIsCompilableUnit' from incompatible pointer type [enabled by default]
/usr/include/js/jsapi.h:3797:1: note: expected 'struct JSObject *' but argument is of type 'gchar *'
modules/console.c:201:9: warning: passing argument 4 of 'JS_BufferIsCompilableUnit' makes pointer from integer without a cast [enabled by default]
/usr/include/js/jsapi.h:3797:1: note: expected 'const char *' but argument is of type 'gsize'
modules/console.c:201:9: error: too few arguments to function 'JS_BufferIsCompilableUnit'
/usr/include/js/jsapi.h:3797:1: note: declared here
modules/console.c:209:16: warning: assignment from incompatible pointer type [enabled by default]
modules/console.c:214:13: warning: passing argument 3 of 'JS_ExecuteScript' from incompatible pointer type [enabled by default]
/usr/include/js/jsapi.h:3942:1: note: expected 'struct JSScript *' but argument is of type 'struct JSObject *'
modules/console.c: In function 'gjs_console_error_reporter':
modules/console.c:93:15: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result [-Wunused-result]
make[1]: *** [console_la-console.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
gjs/context.c: In function 'gjs_context_constructor':
gjs/context.c:578:5: warning: implicit declaration of function 'JS_SetScriptStackQuota' [-Wimplicit-function-declaration]
gjs/context.c:578:5: warning: nested extern declaration of 'JS_SetScriptStackQuota' [-Wnested-externs]
gjs/byteArray.c: In function 'to_string_func':
gjs/byteArray.c:543:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
In file included from /usr/include/js/jscntxt.h:50:0,
                 from gjs/jsapi-private.cpp:35:
/usr/include/js/jsatom.h:53:23: fatal error: vm/String.h: No such file or directory
compilation terminated.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-06-19 15:05:57 UTC
Right now we support the official SpiderMonkey release, 1.8.5. When mozjs187 is official released we will support that, and hopefully drop support for mozjs185.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-12-10 19:48:10 UTC
The mozjs187 tarball does not install the proper headers. It's a broken tarball.

https://bugzilla.mozilla.org/show_bug.cgi?id=735599
Comment 4 darkxst 2012-12-12 04:45:16 UTC
Created attachment 231320 [details] [review]
remove obsolete TRACE_MARK API
Comment 5 darkxst 2012-12-12 04:46:10 UTC
Created attachment 231321 [details] [review]
build fixes for mozjs187
Comment 6 darkxst 2012-12-12 04:46:20 UTC
Created attachment 231322 [details] [review]
bump pkgkit version for mozjs
Comment 7 darkxst 2012-12-12 20:28:40 UTC
Created attachment 231415 [details] [review]
Build fixes

These are fixes required for building against js187 but that should
also be safe with js185.
Comment 8 darkxst 2012-12-12 20:30:44 UTC
Created attachment 231416 [details] [review]
js187 build fixes

Fixes required for building against js187
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-12-13 01:46:39 UTC
Review of attachment 231415 [details] [review]:

Most of these look fine to me.

::: gjs/compat.h
@@ -33,3 @@
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
 #pragma GCC diagnostic ignored "-Winvalid-offsetof"
-#include <jsapi.h>

Why?
Comment 10 darkxst 2012-12-13 01:51:34 UTC
with 187 i was getting double declaration issue, since its pulled in via jsdbgapi.h as well
Comment 11 darkxst 2012-12-13 02:02:31 UTC
Created attachment 231424 [details] [review]
Build fixes

These are fixes required for building against js187 but that should
also be safe with js185.
Comment 12 Jasper St. Pierre (not reading bugmail) 2012-12-13 02:29:36 UTC
Created attachment 231445 [details] [review]
tests: Fix a few bad jsval compares
Comment 13 Jasper St. Pierre (not reading bugmail) 2012-12-13 02:29:38 UTC
Created attachment 231446 [details] [review]
tests: Don't use deprecated/removed API
Comment 14 Colin Walters 2012-12-13 02:43:14 UTC
Review of attachment 231445 [details] [review]:

Ok.
Comment 15 Colin Walters 2012-12-13 02:43:47 UTC
Review of attachment 231446 [details] [review]:

Makes sense.
Comment 16 Colin Walters 2012-12-13 02:44:29 UTC
Review of attachment 231416 [details] [review]:

This patch changes the default version - not ready to do that yet.

Patches to support both are more interesting.
Comment 17 darkxst 2012-12-13 03:00:13 UTC
Colin, that patch 231416 was not intended for merging, more just testing. I will update it to handle both cases, when js187 is officially released or atleast fixed (there are a couple of issues with the current tarball)
Comment 18 Jasper St. Pierre (not reading bugmail) 2012-12-30 16:57:36 UTC
Review of attachment 231424 [details] [review]:

OK.
Comment 19 Jasper St. Pierre (not reading bugmail) 2013-01-02 17:22:36 UTC
Attachment 231445 [details] pushed as 8bb712b - tests: Fix a few bad jsval compares
Attachment 231446 [details] pushed as 1c14de0 - tests: Don't use deprecated/removed API


OK, these should not have any effect on the gjs build against mozjs187.
Comment 20 Jasper St. Pierre (not reading bugmail) 2013-01-02 17:23:20 UTC
er, against mozjs185
Comment 21 Giovanni Campagna 2013-01-03 00:35:50 UTC
(In reply to comment #4)
> Created an attachment (id=231320) [details] [review]
> remove obsolete TRACE_MARK API

This should be reverted: the trace_mark API is obsolete in js 187, not js 185, and indeed removing the flag in js185 causes a segmentation fault at GC time.
Comment 22 Cosimo Cecchi 2015-10-28 00:26:59 UTC
I assume this is all set now.