Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 336930 - dev-java/ant-nodeps-1.8.1 fails to build: The javac executable was not found in the Java path
Summary: dev-java/ant-nodeps-1.8.1 fails to build: The javac executable was not found ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: x86 Linux
: High blocker
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-12 16:35 UTC by balrok
Modified: 2011-01-24 19:17 UTC (History)
2 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 balrok 2010-09-12 16:35:59 UTC
Hello - i got a problem with that package.. i hope that's enough information:

build.log:
-----------------------
* CPV:  dev-java/ant-nodeps-1.8.1
 * REPO: gentoo
 * USE:  elibc_glibc kernel_linux userland_GNU x86
!!! ERROR: The javac executable was not found in the Java path
 * Using: sun-jre-bin-1.6
>>> Unpacking source...
>>> Unpacking apache-ant-1.8.1-src.tar.bz2 to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work
>>> Unpacking ant-1.8.1-gentoo.tar.bz2 to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work
>>> Source unpacked in /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work
>>> Compiling source in /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1 ...
Rewriting attributes
Rewriting ./build.xml
 * Disabling all optional ANT_TASKS
Warning: Unable to determine tools.jar location.
  If build fails because sun.* classes could not be found,
  Make sure you are using a JDK, not JRE as your user/system VM.
  and that you have java-config version 2.0.30 or above installed.
Unable to locate tools.jar. Expected to find it in /opt/sun-jre-bin-1.6.0.20/lib/tools.jar
Buildfile: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build.xml

check_for_optional_packages:

prepare:
    [mkdir] Created dir: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build
    [mkdir] Created dir: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes
    [mkdir] Created dir: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/lib
     [copy] Copying 7 files to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes
     [copy] Copying 2 files to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes

build-nodeps:
[javac.ant] Compiling 162 source files to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes

BUILD FAILED
/var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build.xml:506: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/opt/sun-jre-bin-1.6.0.20"

Total time: 6 seconds
 * ERROR: dev-java/ant-nodeps-1.8.1 failed:
 *   eant failed
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 4369:  Called eant 'jar-nodeps'
 *   environment, line  956:  Called die
 * The specific snippet of code:
 *       ant ${antflags} "${@}" || die "eant failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-java/ant-nodeps-1.8.1',
 * the complete build log and the output of 'emerge -pqv =dev-java/ant-nodeps-1.8.1'.
!!! 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="javac"
and of course, the output of emerge --info
 * The complete build log is located at '/var/tmp/portage/dev-java/ant-nodeps-1.8.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/ant-nodeps-1.8.1/temp/environment'.
 * S: '/var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1'




------------
emerge --info
Portage 2.1.8.3 (default/linux/x86/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-gentoo-r1 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.34-gentoo-r1-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 12 Sep 2010 09:30:22 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.1 AdobeFlash-10 AdobeFlash-9.0.31.0"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=core2 -mtune=generic -mssse3 -mfpmath=sse -fomit-frame-pointer -pipe -g0"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-Os -march=core2 -mtune=generic -mssse3 -mfpmath=sse -fomit-frame-pointer -pipe -g0"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="en_US.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de ja"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes --delete=excluded --delete-before"
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 a52 aac aalib acl acpi alsa anthy bash-completion berkdb binary bitmap-fonts blksha1 branding bzip2 cairo cdr cjk cli consolekit cracklib crypt custom-cflags custom-cxxflags custom-optimization cxx directfb dri dts dvd dvdr emboss encode exif firefox flac fortran fxsr gdbm gif hal iconv immqt-bc jpeg lcms ldap libnotify lzma m17n-lib mad madwifi mikmod mmx modules mp3 mp4 mpeg mudflap ncurses nptl nptlonly nsplugin ogg opengl openmp pango pch pcre pdf perl png ppds pppd python qt3support readline reflection scim sdl session sse sse2 ssl startup-notification svg sysfs tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb vcd vorbis win32codecs x264 x86 xcb xml xorg 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 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" ELIBC="glibc" INPUT_DEVICES="mouse synaptics keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de ja" 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS



-------------------
emerge -pqv
[ebuild  N    ] dev-java/ant-nodeps-1.8.1 


Reproducible: Always
Comment 1 Agostino Sarubbo gentoo-dev 2010-09-12 16:53:45 UTC
On my system, work fine, isn't a general problem:


>>> Emerging (2 of 2) dev-java/ant-nodeps-1.8.1
 * apache-ant-1.8.1-src.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                              [ ok ]
 * ant-1.8.1-gentoo.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                                  [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                         [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                        [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                       [ ok ]
 * CPV:  dev-java/ant-nodeps-1.8.1
 * REPO: gentoo
 * USE:  elibc_glibc kernel_linux userland_GNU x86
 * Using: sun-jdk-1.6
>>> Unpacking source...
>>> Unpacking apache-ant-1.8.1-src.tar.bz2 to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work
>>> Unpacking ant-1.8.1-gentoo.tar.bz2 to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work
>>> Source unpacked in /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work
>>> Compiling source in /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1 ...
Rewriting attributes
Rewriting ./build.xml
 * Disabling all optional ANT_TASKS
Buildfile: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build.xml

check_for_optional_packages:

prepare:
    [mkdir] Created dir: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build
    [mkdir] Created dir: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes
    [mkdir] Created dir: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/lib
     [copy] Copying 7 files to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes
     [copy] Copying 2 files to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes

build-nodeps:
[javac.ant] Compiling 162 source files to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/classes

jars-prep:
     [copy] Copying 2 files to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build
     [copy] Copying 1 file to /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build

jar-nodeps:
      [jar] Building jar: /var/tmp/portage/dev-java/ant-nodeps-1.8.1/work/apache-ant-1.8.1/build/lib/ant-nodeps.jar

BUILD SUCCESSFUL
Total time: 9 seconds
>>> Source compiled.
>>> Test phase [not enabled]: dev-java/ant-nodeps-1.8.1

>>> Install ant-nodeps-1.8.1 into /var/tmp/portage/dev-java/ant-nodeps-1.8.1/image/ category dev-java
>>> Completed installing ant-nodeps-1.8.1 into /var/tmp/portage/dev-java/ant-nodeps-1.8.1/image/


>>> Installing (2 of 2) dev-java/ant-nodeps-1.8.1
 * checking 4 files for package collisions
--- /usr/
--- /usr/share/
--- /usr/share/ant/
--- /usr/share/ant/lib/
>>> /usr/share/ant/tasks-1.8.1/
>>> /usr/share/ant/tasks-1.8.1/ant-nodeps
>>> /usr/share/ant-nodeps/
>>> /usr/share/ant-nodeps/lib/
>>> /usr/share/ant-nodeps/lib/ant-nodeps.jar
>>> /usr/share/ant-nodeps/package.env
>>> /usr/share/ant/lib/ant-nodeps.jar -> /usr/share/ant-nodeps/lib/ant-nodeps.jar

>>> Recording dev-java/ant-nodeps in "world" favorites file...

 * Messages for package dev-java/ant-core-1.8.1:

 * The way of packaging ant in Gentoo has changed significantly since
 * the 1.7.0 version, For more information, please see:
 * http://www.gentoo.org/proj/en/java/ant-guide.xml
 * 
 * Since 1.7.1, the ant-tasks meta-ebuild has been removed and its USE
 * flags have been moved to dev-java/ant.

Paste your: java-config -L
Comment 2 balrok 2010-10-06 15:26:14 UTC
hello - sorry for the late response i think i didn't received any mail about this bug..

thats the not working java-config:
The following VMs are available for generation-2:
1)      IcedTea6-bin 1.8.1 [icedtea6-bin]
2)      Sun JDK 1.6.0.20 [sun-jdk-1.6]
*)      Sun JRE 1.6.0.20 [sun-jre-bin-1.6]

i switched to number 2 (JDK) and now it works..
sorry to bother you.. but i'm no java-enthusiast so i realy don't know the point behind those 3 options
Comment 3 balrok 2010-10-06 15:29:11 UTC
edit: forgot to mention, that i installed the JDK (manually) only today.. but without java-config -S 2 it also printed me that error
Comment 4 Fabiano 2011-01-24 18:37:01 UTC
(In reply to comment #3)
> edit: forgot to mention, that i installed the JDK (manually) only today.. but
> without java-config -S 2 it also printed me that error
> 

I have the same problem. Brand new stable install.
Comment 5 Miroslav Šulc gentoo-dev 2011-01-24 19:17:46 UTC
there is difference between JRE and JDK. JRE is Java Runtime Engine, that is version just for running Java applications, but not for compilation. JDK is Java Development Kit, that is release for Java development and it also contains javac which is used for Java code compilation. so to compile Java packages, you need JDK, you cannot use JRE.

it's also obvious from this output:

Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/opt/sun-jre-bin-1.6.0.20"

so the solution is to set your system-vm to JDK, not JRE. for details you can also see "eselect java-vm" output.