Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383175 - stax-ex wouldn't build without jsr173 -- Possible missing dep?
Summary: stax-ex wouldn't build without jsr173 -- Possible missing dep?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 384047 (view as bug list)
Depends on: 388113
Blocks:
  Show dependency tree
 
Reported: 2011-09-16 02:59 UTC by John Crist
Modified: 2011-10-22 14:14 UTC (History)
4 users (show)

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


Attachments
Revision of the stax-ex ebuild to pull in jsr173 as a dep. (stax-ex-1.0-r1.ebuild,1.07 KB, text/plain)
2011-09-16 03:08 UTC, John Crist
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Crist 2011-09-16 02:59:39 UTC
dev-java/stax-ex would fail during the setup phase complaining that it couldn't determine the VM to use despite java-config reporting the system VM being set. It would only compile after dev-java/jsr173 was built.

Reproducible: Didn't try

Steps to Reproduce:
1. java-config -S #
2. emerge -va dev-java/stax-ex
3. (Would fail at this point)
4. emerge -va dev-java/jsr173
5. emerge -va dev-java/stax-ex
6. Win
Actual Results:  
stax-ex would not build without jsr173. It would build after jsr173 was built.

Expected Results:  
jsr173 should have been pulled in as a dep somewhere, possibly as a dep of stax-ex?

 * Package:    dev-java/stax-ex-1.0-r1
 * Repository: gentoo
 * Maintainer: java@gentoo.org
 * USE:        elibc_glibc kernel_linux userland_GNU x86
 * FEATURES:   sandbox
!!! ERROR: No provider is available for stax-api
                   Please check your environment.
 * Unable to determine VM for building from dependencies:
NV_DEPEND: >=virtual/jdk-1.5
	java-virtuals/jaf
	java-virtuals/stax-api  >=dev-java/java-config-2.1.9-r1 >=sys-apps/portage-2.1.2.7 source? ( app-arch/zip )  >=dev-java/ant-core-1.7.0
       
       >=sys-apps/portage-2.1.2.7
       >=dev-java/javatoolkit-0.3.0-r2
       >=dev-lang/python-2.4
 * ERROR: dev-java/stax-ex-1.0-r1 failed (setup phase):
 *   Failed to determine VM for building.
 * 
 * Call stack:
 *             ebuild.sh, line   91:  Called pkg_setup
 *             ebuild.sh, line  321:  Called java-pkg-2_pkg_setup
 *     java-pkg-2.eclass, line   63:  Called java-pkg_init
 *   java-utils-2.eclass, line 2175:  Called java-pkg_switch-vm
 *   java-utils-2.eclass, line 2603:  Called die
 * The specific snippet of code:
 *   				die "Failed to determine VM for building."
 * 
 * If you need support, post the output of 'emerge --info =dev-java/stax-ex-1.0-r1',
 * the complete build log and the output of 'emerge -pqv =dev-java/stax-ex-1.0-r1'.
!!! 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


Portage 2.1.10.18 (default/linux/x86/10.0, gcc-4.5.3, glibc-2.13-r4, 3.0.4 i686)
=================================================================
System uname: Linux-3.0.4-i686-Intel-R-_Core-TM-2_Duo_CPU_T5800_@_2.00GHz-with-gentoo-2.0.3
Timestamp of tree: Thu, 15 Sep 2011 14:00:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r2, 3.2-r2
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo gnome
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-write --jobs=3 --load-average=5.0 --with-bdeps=y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/lib/layman/gnome"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi aim alsa apm apng autoipd avahi bash-completion berkdb bluetooth bzip2 cairo calendar cdda cddb cdinstall cdparanoia cdr cli consolekit cracklib crypt css cups cxx dbus dga dri dts dv dvd dvdr fbon ffmpeg fortran gdbm gdu gif gimp gnome gnome-keyring gpm gstreamer gtk gtk3 gudev hwdb iconv icq imap ios ipod irc jabber jack java6 jpeg lame mime mmx mng modules mono mp3 mp4 mpeg mplayer msn mudflap ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pango pcre pda pdf perl png policykit pppd pulseaudio python quicktime raw rdesktop readline rss samba scanner sdl session sip smp sound sqlite sse sse2 ssl startup-notification subversion symlink sysfs tcpd threads tiff truetype udev unicode usb v4l2 vcd videos vnc vorbis wifi win32codecs wmf x264 x86 xcomposite xorg xosd xv xvid yahoo zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 John Crist 2011-09-16 03:08:20 UTC
Created attachment 286617 [details]
Revision of the stax-ex ebuild to pull in jsr173 as a dep.

I've added jsr173 as a dep to stax-ex. I'm not sure if it should be a dep to something else in the world, but it certainly kept stax-ex from building for me.
Comment 2 Serkan Kaba (RETIRED) gentoo-dev 2011-09-16 03:39:56 UTC
The proper solution is not that. This happened after jdk7 and virtuals bump in tree? Dunno what the real reason is though.
Comment 3 John Crist 2011-09-16 03:51:18 UTC
I noticed the virtuals for the first time today and thought them odd. I didn't dig to hard as to their purpose. Should this be pulled in when the jre or jdk get pulled in then?
Comment 4 Serkan Kaba (RETIRED) gentoo-dev 2011-09-16 03:57:18 UTC
@John
Sync and use stax-api-1-r3. I'm leaving this open for java-config investigation.

@Java
java-config seems to be confused by hardcoded 1.6 slot in stax-api-1-r1. Any ideas?
Comment 5 James Le Cuirot gentoo-dev 2011-09-16 09:24:30 UTC
java-virtuals/stax-api is a virtual for jsr173. Java 1.6 actually includes it. I don't quite understand the "No provider is available" error.
Comment 6 James Le Cuirot gentoo-dev 2011-09-16 09:25:43 UTC
Sorry, didn't see the comments here because I forgot to refresh the page this morning. :)
Comment 7 Ralph Sennhauser (RETIRED) gentoo-dev 2011-09-17 07:34:39 UTC
(In reply to comment #4)
> @Java
> java-config seems to be confused by hardcoded 1.6 slot in stax-api-1-r1. Any
> ideas?

The error happens if neither jsr173 nor a VM providing type JRE and version 1.6 is installed / visible to java-config when instantiating the virtual.

Going by the dependencies portage shouldn't have allowed this.


Even with the VM installed the build would have failed later when obtaining the classpath. Telling the user to switch VM or to install jsr173.
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-09-22 07:08:59 UTC
*** Bug 384047 has been marked as a duplicate of this bug. ***
Comment 9 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-10-22 08:16:58 UTC
Flameeyes: was this the reason why you added jsr173 depend in freemind?
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-22 10:05:37 UTC
Seems like that. Honestly when you find the ebuild could not have reached that stage, it sounded more like an ebuild issue than a dep (the usex usage was off as well).
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-22 10:33:55 UTC
Maybe not the same:


 * Using following ANT_TASKS:  jibx
!!! ERROR: No providers are available, please ensure you have one of the following VM's or Package's;
           VM's (Your active vm must be one of these): >=virtual/jre1.6
           Packages's: jsr173
           
!!! ERROR: No providers are available, please ensure you have one of the following VM's or Package's;
           VM's (Your active vm must be one of these): >=virtual/jre1.6
           Packages's: jsr173
Comment 12 Ralph Sennhauser (RETIRED) gentoo-dev 2011-10-22 10:54:06 UTC
(In reply to comment #11)
> Maybe not the same:
> 
> 
>  * Using following ANT_TASKS:  jibx
> !!! ERROR: No providers are available, please ensure you have one of the
> following VM's or Package's;
>            VM's (Your active vm must be one of these): >=virtual/jre1.6
>            Packages's: jsr173
> 
> !!! ERROR: No providers are available, please ensure you have one of the
> following VM's or Package's;
>            VM's (Your active vm must be one of these): >=virtual/jre1.6
>            Packages's: jsr173

This is the intended behaviour. It allows to drop dependencies for newer vms, but means you might have to install jsr173 or switch vm later. It's not elegant, I know.

Btw, thanks for the usex one.
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-22 11:16:51 UTC
Ehm sorry but for Gentoo QA if you add an ebuild to the tree that does that, the ebuild is broken, missing dep.

So if it was intended behaviour, it's time to fix it...
Comment 14 Ralph Sennhauser (RETIRED) gentoo-dev 2011-10-22 13:48:46 UTC
(In reply to comment #13)
> Ehm sorry but for Gentoo QA if you add an ebuild to the tree that does that,
> the ebuild is broken, missing dep.
> 
> So if it was intended behaviour, it's time to fix it...

This is only supposed to happen if you pull in stax-api while >=jdk-1.6 is the active system vm. What this means is downgrading of the system vm isn't perfectly supported. You may need to install a few additional packages.
Users usually don't do that though.

"Fixing" it would basically mean to remove the vm providers in java-virtuals/*, which is done for years and comes with some benefits for users.
Obviously someone thought of it as being worth it and went as far as to implement it likely knowing the consequences.

Anyway, I assumed first you used an jdk < 1.6. However after some investigation it turned out the latest stax-api ebuild has a typo which will reject valid vm providers. See bug 388113

This still leaves the issue of vm providers in general. Personally, I'm not against removing the vm providers and requiring >=jdk-1.6 here and there. So it comes at a prize and should certainly be discussed first.
Comment 15 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-10-22 14:14:48 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > Ehm sorry but for Gentoo QA if you add an ebuild to the tree that does that,
> > the ebuild is broken, missing dep.
> > 
> > So if it was intended behaviour, it's time to fix it...
> 
> This is only supposed to happen if you pull in stax-api while >=jdk-1.6 is the
> active system vm. What this means is downgrading of the system vm isn't
> perfectly supported. You may need to install a few additional packages.
> Users usually don't do that though.

I think the is no issue for building as the VM will be switched to a one that satisfies all the deps and virtuals, even if the system vm set is not the one.
The error message should not appear during build at all, only outside at runtime if you actually try to use such package with an older VM. Which is kinda impossible to prevent.

> Anyway, I assumed first you used an jdk < 1.6. However after some investigation
> it turned out the latest stax-api ebuild has a typo which will reject valid vm
> providers. See bug 388113

Yes hopefully all is fixed with stax-api-1-r4 that fixes a typo which was
supposedly fixed already in -r3 according to changelog, but actually there was
no difference from -r2 (I'm looking at you Serkan :)