Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] java-config (Broken with strange behaviour)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Wed Sep 04, 2013 6:59 pm    Post subject: [SOLVED] java-config (Broken with strange behaviour) Reply with quote

Apologies guys if this is in the wrong section.
Having a big problem today when updating my system.

Packages ant-core and ant-nodeps fails with a strange message about being unable to find a system VM.
I went to the Gentoo documentation and looked at the java upgrade guide.
It says to set the system vm I....
Code:
java-config --list-available-vms

instead of what is expected [per the documentation] I get...
Code:
~ # java-config --list-available-vms
usage: java-config-2 [options] requirement_or_url ...
   or: java-config-2 --help

error: option --list-available-vms not recognized


This is freaking me out, as it is just an update and things go bad. (All the flippin time) :roll:
Looks like packages which use JRE's or JDK's are going to run into trouble because my system can't find a VM.
I don't know why my system wants JDK's because I sure as hell don't develop.
emerge --info for ant-core
Code:
# emerge --info ant-core
Portage 2.1.12.2 (default/linux/x86/13.0/desktop/gnome, gcc-4.7.1, glibc-2.15-r3, 3.8.13-gentoo i686)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.8.13-gentoo-i686-Pentium-R-_Dual-Core_CPU_E5400_@_2.70GHz-with-gentoo-2.2
KiB Mem:     3555752 total,    719252 free
KiB Swap:    1992056 total,   1974892 free
Timestamp of tree: Wed, 04 Sep 2013 09:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.6.8-r3, 2.7.5-r2, 3.2.5-r2, 3.3.2-r2
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.4.7, 4.5.4, 4.6.3, 4.7.1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo gamerlay spring zugaina bitcoin OVERLAY-pigs_overlay
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.3 dlj-1.1 Oracle-BCLA-JavaSE PUEL ut2003 UPEK-SDK-EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
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/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/mnt/nfs_portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --binpkg-respect-use=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://gentoo.virginmedia.com/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/mnt/nfs_portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/nfs_portage"
PORTDIR_OVERLAY="/var/lib/layman/gamerlay /var/lib/layman/Spring /var/lib/layman/zugaina /var/lib/layman/bitcoin /usr/local/portage"
SYNC="rsync://pig2/gentoo-portage"
USE="X X509 a52 aac acl acpi additions alsa animation-rtl antialiasing apache2 applet archive artworkextra autoipd berkdb binary-drivers bluetooth bonobo branding bzip2 cairo caps cdaudio cdda cdio cdr cdrkit cdrom cdrtools cg cifs cleartype cli client clutter colord consolekit cpumining cracklib crypt cups curl curlwrappers cursors cxx dbase dbus dconf desktop-effects device-mapper dga dns dri dso dts dv dvb dvbpsi dvd dvdnav dvdr dvdread eds effects emboss encode equalizer evo exif extraicons extras fallback fam fat fat16 fbcondecor fbosd fbsplash ffmpeg fftw firefox fits flac flash fltk flv fontconfig foomaticdb fortran ftp fuse g3dvl games gcj gconf gd gdbm gdm gdu gedit geoloc gif git gjs glade glib glitz glx gmedia gnome gnome-dvb-daemon gnome-keyring gnome-online-accounts gnome-print gnome-shell gnomecanvas gnomecd gnutls gphoto2 gpib gpm gps graphviz grub gstreamer gtk gtk3 gtkhtml gtkstyle gudev h224 hardware hddtemp help-screen hibernate-script hidd howl-compat hpn htsp http httpd i2c icc icons iconv id3 id3tag idn ieee1394 imagemagick imap inotify introspection ipc iplayer iptables ipv6 ivman jack java java6 javascript jit jpeg jpeg2k json kdrive kerberos keymap lame laptop lastfm lastfmradio lcms ldap libburn libgda libmpeg2 libnotify libsamplerate libsecret libsexy libsoup libv4l2 libvisual lm_sensors logrotate lzo mad mailwrapper mbox mdnsresponder-compat metadata mime mms mmx mmxext mng modplug modules mono mozilla mp2 mp3 mp4 mpd mpeg mpg123 mplayer msn mudflap nautilus ncurses net network networking networkmanager new-login nfs nfsv3 nfsv4 nls nptl nsplugin nss ntfs ntp nvcontrol nvram objc offensive ogg openal opengl openstreetmap optimization osc oss outputs overlays pam pango parted pcre pdf perl pipechan pixmaps player playlist plugins pm-utils pmu png policykit ppds previewer pvr pyqt4 python python-daap quicktime quvi raw readline rss rsync rtsp sasl scrobbler sctp sdl search-screen sendto server session sftp shaders sharedext sharedmem shm shmvideo shotwell showtabbar sid sip slideshow slp smi smp smtp sndfile snmp socialweb sockets sound spell splash sql sqlite sse sse2 sse3 ssh ssl ssse3 startup-notification svg swf symlink syslog systemd sysvipc taglib tcpd tdb teletext terminal tetex themes theora tiff tk toolbar tools tordns totem transcode truetype tvheadend twisted twolame type3 udev udev-acl udisks underscores unicode unsupported upnp upower usb userpriv v4l v4l2 v8 vaapi vala vdpau vfat vga vhook video videos virtualbox vnc vorbis wav wavpack weather webdav webgl win32codecs wma wmf wmp wxwidgets x264 x86 x86emu xattr xcb xcomposite xcursors xf86 xine xml xosd xpm xrandr xrender xv xvid xvmc youtube yv12 zlib" ABI_X86="32" ALSA_CARDS="emu10k1 hda-intel" APACHE2_MODULES="auth_digest authn_file authz_groupfile authz_host dav dav_fs dir mime status" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="openssl" DRACUT_MODULES="plymouth" DVB_CARDS="usb-dtt200u usb-wt220u" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" RUBY_TARGETS="ruby18 ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" 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"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS


My system is a mixture of ~ and stable.
Over the last year or so I have been gradually dealing with pulling back some packages to stable - when possible.
Could this problem have anything to do with that.
I don't understand why the instructions in the documentation are falling over.
Any help would be appreciated.

Peace.
_________________
Whatever you do, do it properly!


Last edited by Thistled on Sun Sep 08, 2013 1:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Wed Sep 04, 2013 10:52 pm    Post subject: Reply with quote

java-config --list-available-vms and java-config-2 --list-available-vms both work here

Quote:
~ # java-config-2 --list-available-vms
The following VMs are available for generation-2:
1) IcedTea JDK 6.1.12.5 [icedtea-bin-6]
*) Oracle JDK 1.7.0.25 [oracle-jdk-bin-1.7]
3) Oracle JRE 1.7.0.25 [oracle-jre-bin-1.7]
4) Sun JDK 1.6.0.45 [sun-jdk-1.6]
~ # java-config --list-available-vms
The following VMs are available for generation-2:
1) IcedTea JDK 6.1.12.5 [icedtea-bin-6]
*) Oracle JDK 1.7.0.25 [oracle-jdk-bin-1.7]
3) Oracle JRE 1.7.0.25 [oracle-jre-bin-1.7]
4) Sun JDK 1.6.0.45 [sun-jdk-1.6]


Code:
emerge -s jre jdk icedtea
might be interesting
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Fri Sep 06, 2013 6:07 pm    Post subject: Reply with quote

It looks ok to me.

Code:
Searching...   
[ Results for search key : jdk ]
[ Applications found : 13 ]

*  dev-java/apple-jdk-bin [ Masked ]
      Latest version available: 1.6.0
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://java.sun.com/j2se/1.6.0/
      Description:   Links to Apple's version of Sun's J2SE Development Kit
      License:       public-domain

*  dev-java/db4o-jdk11
      Latest version available: 7.4
      Latest version installed: [ Not Installed ]
      Size of files: 312 kB
      Homepage:      http://www.db4o.com
      Description:   Core files for the object database for java
      License:       GPL-2

*  dev-java/db4o-jdk12
      Latest version available: 7.4
      Latest version installed: [ Not Installed ]
      Size of files: 89 kB
      Homepage:      http://www.db4o.com
      Description:   Core files for the object database for java
      License:       GPL-2

*  dev-java/db4o-jdk5
      Latest version available: 7.4
      Latest version installed: [ Not Installed ]
      Size of files: 63 kB
      Homepage:      http://www.db4o.com
      Description:   Core files for the object database for java
      License:       GPL-2

*  dev-java/diablo-jdk [ Masked ]
      Latest version available: 1.6.0.07.02
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://www.FreeBSDFoundation.org/downloads/java.shtml
      Description:   Java Development Kit
      License:       sun-bcla-java-vm

*  dev-java/gcj-jdk
      Latest version available: 4.7.3
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://www.gentoo.org/
      Description:   Java wrappers around GCJ
      License:       GPL-2

*  dev-java/hp-jdk-bin [ Masked ]
      Latest version available: 1.6.0.05
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://www.hp.com/go/java
      Description:   HP JDK/JRE and Plug-In
      License:       HP-JDKJRE6

*  dev-java/ibm-jdk-bin [ Masked ]
      Latest version available: 1.6.0.9_p2-r1
      Latest version installed: [ Not Installed ]
      Size of files: 92,075 kB
      Homepage:      http://www.ibm.com/developerworks/java/jdk/
      Description:   IBM Java SE Development Kit
      License:       IBM-J1.6

*  dev-java/oracle-jdk-bin
      Latest version available: 1.7.0.25
      Latest version installed: 1.7.0.25
      Size of files: 95,355 kB
      Homepage:      http://www.oracle.com/technetwork/java/javase/
      Description:   Oracle's Java SE Development Kit
      License:       Oracle-BCLA-JavaSE examples? ( BSD )

*  dev-java/soylatte-jdk-bin [ Masked ]
      Latest version available: 7
      Latest version installed: [ Not Installed ]
      Size of files: 51,587 kB
      Homepage:      http://landonf.bikemonkey.org/static/soylatte/
      Description:   Landon Fuller's OpenJDK 7 for Mac OS X 10.5/PPC
      License:       GPL-2-with-exceptions

*  dev-java/sun-jdk [ Masked ]
      Latest version available: 1.6.0.45
      Latest version installed: [ Not Installed ]
      Size of files: 70,116 kB
      Homepage:      http://www.oracle.com/technetwork/java/javase/
      Description:   Oracle's Java SE Development Kit
      License:       Oracle-BCLA-JavaSE examples? ( BSD )

*  java-virtuals/jdk-with-com-sun
      Latest version available: 20111111-r1
      Latest version installed: [ Not Installed ]
      Size of files: 0 kB
      Homepage:      http://www.gentoo.org
      Description:   Virtual ebuilds that require internal com.sun classes from a JDK
      License:       public-domain

*  virtual/jdk
      Latest version available: 1.7.0
      Latest version installed: 1.7.0
      Size of files: 0 kB
      Homepage:     
      Description:   Virtual for Java Development Kit (JDK)
      License:       

Searching...   
[ Results for search key : icedtea ]
[ Applications found : 3 ]

*  dev-java/icedtea
      Latest version available: 7.2.4.1
      Latest version installed: [ Not Installed ]
      Size of files: 72,950 kB
      Homepage:      http://icedtea.classpath.org
      Description:   A harness to build OpenJDK using Free Software build tools and dependencies
      License:       Apache-1.1 Apache-2.0 GPL-1 GPL-2 GPL-2-with-linking-exception LGPL-2 MPL-1.0 MPL-1.1 public-domain W3C

*  dev-java/icedtea-bin
      Latest version available: 7.2.3.9
      Latest version installed: 7.2.3.9
      Size of files: 49,824 kB
      Homepage:      http://icedtea.classpath.org
      Description:   A Gentoo-made binary build of the IcedTea JDK
      License:       GPL-2-with-linking-exception

*  dev-java/icedtea-web
      Latest version available: 1.3.2-r7
      Latest version installed: [ Not Installed ]
      Size of files: 1,014 kB
      Homepage:      http://icedtea.classpath.org
      Description:   FOSS Java browser plugin and Web Start implementation
      License:       GPL-2 GPL-2-with-linking-exception LGPL-2

_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Fri Sep 06, 2013 6:34 pm    Post subject: Reply with quote

** UPDATE **

If I try to build any package which requires a VM then it borks straight away.
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Sep 06, 2013 6:45 pm    Post subject: Reply with quote

Code:
emerge -s java-config
both 2.1.12-r1(newest stable) and 2.2.0 (testing) respond correctly to java-config --list-available-vms and java-config-2 --list-available-vms for me.
Have you run
Code:
java-config-2  --list-available-vms
as the message suggests?
Does
Code:
etc-update
suggest updating any java files?

emerge java-config produces directory /etc/java-config-2. In /etc/java-config-2 is a symlink /etc/java-config-2/current-system-vm which points to a directory containing the selected virtual machine executables; in my case: /usr/lib/jvm/oracle-jdk-bin-1.7 . You may be missing lines somewhwere that say java-config = java-config-2.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Fri Sep 06, 2013 6:55 pm    Post subject: Reply with quote

Code:
java-config-2  --list-available-vms

always returns....
Code:
# java-config-2 --list-available-vms
usage: java-config-2 [options] requirement_or_url ...
   or: java-config-2 --help

error: option --list-available-vms not recognized

I just don't get this.

My current system-vm symlink points to VM executables in /opt as opposed to /usr/lib/foo
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Fri Sep 06, 2013 7:24 pm    Post subject: Reply with quote

Why I run as a normal user. (not root)
java-config-2
I get...
Code:
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/test-easy-install-11156.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/lib/python2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  http://packages.python.org/distribute/easy_install.html

Please make the appropriate changes for your system and try again.

_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Sep 06, 2013 7:27 pm    Post subject: Reply with quote

what is your java-config version? have you run
Code:
emerge java-config
today? I would.
what does etc-update produce?

in my case /usr/lib/jvm/oracle-jdk-bin-1.7 is in turn a symlink to /opt/oracle-jdk-bin-1.7.0.25. so my actual executable is in the same place as (presumably) your oracle-jdk-bin-1.7.0.25 is.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Sep 06, 2013 7:29 pm    Post subject: Reply with quote

as root java-config2 produces help message
behavior of java-config is same as root and as non root here
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Fri Sep 06, 2013 8:31 pm    Post subject: Reply with quote

dev-java/java-config-2.2.0

I have also run etc-update today.
No changes.
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Fri Sep 06, 2013 9:51 pm    Post subject: Reply with quote

Appreciate the time you have taken to try and help me out here Donahue.

Would I be right to suggest I heard if you are using
Code:
java-config-2

then there is no need to use
Code:
eselect java list

?
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Sep 06, 2013 10:07 pm    Post subject: Reply with quote

eselect java list
!!! Error: Can't load module java
exiting
can't use eselect java here
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Fri Sep 06, 2013 10:09 pm    Post subject: Reply with quote

How about
Code:
eselect java-vm show

(I think that is what I meant to post - sorry)
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Sep 06, 2013 10:19 pm    Post subject: Reply with quote

~ # eselect java-vm show
!!! Error: Can't load module java-vm
exiting

because

~ # emerge -s eselect-java
app-admin/eselect-java [ Masked ]

after keywording =app-admin/eselect-java-0.1.0 ~amd64

~ # eselect java-vm list
Available Java Virtual Machines:
[1] icedtea-bin-6
[2] oracle-jdk-bin-1.7 system-vm
[3] oracle-jre-bin-1.7
[4] sun-jdk-1.6

and ~ # java-config --list-available-vms
The following VMs are available for generation-2:
1) IcedTea JDK 6.1.12.5 [icedtea-bin-6]
*) Oracle JDK 1.7.0.25 [oracle-jdk-bin-1.7]
3) Oracle JRE 1.7.0.25 [oracle-jre-bin-1.7]
4) Sun JDK 1.6.0.45 [sun-jdk-1.6]

Still works.

So does:
~ # eselect java-vm set system 1
~ # java-config --list-available-vms
The following VMs are available for generation-2:
*) IcedTea JDK 6.1.12.5 [icedtea-bin-6]
2) Oracle JDK 1.7.0.25 [oracle-jdk-bin-1.7]
3) Oracle JRE 1.7.0.25 [oracle-jre-bin-1.7]
4) Sun JDK 1.6.0.45 [sun-jdk-1.6]
~ # eselect java-vm set system 2
~ # eselect java-vm list
Available Java Virtual Machines:
[1] icedtea-bin-6
[2] oracle-jdk-bin-1.7 system-vm
[3] oracle-jre-bin-1.7
[4] sun-jdk-1.6
_________________
Defund the FCC.
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Fri Sep 06, 2013 11:09 pm    Post subject: Reply with quote

The exterior is totally broke; but why and how, to know that you'll need to look at what happened to the interior. Take a look at `cat $(command -v java-config)` and see if it implements Java related functionality or not; from what I see in this forum thread, I guess not because it likely has been overwritten.

Without knowing the state of that file, a Google for "usage error option not recognized" brings us at http://docs.python.org/2/library/getopt.html which is Python; that's particularly interesting because the wrapper is actually supposed to be a shell script, as it has been for some time. Or maybe the wrapper works, and one of the files that gets wrapped is tampered with; but you can trust me on this, we don't use getopt there. Which becomes clear from simply doing a `java-config --test` that shows totally different error output.

We've had this happen before somewhere, but we couldn't pinpoint why this happens; so, if you know what you recently did related to this that would help, otherwise this is yet another unsolvable case where we can't identify the reason. Anyhow, given that java-config is tampered, you will likely just want to emerge java-config again; if emerging it again still makes things broken, then there is something odd going on with your mix of stable and unstable, but I am not sure what exactly...
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Sep 06, 2013 11:18 pm    Post subject: Reply with quote

TomWij knows more than I , any conflicts resolve in his favor

but

Code:
java-check-environment
may say something.

to clean out totally and replace: careful with rm lines--no typos :
Code:
emerge --unmerge java-config java-config-wrapper
rm -rf /etc/java-config-2
rm -rf /usr/portage/dev-java/java-config/*
rm -rf /usr/portage/dev-java/java-config-wrapper/*
rm /usr/portage/distfiles/java-config-*
rm /usr/portage/metadata/timestamp.x
emerge --sync
emerge -av java-config


I'm still using ~ # eselect python list
Available Python interpreters:
[1] python2.7 *
[2] python3.2
because of some unremembered problem that caused a 3.2 ->2.7 reversion

python should be involved as:~ # emerge -av java-config produces :

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

Calculating dependencies... done!
[ebuild R ~] dev-java/java-config-2.2.0:2 PYTHON_TARGETS="python2_7 python3_2 -python2_6 -python3_3"

_________________
Defund the FCC.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Sat Sep 07, 2013 10:54 am    Post subject: Reply with quote

TomWij wrote:
Take a look at `cat $(command -v java-config)` and see if it implements Java related functionality or not; from what I see in this forum thread, I guess not because it likely has been overwritten.

Or maybe the wrapper works, and one of the files that gets wrapped is tampered with; but you can trust me on this, we don't use getopt there. Which becomes clear from simply doing a `java-config --test` that shows totally different error output.

Anyhow, given that java-config is tampered, you will likely just want to emerge java-config again; if emerging it again still makes things broken, then there is something odd going on with your mix of stable and unstable, but I am not sure what exactly...

cat $(command -v java-config) gives me
Code:
#!/bin/bash

WANT_JAVA_CONFIG=${WANT_JAVA_CONFIG:="2"}

JAVA_CONFIG="/usr/bin/java-config-${WANT_JAVA_CONFIG}"

if [[ -x ${JAVA_CONFIG} ]]; then
   exec ${JAVA_CONFIG} "$@"
else
   echo "ERROR: Expected to find ${JAVA_CONFIG}"
fi

java-config --test gives me
Code:
usage: java-config-2 [options] requirement_or_url ...
   or: java-config-2 --help

error: option --test not recognized

When I run..
Code:
java-check-environment

I get...
Code:
* === Java Environment Checker ===
 * The purpose of this script is to check the sanity of your Java Environment.
 * We have significantly changed and improved the way Java is handled in many
 * respects.
 * Please refer to our upgrade guide for details:
 * http://www.gentoo.org/proj/en/java/java-upgrade.xml

 * Checking fastjar ...                                                             [ ok ]

 * Checking vm_environment_files ...                                                [ ok ]

 * Checking user_settings ...
 * Running as root. Don't need to check user settings.                              [ ok ]

 * Checking generation_1_system_vm ...                                              [ ok ]

 * Checking java_config_1 ...                                                       [ ok ]

 * Checking global_classpath ...
grep: /etc/env.d/binutils: Is a directory
grep: /etc/env.d/blas: Is a directory
grep: /etc/env.d/cblas: Is a directory
grep: /etc/env.d/gcc: Is a directory
grep: /etc/env.d/lapack: Is a directory
grep: /etc/env.d/python: Is a directory                                             [ ok ]

 * Checking virtual_provides ...                                                    [ ok ]

 * Checking overlays_eclasses ...                                                   [ ok ]

 * Checking package_env ...
usage: java-config-2 [options] requirement_or_url ...
   or: java-config-2 --help

error: option --with-dependencies not recognized
 * Broken dependencies for dev-java/xjavac-20110814
 * Please try emerge -uD1 =dev-java/xjavac-20110814                                 [ !! ]

 * Some problems were found. Please follow the instructions above, and rerun java-check-environment

I can't emerge xjavac and the other packages which need to be built along with it because the ebuilds fail, as they can't determine a VM.
Stuck in a rather vicious circle.
When I do try to emerge xjavac, the first package it attempts to pull in is ant-core but fails with....
Code:
>>> Emerging (1 of 9) dev-java/ant-core-1.8.4-r1
>>> Failed to emerge dev-java/ant-core-1.8.4-r1, Log file:
>>>  '/var/tmp/portage/dev-java/ant-core-1.8.4-r1/temp/build.log'
>>> Jobs: 0 of 9 complete, 1 failed                 Load avg: 1.37, 0.97, 0.84
 * Package:    dev-java/ant-core-1.8.4-r1
 * Repository: gentoo
 * Maintainer: java@gentoo.org
 * USE:        abi_x86_32 elibc_glibc kernel_linux userland_GNU x86
 * FEATURES:   preserve-libs sandbox
usage: depend-java-query [options] requirement_or_url ...
   or: depend-java-query --help

error: option --get-vm not recognized
 * Unable to determine VM for building from dependencies:
NV_DEPEND: >=virtual/jdk-1.4
   !dev-java/ant-tasks
   !dev-java/ant-optional >=dev-java/java-config-2.1.9-r1  source? ( app-arch/zip )
      
      
      >=dev-java/javatoolkit-0.3.0-r2
      >=dev-lang/python-2.4
 * ERROR: dev-java/ant-core-1.8.4-r1 failed (setup phase):
 *   Failed to determine VM for building.
 *
 * Call stack:
 *             ebuild.sh, line   93:  Called pkg_setup
 *             ebuild.sh, line  324:  Called java-pkg-2_pkg_setup
 *     java-pkg-2.eclass, line   53:  Called java-pkg_init
 *   java-utils-2.eclass, line 2187:  Called java-pkg_switch-vm
 *   java-utils-2.eclass, line 2671:  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/ant-core-1.8.4-r1'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/ant-core-1.8.4-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 =ant-core-1.8.4
 * The complete build log is located at '/var/tmp/portage/dev-java/ant-core-1.8.4-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/ant-core-1.8.4-r1/temp/die.env'.
 * Working directory: '/usr/lib/portage/pym'
 * S: '/var/tmp/portage/dev-java/ant-core-1.8.4-r1/work/apache-ant-1.8.4'

 * Messages for package dev-java/ant-core-1.8.4-r1:

 * Unable to determine VM for building from dependencies:
 * ERROR: dev-java/ant-core-1.8.4-r1 failed (setup phase):
 *   Failed to determine VM for building.
 *
 * Call stack:
 *             ebuild.sh, line   93:  Called pkg_setup
 *             ebuild.sh, line  324:  Called java-pkg-2_pkg_setup
 *     java-pkg-2.eclass, line   53:  Called java-pkg_init
 *   java-utils-2.eclass, line 2187:  Called java-pkg_switch-vm
 *   java-utils-2.eclass, line 2671:  Called die
 * The specific snippet of code:
 *                  die "Failed to determine VM for building."
 *

I am intrigued and confused by..
Code:
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""

Are these what are known as environment variables? If so, how do I check if they are set properly, and where to set if not?
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sat Sep 07, 2013 10:58 am    Post subject: Reply with quote

The wrapper itself is apparently fine; so, yes, one of the java config files is not what it is supposed to be. You cannot use, check or emerge Java things until you fix up java-config.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Sat Sep 07, 2013 11:01 am    Post subject: Reply with quote

Thanks for the quick response TomWij.

Okay, I will now follow Donahues advice and remove what he suggests and start again.
Will update shortly.
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Sat Sep 07, 2013 2:37 pm    Post subject: Reply with quote

After emerging java-config and java-config-wrapper I am left with the same.
That is, whenever I run java-config it behaves the opposite to what the documentation says.
Code:
# java-config-2 --list-available-vms
usage: java-config-2 [options] requirement_or_url ...
   or: java-config-2 --help

error: option --list-available-vms not recognized

But when I try it without -- I get...
Code:
# java-config-2 list-available-vms
Searching for list-available-vms
Reading http://pypi.python.org/simple/list-available-vms/
Couldn't find index page for 'list-available-vms' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for list-available-vms
error: Could not find suitable distribution for Requirement.parse('list-available-vms')

This type of error is what I am seeing when other packages are failing.
Just like when I try to build gcr, I get...
Code:
usage: gdbus-codegen [options] requirement_or_url ...
    or: gdbus-codegen --help

 error: option --interface-prefix not recognized
 make[2]: *** [gcr-dbus-generated.c] Error 1

Is this because I am having trouble with the VM?
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sat Sep 07, 2013 2:52 pm    Post subject: Reply with quote

This has nothing to do with Java anymore as far as I know, I'll ping the Python guys for an explanation and / or solution.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Sat Sep 07, 2013 2:54 pm    Post subject: Reply with quote

Many thanks TomWij.
Because I am not the most intelligent Gentoo user, I'm never to sure which tree I should be barking up. :lol:
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 229
Location: Detroit, MI, USA

PostPosted: Sat Sep 07, 2013 3:18 pm    Post subject: Reply with quote

Python guy here :)

You have overwritten your copy of /usr/bin/python-exec with easy_install. It's an easy mistake to make if you don't have the latest version of dev-python/setuptools installed.

https://bugs.gentoo.org/show_bug.cgi?id=468378

To fix it, re-install dev-python/python-exec.
Back to top
View user's profile Send private message
Thistled
Guru
Guru


Joined: 06 Jan 2011
Posts: 572
Location: Scotland

PostPosted: Sat Sep 07, 2013 3:57 pm    Post subject: Reply with quote

Hey floppymaster, great to hear from you.
I am not even sure why my python-exec would be overwritten.
I think I did see some sort of reference to Easy Install when running java-config without the -- .
I have just re-emerged python-exec-0.3.1
When you say the latest python/setuptools, do you mean the latest stable or ~ ?
I have ~setuptools-1.0 installed
Now that python-exec is rebuilt, do I need to do anything like python-updater?

Thanks in anticipation man!
_________________
Whatever you do, do it properly!
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 229
Location: Detroit, MI, USA

PostPosted: Sat Sep 07, 2013 4:07 pm    Post subject: Reply with quote

python-exec usually gets overwritten when a user tries to install some python software without using portage (via easy_install or pip). It's a bit difficult to figure out unless you catch it immediately.

We fixed setuptools to resolve this problem in setuptools-0.9.8-r1, so setuptools-1.0 should be fixed as well. It is possible that you have found another way to trigger the same problem.

You don't really need to run anything like python-updater. If you want to be extra paranoid, you could reinstall all python packages by running the following command:

emerge /usr/lib/python2.7/site-pacakges
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum