Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 228605 - net-libs/xulrunner-1.9-r2 compile fails with Java support enabled
Summary: net-libs/xulrunner-1.9-r2 compile fails with Java support enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-20 18:18 UTC by dmjkoenig
Modified: 2008-08-05 04:37 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dmjkoenig 2008-06-20 18:18:28 UTC
I was attempting to upgrade from net-libs/xulrunner-1.9-r1 (which worked perfectly) to the same package, -r2. It failed, telling me that JAVA_HOME was not set (which I had set in my shell)

Reproducible: Always

Steps to Reproduce:
1. Have xulrunner-1.9-r1 and Java 1.6 installed.
2. echo $JAVA_HOME: This gets a valid location with jni.h in the include directory.
3. emerge -1u xulrunner with USE=java
4. Wait
Actual Results:  
$ sudo emerge -1u xulrunner
...
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla ...
true

==========================================================
Building xulrunner-1.9-r2 with the following configuration
    --enable-application=xulrunner  mozilla.org default
    --enable-optimize=-Os           from CFLAGS
    --disable-installer             gentoo
    --disable-pedantic              gentoo
    --enable-crypto                 gentoo
    --with-system-jpeg              gentoo
    --with-system-zlib              gentoo
    --disable-updater               gentoo
    --enable-default-toolkit=gtk2   gentoo
    --enable-pango                  gentoo
    --enable-svg                    gentoo
    --enable-svg-renderer=cairo     gentoo
    --enable-system-cairo           gentoo
    --disable-strip                 gentoo
    --disable-strip-libs            gentoo
    --disable-install-strip         gentoo
    --enable-single-profile         gentoo
    --disable-profilesharing        gentoo
    --disable-profilelocking        gentoo
    --enable-default-toolkit=cairo-gtk2  thebes
    --disable-ipv6                  -ipv6
    --disable-startup-notification  -startup-notification
    --disable-freetype2             gentoo
    --disable-debug                 -debug
    --disable-tests                 -debug
    --enable-reorder                -debug
    --enable-elf-dynstr-gc          x86 optimized build
    --disable-gnomevfs              -gnome
    --disable-gnomeui               -gnome
    --enable-extensions=            mozilla.org default
    --disable-mailnews              mozilla.org default
    --disable-mochitest             broken
    --disable-crashreporter         broken
    --enable-system-hunspell        mozilla.org default
    --enable-image-encoder=all      mozilla.org default
    --enable-canvas                 mozilla.org default
    --enable-embedding-tests        mozilla.org default
    --with-system-nspr              mozilla.org default
    --with-system-nss               mozilla.org default
    --enable-system-lcms            mozilla.org default
    --with-system-bz2               mozilla.org default
    --enable-oji                    mozilla.org default
    --enable-mathml                 mozilla.org default
    --enable-storage                places
    --enable-places                 places
    --enable-places_bookmarks       places
    --enable-safe-browsing          mozilla.org default
    --enable-jsd                    mozilla.org default
    --enable-xpctools               mozilla.org default
    --disable-libxul                mozilla.org default
    --with-default-mozilla-five-home=/usr/lib/xulrunner-1.9  mozilla.org default
==========================================================
(...)
configure: error: The header jni.h was not found.  Set $JAVA_HOME to your java sdk directory, use --with-java-bin-path={java-bin-dir}, or reconfigure with --disable-javaxpcom.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla/config.log
 *
 * ERROR: net-libs/xulrunner-1.9-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4893:  Called econf
 *               ebuild.sh, line  526:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *  The die message:
 *   econf failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-libs/xulrunner-1.9-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-libs/xulrunner-1.9-r2/temp/environment'.
 *
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="." JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info

$ cat /var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla/config.log
(Nothing relevant to this error, or "java" or "jni" at all.)

Expected Results:  
It would get past configuring.

$ emerge --info
WARNING: repository at /usr/local/portage is missing a repo_name entry
Portage 2.2_rc1 (default/linux/x86/2008.0, gcc-4.2.4, glibc-2.7-r2, 2.6.25-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r5-i686-Mobile_AMD_Sempron-tm-_Processor_2800+-with-glibc2.0
Timestamp of tree: Fri, 20 Jun 2008 16:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r4
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=k8 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa arts bash-completion berkdb branding bzip2 cjk cli cracklib crypt cups dbus dri exif flac fortran gdbm gif gnutls gpm gtk hal iconv isdnlog java jpeg kde kdeenablefinal midi mp3 mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre perl png ppds pppd python qt3 qt4 readline reflection ruby sdl session spell spl sqlite sqlite3 ssl svg tcpd tiff unicode vim-syntax vorbis wifi x86 xcomposite xine xorg zlib" ALSA_CARDS="atiixp atiixp-modem" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 dmjkoenig 2008-06-20 20:15:57 UTC
To fix, stick
JAVA_HOME="/etc/java-config-2/current-system-vm"
in /etc/make.conf and rerun
emerge -1u xulrunner
. This will fix..
Comment 2 Sven Müller 2008-06-21 06:17:57 UTC
Didn't help for me. Compiling still fails with same error message. 
Comment 3 Davide 2008-06-21 08:16:05 UTC
Portage 2.2_rc1 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.24-gentoo-r4-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-glibc2.2.5
Timestamp of tree: Sat, 21 Jun 2008 06:30:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
LINGUAS="it"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 arts berkdb cdr cli cracklib crypt cups dbus dri dvd fortran gdbm glitz gpm hal iconv iee1394 ipv6 isdnlog java jpeg kde midi mmx mp3 mudflap ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre pdf perl php png pppd python qt3 qt4 readline reflection samba session spl sse sse2 ssl svg tcpd truetype unicode usb xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x    ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3    trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Same iusse on my box. jni.h header file doesn't exist in /etc/java-config-2/current-system-vm/ (sym link to current java vm).
export JAVA_HOME="/opt/sun-jdk-<version>" worked for me
Comment 4 Davide 2008-06-21 11:54:57 UTC
That fixed the problem with configure script but then it fails when it tries to compile java interface:

Compiling Java interfaces
find ../../../../_javagen/default -name "*.java"  ! -name "*nsIPref.java" > java.files
"/home/netcelli//.gentoo/java-config-2/current-user-vm/bin/javac" -source 1.4 -classpath _ifaces            \
                -d _ifaces -sourcepath ../../../../_javagen/default @java.files
/bin/sh: /home/netcelli//.gentoo/java-config-2/current-user-vm/bin/javac: No such file or directory
gmake[5]: *** [_ifaces/org/mozilla/interfaces/nsISupports.class] Error 127
gmake[5]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla/extensions/java/xpcom/interfaces'
gmake[4]: *** [libs] Error 2
gmake[4]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla/extensions/java/xpcom'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla/extensions/java'
gmake[2]: *** [libs_tier_app] Error 2
gmake[2]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla'
gmake[1]: *** [tier_app] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9-r2/work/mozilla'
make: *** [default] Error 2
 *
 * ERROR: net-libs/xulrunner-1.9-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4984:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-libs/xulrunner-1.9-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-libs/xulrunner-1.9-r2/temp/environment'.
 *
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="." JAVA_HOME="/opt/sun-jdk-1.6.0.06/"
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info
Comment 5 Alessandro Surace 2008-06-29 18:30:41 UTC
Same problem!
I've solved choosing the blackdown-jdk...

eselect java-vm set system 1
This is not a real solution...But I've builded the new xulrunner...and mozilla...
Comment 6 Kundai Midzi 2008-08-05 04:37:53 UTC
Also had the same problem. On my system:

`java-config -L`
The following VMs are available for generation-2:
1)	Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
*)	Sun JDK 1.6.0.07 [sun-jdk-1.6]


My trick was simply:

$ cd $JAVA_HOME && ln -s ../blackdown-jdk-1.4.2.03/include .

I'm not quite sure when $JAVA_HOME/include is ever created for the sun VMs, but it seems to always exist for Blackdown VMs