Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 358063 - [gnome-overlay & mozilla-overlay] gjs-0.7.11 cannot compile with xulrunner-2.0_beta13_pre
Summary: [gnome-overlay & mozilla-overlay] gjs-0.7.11 cannot compile with xulrunner-2....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 13:28 UTC by Kirill Bystrov
Modified: 2011-03-14 07:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Corrected ebuild (gjs-0.7.11-r1.ebuild,1.96 KB, text/plain)
2011-03-09 13:31 UTC, Kirill Bystrov
Details
configure.ac patch (gjs-0.7.11-libmozjs.patch,2.77 KB, patch)
2011-03-09 13:33 UTC, Kirill Bystrov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Bystrov 2011-03-09 13:28:58 UTC
GJS cannot compile because of missing libmozjs.so in new XULRunner.


Reproducible: Always

Steps to Reproduce:
1. layman -a gnome
2. layman -a mozilla
3. echo '=net-libs/xulrunner-2.0_beta13_pre' >> /etc/portage/package.unmask
4. emerge xulrunner gjs

Actual Results:  
emerge fails

Expected Results:  
compile gjs
Comment 1 Kirill Bystrov 2011-03-09 13:31:17 UTC
Created attachment 265297 [details]
Corrected ebuild

Ebuild with epatch & eautoreconf inserted. Everything builds nearly fine (there are some warnings, but gnome-shell works though).
Comment 2 Kirill Bystrov 2011-03-09 13:33:38 UTC
Created attachment 265301 [details, diff]
configure.ac patch

This patch changes all 'mozjs' to 'xul' in configure.ac, because it seems that all needed functions are now in libxul.so instead of libmozjs.so.
Comment 3 Kirill Bystrov 2011-03-09 13:42:26 UTC
$ sudo emerge -1av =gjs-0.7.11
Пароль: 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD] dev-libs/gjs-0.7.11 [0.7.11-r1] USE="-coverage -examples" 0 kB [1=>2]

Total: 1 package (1 downgrade), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage
 [2] /var/lib/layman/gnome

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-libs/gjs-0.7.11 from gnome
 * gjs-0.7.11.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                   [ ok ]
 * Package:    dev-libs/gjs-0.7.11
 * Repository: gnome
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   ccache sandbox
>>> Unpacking source...
>>> Unpacking gjs-0.7.11.tar.bz2 to /var/tmp/portage/dev-libs/gjs-0.7.11/work
>>> Source unpacked in /var/tmp/portage/dev-libs/gjs-0.7.11/work
>>> Preparing source in /var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11 ...
 * Fixing OMF Makefiles ...                                                                             [ ok ]
 * Running elibtoolize in: gjs-0.7.11/
 *   Applying portage-1.2.0.patch ...
 *   Applying sed-1.5.6.patch ...
 *   Applying as-needed-2.2.6.patch ...
 * Converting shebang in '/var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11/scripts/make-tests'
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11 ...
 * econf: updating gjs-0.7.11/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating gjs-0.7.11/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-coverage
<...>
checking for js-config... no
checking for JS... yes
checking for mozilla-js >= 1.9.2 ... yes
checking for JS_GetStringBytes in -lmozjs... no
checking for JS_GetFunctionName in -lmozjs... no
checking for JS_GetStringChars in -lmozjs... no
checking for JS_StrictPropertyStub in -lmozjs... no      //< these two are actually in
checking for JS_GetGlobalForScopeChain in -lmozjs... no  //< -lxul, -lmozjs is gone
checking for mozilla-js >= 2 ... yes
checking for JS_FreezeObject in -lmozjs... no
checking for JS_IsScriptFrame in -lmozjs... no
checking for JS_EndPC in -lmozjs... no
checking for JS_NewCompartmentAndGlobalObject in -lmozjs... no
checking if SpiderMonkey needs extra compiler flags... no
checking whether JSLocaleToUnicode takes a const char*... yes
checking for GOBJECT... yes
checking for GJS... yes
checking for GJS_GI... yes
checking for GJS_CAIRO... yes
checking for GJS_DBUS... yes
checking for dbus_message_iter_abandon_container... yes
checking for GJSTESTS... yes
checking how to link readline libs... -lreadline
checking for backtrace... yes
checking whether to include systemtap tracing support... no
checking whether to include dtrace tracing support... no
checking for an ANSI C-conforming const... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gjs-1.0.pc
config.status: creating gjs-gi-1.0.pc
config.status: creating gjs-dbus-1.0.pc
config.status: creating gjs-internals-1.0.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11 ...
make -j4 
TOP_SRCDIR=. DBUS_SESSION_BUS_ADDRESS='' XDG_DATA_HOME=test_user_data GJS_DEBUG_OUTPUT=test_user_data/logs/gjs.log BUILDDIR=. GJS_USE_UNINSTALLED_FILES=1 GJS_TEST_TIMEOUT=420 GI_TYPELIB_PATH=. LD_LIBRARY_PATH=":/usr/lib64/xulrunner-2.0" G_FILENAME_ENCODING=latin1	 ./scripts/make-tests . gjs/context.c gjs/jsapi-util-array.c gjs/jsapi-util-error.c gjs/jsapi-util-string.c gjs/stack.c util/glib.c
Replacing old ./gjstest.h and ./gjstest.c
   ./gjstest.h  was 0 bytes now 881
   ./gjstest.c  was 0 bytes now 1162
make  all-am
make[1]: Вход в каталог `/var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11'
<...>
// because we "don't have" some funcs, here go warnings
gjs/importer.c: At top level:
gjs/importer.c:1024:5: warning: initialization from incompatible pointer type
  CXX    libgjs_la-jsapi-private.lo
gjs/byteArray.c:80:5: warning: initialization from incompatible pointer type
gjs/byteArray.c: In function ‘byte_array_new_resolve’:
gjs/byteArray.c:403:40: warning: passing argument 6 of ‘JS_DefinePropertyById’ from incompatible pointer type
/usr/include/xulrunner-2.0/jsapi.h:2225:1: note: expected ‘JSStrictPropertyOp’ but argument is of type ‘JSBool (*)(struct JSContext *, struct JSObject *, jsid,  jsval *)’
gjs/byteArray.c: At top level:
gjs/byteArray.c:854:5: warning: initialization from incompatible pointer type
<...>
In file included from /usr/include/xulrunner-2.0/jscntxt.h:62:0,
                 from gjs/jsapi-private.cpp:35:
/usr/include/xulrunner-2.0/jsfun.h: In static member function ‘static uintN JSFunction::offsetOfNativeOrScript()’:
/usr/include/xulrunner-2.0/jsfun.h:230:48: warning: invalid access to non-static data member ‘JSFunction::u’  of NULL object
/usr/include/xulrunner-2.0/jsfun.h:230:48: warning: (perhaps the ‘offsetof’ macro was used incorrectly)
In file included from gjs/jsapi-private.cpp:35:0:
/usr/include/xulrunner-2.0/jscntxt.h: In function ‘JSContext* js_ContextFromLinkField(JSCList*)’:
/usr/include/xulrunner-2.0/jscntxt.h:2963:75: warning: invalid access to non-static data member ‘JSContext::link’  of NULL object
/usr/include/xulrunner-2.0/jscntxt.h:2963:75: warning: (perhaps the ‘offsetof’ macro was used incorrectly)
<...>
// And, finally, errors
gjs/stack.c: In function ‘format_frame’:
gjs/stack.c:102:5: warning: implicit declaration of function ‘JS_IsNativeFrame’
gjs/stack.c:102:5: warning: nested extern declaration of ‘JS_IsNativeFrame’
gjs/stack.c:143:9: error: too few arguments to function ‘JS_GetFrameThis’
/usr/include/xulrunner-2.0/jsdbgapi.h:271:1: note: declared here
make[1]: *** [libgjs_la-stack.lo] Ошибка 1
make[1]: *** Ожидание завершения заданий...
util/crash.c: In function ‘unbuffered_write_stderr’:
util/crash.c:49:10: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
util/crash.c: In function ‘gjs_print_maps’:
util/crash.c:63:18: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[1]: Выход из каталога `/var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11'
make: *** [all] Ошибка 2
emake failed
 * ERROR: dev-libs/gjs-0.7.11 failed (compile phase):
 *   compile failure
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 3876:  Called gnome2_src_compile
 *   environment, line 1870:  Called die
 * The specific snippet of code:
 *       emake || die "compile failure"
 * 
 * If you need support, post the output of 'emerge --info =dev-libs/gjs-0.7.11',
 * the complete build log and the output of 'emerge -pqv =dev-libs/gjs-0.7.11'.
 * This ebuild used the following eclasses from overlays:
 *   /var/lib/layman/gnome/eclass/gnome2.eclass
 *   /var/lib/layman/gnome/eclass/gnome2-utils.eclass
 * This ebuild is from an overlay named 'gnome': '/var/lib/layman/gnome/'
 * The complete build log is located at '/var/tmp/portage/dev-libs/gjs-0.7.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/gjs-0.7.11/temp/environment'.
 * S: '/var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11'

>>> Failed to emerge dev-libs/gjs-0.7.11, Log file:

>>>  '/var/tmp/portage/dev-libs/gjs-0.7.11/temp/build.log'

 * Messages for package dev-libs/gjs-0.7.11:

 * ERROR: dev-libs/gjs-0.7.11 failed (compile phase):
 *   compile failure
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 3876:  Called gnome2_src_compile
 *   environment, line 1870:  Called die
 * The specific snippet of code:
 *       emake || die "compile failure"
 * 
 * If you need support, post the output of 'emerge --info =dev-libs/gjs-0.7.11',
 * the complete build log and the output of 'emerge -pqv =dev-libs/gjs-0.7.11'.
 * This ebuild used the following eclasses from overlays:
 *   /var/lib/layman/gnome/eclass/gnome2.eclass
 *   /var/lib/layman/gnome/eclass/gnome2-utils.eclass
 * This ebuild is from an overlay named 'gnome': '/var/lib/layman/gnome/'
 * The complete build log is located at '/var/tmp/portage/dev-libs/gjs-0.7.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/gjs-0.7.11/temp/environment'.
 * S: '/var/tmp/portage/dev-libs/gjs-0.7.11/work/gjs-0.7.11'
 * 
 * The following package has failed to build or install:
 * 
 *  (dev-libs/gjs-0.7.11, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/dev-libs/gjs-0.7.11/temp/build.log'
 *
Comment 4 Damien Thébault 2011-03-09 19:15:52 UTC
The patch works for me, compiles fine and gnome-shell links against it.

(In reply to comment #3)
> $ sudo emerge -1av =gjs-0.7.11
> Пароль: 
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild     UD] dev-libs/gjs-0.7.11 [0.7.11-r1] USE="-coverage -examples" 0 kB
> [1=>2]
> 
> Total: 1 package (1 downgrade), Size of downloads: 0 kB
> Portage tree and overlays:
>  [0] /usr/portage
>  [1] /usr/local/portage
>  [2] /var/lib/layman/gnome

You are using the one in layman.
Comment 5 Kirill Bystrov 2011-03-09 20:14:35 UTC
(In reply to comment #4)
> You are using the one in layman.
Yes, i wanted to show current behavior. My patch works for me too :)
Comment 6 Damien Thébault 2011-03-09 20:46:12 UTC
Oh yes, sorry, I didn't read the names and thought it was someone else.
Comment 7 Kirill Bystrov 2011-03-10 17:36:14 UTC
As far as i tested, gjs with this patch also compiles well with xulrunner-1.9.2.13-r1, so most likely it's backwards compatible.
Comment 8 Nirbheek Chauhan (RETIRED) gentoo-dev 2011-03-12 03:18:53 UTC
This problem will be fixed by adding spidermonkey-2.0 to the tree. A temporary workaround is to recompile xulrunner with EXTRA_ECONF=--enable-shared-js

Please note that this is a temporary solution, do not make it permanent in any way!
Comment 9 Nirbheek Chauhan (RETIRED) gentoo-dev 2011-03-14 07:06:15 UTC
This has been fixed in the mozilla overlay. If you get build failures, please recompile xulrunner, and gjs will then compile just fine.

Thanks for reporting!