Summary: | [mozilla-overlay] www-client/mozilla-firefox-3.6_beta2 fails to detect java headers properly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ryan <insanity5902> |
Component: | [OLD] Java | Assignee: | Mozilla Gentoo Team <mozilla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | doron.fediuck, ellingsw+20942, java, mkyral, spielc |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
firefox-3.6-b2-temp.tar.bz2 ebuild patch |
Description
Ryan
2009-11-16 15:36:28 UTC
I am actually closing this one already, I apologize, I thought I tested everything before submitting the bug, but there is something else wrong. It seemed the failure to compile was when running emerge through sudo, need to investigate more on my end has to what the bug really is. (In reply to comment #1) > > It seemed the failure to compile was when running emerge through sudo, need to > investigate more on my end has to what the bug really is. > sudo doesn't preserve most environment variables. Firefox 3.6_beta2 ebuild is buggy if it needs to use JAVA_HOME then it needs to inherit java-pkg-2 or java-pkg-opt-2 and call pkg_setup for either one of them in pkg_setup. For my own benefit, is the ebuild considered buggy if the failure is in the configure script? Should the ebuild be modifying the configure script? Created attachment 210512 [details]
build.log
Here is the build.log from the failure.
If I can help out with anything else, please let me know.
Strange is that it does not work even with: --with-java-bin-path --with-libxul-sdk=/usr/lib64/xulrunner-devel-1.9.2 --with-java-bin-path=/opt/sun-jdk-1.6.0.17/bin --enable-system-sqlite --enable-libnotify --enable-javaxpcom checking for snd_pcm_open in -lasound... yes 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. The eclass is already in use and sets it up properly, this is a problem with the proper path being passed. I will look at this later. For those experiencing this problem please test in tree versions of xulrunner/firefox, you should come across same failure. Ryan please tar up /var/tmp/portage/net-libs/xulrunner/temp and /var/tmp/portage/www-client/mozilla-firefox/temp and attach to bug report. Something is not being passed via the enviroment that is causing the failure, Many devs are already using both packages from overlay without problem with java useflag enabled. In tree version works fine. I really think it is something wrong between the enviroment portage sets up and the mozilla configure script. I noticed the problem with beta2 when it first came out. Beta1 compiled fine. the problems was still there in beta3 (renamed the beta2 ebuild) Beta3 works fine for me with USE=java. Created attachment 210742 [details]
firefox-3.6-b2-temp.tar.bz2
Here is the temp folder for firefox. Xulrunner compiles fine so the enviroment is cleaned out,
Do I need to modify my features and recompile it to have it leave the files behind?
(In reply to comment #11) > Created an attachment (id=210742) [details] > firefox-3.6-b2-temp.tar.bz2 > > Here is the temp folder for firefox. Xulrunner compiles fine so the enviroment > is cleaned out, > > Do I need to modify my features and recompile it to have it leave the files > behind? > You have no java enviroment being passed along. Please provide "java-config-2 -L" The following VMs are available for generation-2: 1) Sun 32bit JRE 1.6.0.17 [emul-linux-x86-java-1.6] 2) Sun JDK 1.5.0.22 [sun-jdk-1.5] *) Sun JDK 1.6.0.17 [sun-jdk-1.6] (In reply to comment #2) > (In reply to comment #1) > > > > It seemed the failure to compile was when running emerge through sudo, need to > > investigate more on my end has to what the bug really is. > > > > sudo doesn't preserve most environment variables. Firefox 3.6_beta2 ebuild is > buggy if it needs to use JAVA_HOME then it needs to inherit java-pkg-2 or > java-pkg-opt-2 and call pkg_setup for either one of them in pkg_setup. > I already tried if that fixes things and that's not the case. Btw. the corresponding beta of xulrunner-1.9.2 compiles without any problems if the java-USE-flag is enabled, it's just mozilla-firefox itself, which misbehaves. As soon as i disable the java useflag firefox builds correctly again. Hi, I can confirm that xulrunner-3.6_beta4 compiles without problems with the java USE flag. Firefox-3.6_beta4 fails on configure java check. I compared both ebuilds. Xulrunner inherits java-pkg-opt-2 and calls java-pkg-opt-2_pkg_setup. I added these lines to firefox ebuild, but nothing changed. Then I did some cleanup of java vms (eselect java-vms) to have only one, but still did not help. The only way, how I'm able to compile firefox with java is to add these lines to ebuild: mozconfig_annotate '' --with-java-include-path=$(java-config-2 -O)/include mozconfig_annotate '' --with-java-bin-path=$(java-config-2 -O)/bin Then firefox builds without correctly. I had to add --with-java-include-path, otherwise configure fails. # emerge --info Portage 2.2_rc58 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.31-gentoo-r5-bfs x86_64) ================================================================= System uname: Linux-2.6.31-gentoo-r5-bfs-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7250_@_2.00GHz-with-gentoo-2.0.1 Timestamp of tree: Thu, 10 Dec 2009 18:00:01 +0000 app-shells/bash: 4.0_p35 dev-java/java-config: 1.3.7-r1, 2.1.10 dev-lang/python: 2.5.4-r2, 2.6.4, 3.1.1-r1 dev-util/cmake: 2.8.0 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.5.3 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.64 sys-devel/automake: 1.9.6-r2, 1.10.3, 1.11.1 sys-devel/binutils: 2.20 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -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/X11/xkb /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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo" CXXFLAGS="-march=core2 -O2 -pipe" DISTDIR="/var/portage/distfiles/" EMERGE_DEFAULT_OPTS="--keep-going" FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv" GENTOO_MIRRORS="http://gentoo.mirror.web4u.cz/ http://gentoo.supp.name" LANG="cs_CZ.utf8" LDFLAGS="-Wl,-O1" LINGUAS="cs" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--quiet" 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/layman/kde-testing /usr/local/portage/layman/arcon /usr/local/portage/layman/sunrise /usr/local/portage/layman/mozilla /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cddb cdparanoia cdr cli consolekit cracklib css cups curl cxx dbus dri dts dv dvd dvdr emboss encode enscript exif fam ffmpeg firefox flac foomaticdb fortran ftp gdbm gif gimp gnutls gpm gstreamer gtkhtml hal iconv ieee1394 imagemagick ipv6 jabber jpeg kde lame lcms libnotify lzo mad matroska mbox mikmod mime mjpeg mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib musepack mysql ncurses nls nptl nptlonly nsplugin ntpl ogg openal opengl openmp pam pcre pdf perl png posix ppds pppd python qt3 qt3support qt4 quicktime raw readline reflection rss sdl semantic-desktop session slang smp sox spell spl sqlite sse sse2 ssl startup-notification svg sysfs syslog taglib tcpd theora threads thunar tidy tiff truetype unicode usb vcd vorbis wavpack webkit wifi wmf wxwindows x264 xcomposite xine xml xorg xosd xpm xscreensaver xsl xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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 synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS # eselect java-vm list Available Java Virtual Machines: [1] sun-jdk-1.6 system-vm !!! Warning: VMs marked as Build Only may contain Security Vulnerabilities and/or be EOL. !!! Warning: Gentoo recommends not setting these VMs as either your System or User VM. !!! Warning: Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information. # *** Bug 298508 has been marked as a duplicate of this bug. *** For everyone having problems with this please provide the results of `echo $JAVA_HOME`. (In reply to comment #17) > For everyone having problems with this please provide the results of `echo > $JAVA_HOME`. > [14:14:53 root@gool mozilla-firefox]# echo "JAVA_HOME: $JAVA_HOME" JAVA_HOME: [14:14:55 root@gool mozilla-firefox]# eselect java-vm list Available Java Virtual Machines: [1] icedtea6-bin [2] sun-jdk-1.6 system-vm !!! Warning: VMs marked as Build Only may contain Security Vulnerabilities and/or be EOL. !!! Warning: Gentoo recommends not setting these VMs as either your System or User VM. !!! Warning: Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information. [14:15:45 root@gool mozilla-firefox]# eselect java-vm set system 2 [14:15:51 root@gool mozilla-firefox]# eselect java-vm list Available Java Virtual Machines: [1] icedtea6-bin [2] sun-jdk-1.6 system-vm !!! Warning: VMs marked as Build Only may contain Security Vulnerabilities and/or be EOL. !!! Warning: Gentoo recommends not setting these VMs as either your System or User VM. !!! Warning: Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information. [14:15:54 root@gool mozilla-firefox]# echo "JAVA_HOME: $JAVA_HOME" JAVA_HOME: [14:15:57 root@gool mozilla-firefox]# eselect java-vm set user 2 !!! Error: Sorry, you cannot set a user vm as root. Set the system vm instead exiting [14:16:04 root@gool mozilla-firefox]# echo "JAVA_HOME: $JAVA_HOME" JAVA_HOME: I Added echo to ebuild. There is no JAVA_HOME env. set [14:16:16 root@gool mozilla-firefox]# emerge -1 mozilla-firefox Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) www-client/mozilla-firefox-3.6_beta5 from local-repo * firefox-3.6b5.source.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * mozilla-firefox-3.6-patches-0.4.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * CPV: www-client/mozilla-firefox-3.6_beta5 * REPO: local-repo * USE: alsa amd64 dbus elibc_glibc java kernel_linux libnotify multilib networkmanager sqlite startup-notification userland_GNU * * You are enabling official branding. You may not redistribute this build * to any users on your network or the internet. Doing so puts yourself into * a legal problem with Mozilla Foundation * You can disable it by emerging mozilla-firefox _with_ the bindist USE-flag >>> Unpacking source... >>> Unpacking firefox-3.6b5.source.tar.bz2 to /var/tmp/portage/www-client/mozilla-firefox-3.6_beta5/work >>> Unpacking mozilla-firefox-3.6-patches-0.4.tar.bz2 to /var/tmp/portage/www-client/mozilla-firefox-3.6_beta5/work >>> Source unpacked in /var/tmp/portage/www-client/mozilla-firefox-3.6_beta5/work >>> Preparing source in /var/tmp/portage/www-client/mozilla-firefox-3.6_beta5/work/mozilla-1.9.2 ... * Applying various patches (bugfixes/updates) ... * 001-firefox_gentoo_install_dirs.patch ... [ ok ] * 100-bz386904_config_rules_install_dist_files.patch ... [ ok ] * 116-gentoo_no_app_updates.patch ... [ ok ] * 137-bz460917_att350845_reload_new_plugins-gentoo-update.patch ... [ ok ] * 300-xulrunner-fix-jemalloc-vs-aslr.patch ... [ ok ] * 301-xulrunner-xpctools.patch ... [ ok ] * 302_fix-java-xpcom.patch ... [ ok ] * Done with patching * Running eautoreconf in '/var/tmp/portage/www-client/mozilla-firefox-3.6_beta5/work/mozilla-1.9.2' ... * Running autoconf ... [ ok ] * Running autoheader ... [ !! ] * Running elibtoolize in: mozilla-1.9.2/modules/freetype2/builds/unix * Applying portage-2.2.patch ... * Applying sed-1.5.6.patch ... * Applying as-needed-2.2.6.patch ... * Running elibtoolize in: mozilla-1.9.2/js/ctypes/libffi * Applying install-sh-1.5.4.patch ... * Applying portage-1.5.10.patch ... * Applying sed-1.5.6.patch ... * Applying as-needed-1.5.26.patch ... * Applying uclibc-ltconf-1.3.0.patch ... * Running elibtoolize in: mozilla-1.9.2/toolkit/crashreporter/google-breakpad/autotools * Applying portage-1.5.10.patch ... * Applying max_cmd_len-1.5.20.patch ... * Applying sed-1.5.6.patch ... * Applying as-needed-1.5.patch ... * Running eautoreconf in '/var/tmp/portage/www-client/mozilla-firefox-3.6_beta5/work/mozilla-1.9.2/js/src' ... * Running autoconf ... [ ok ] * Running autoheader ... [ !! ] * Applying 000_flex-configure-LANG.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/www-client/mozilla-firefox-3.6_beta5/work/mozilla-1.9.2 ... JAVA_HOME: ========================================================== Building mozilla-firefox-3.6_beta5 with the following configuration --enable-application=browser mozilla.org default --enable-optimize mozilla default (In reply to comment #17) > For everyone having problems with this please provide the results of `echo > $JAVA_HOME`. > If you use the java eclasses as you should they set JAVA_HOME and what users have set in their shells doesn't matter at all. Created attachment 215811 [details, diff]
ebuild patch
Needed to fix this issue:
- inheriting java-pkg-opt-2 for java build infrastructure
- call our java-pkg-2_pkg_setup to setup build env
- depend on jdk for javac and jre to run
(In reply to comment #21) > Created an attachment (id=215811) [details] > ebuild patch > > Needed to fix this issue: > - inheriting java-pkg-opt-2 for java build infrastructure > - call our java-pkg-2_pkg_setup to setup build env > - depend on jdk for javac and jre to run > Thanks for the patch, it has been commited in the overlay with an xulrunner src_uri fix, those who have been able to expierence the problem should pull latest mozilla overlay and test 3.6_rc1. Closing as no comments in over a month. If problem is still occuring please fee free to reopen this bug report. This problem persists with xulrunner-1.9.2.8 and the way I got around it was to set the system vm to sun-jdk-1.6. # emerge --keep-going -Dub world * IMPORTANT: 11 news items need reading for repository 'gentoo'. * Use eselect news to read news items. Calculating dependencies... done! >>> Verifying ebuild manifests >>> Starting parallel fetch >>> Emerging (1 of 35) net-libs/xulrunner-1.9.2.8 * firefox-3.6.8.source.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * xulrunner-1.9.2-patches-0.6.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * CPV: net-libs/xulrunner-1.9.2.8 * REPO: gentoo * USE: alsa dbus elibc_glibc ipc java kernel_linux libnotify startup-notification userland_GNU x86 !!! ERROR: The javac executable was not found in the Java path * Using: sun-jre-bin-1.6 >>> Unpacking source... ... 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.2.8/work/mozilla-1.9.2/config.log * ERROR: net-libs/xulrunner-1.9.2.8 failed: * econf failed * * Call stack: * ebuild.sh, line 54: Called src_configure * environment, line 7438: Called econf * ebuild.sh, line 544: Called die * The specific snippet of code: * die "econf failed" * * If you need support, post the output of 'emerge --info =net-libs/xulrunner-1.9.2.8', * the complete build log and the output of 'emerge -pqv =net-libs/xulrunner-1.9.2.8'. !!! When you file a bug report, please include the following information: GENTOO_VM=sun-jre-bin-1.6 CLASSPATH="" JAVA_HOME="/opt/sun-jre-bin-1.6.0.20" JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="" and of course, the output of emerge --info * The complete build log is located at '/var/log/portage/net-libs:xulrunner-1.9.2.8:20100831-125703.log'. * The ebuild environment file is located at '/var/tmp/portage/net-libs/xulrunner-1.9.2.8/temp/environment'. * S: '/var/tmp/portage/net-libs/xulrunner-1.9.2.8/work/mozilla-1.9.2' (In reply to comment #24) > This problem persists with xulrunner-1.9.2.8 and the way I got around it was to > set the system vm to sun-jdk-1.6. > > > # emerge --keep-going -Dub world > > * IMPORTANT: 11 news items need reading for repository 'gentoo'. > * Use eselect news to read news items. > > Calculating dependencies... done! > > >>> Verifying ebuild manifests > > >>> Starting parallel fetch > > >>> Emerging (1 of 35) net-libs/xulrunner-1.9.2.8 > * firefox-3.6.8.source.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... > [ ok ] > * xulrunner-1.9.2-patches-0.6.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... > [ ok ] > * checking ebuild checksums ;-) ... > [ ok ] > * checking auxfile checksums ;-) ... > [ ok ] > * checking miscfile checksums ;-) ... > [ ok ] > * CPV: net-libs/xulrunner-1.9.2.8 > * REPO: gentoo > * USE: alsa dbus elibc_glibc ipc java kernel_linux libnotify > startup-notification userland_GNU x86 > !!! ERROR: The javac executable was not found in the Java path > * Using: sun-jre-bin-1.6 > >>> Unpacking source... > ... > 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.2.8/work/mozilla-1.9.2/config.log > * ERROR: net-libs/xulrunner-1.9.2.8 failed: > * econf failed > * > * Call stack: > * ebuild.sh, line 54: Called src_configure > * environment, line 7438: Called econf > * ebuild.sh, line 544: Called die > * The specific snippet of code: > * die "econf failed" > * > * If you need support, post the output of 'emerge --info > =net-libs/xulrunner-1.9.2.8', > * the complete build log and the output of 'emerge -pqv > =net-libs/xulrunner-1.9.2.8'. > !!! When you file a bug report, please include the following information: > GENTOO_VM=sun-jre-bin-1.6 CLASSPATH="" JAVA_HOME="/opt/sun-jre-bin-1.6.0.20" > JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="" > and of course, the output of emerge --info > * The complete build log is located at > '/var/log/portage/net-libs:xulrunner-1.9.2.8:20100831-125703.log'. > * The ebuild environment file is located at > '/var/tmp/portage/net-libs/xulrunner-1.9.2.8/temp/environment'. > * S: '/var/tmp/portage/net-libs/xulrunner-1.9.2.8/work/mozilla-1.9.2' > This will persist for another few releases I am sure, Come xulrunner-2.0 java support has been completely removed and will not be introduced back without major changes upsteam. |