While compiling xpp2 and xpp3 a target release 1.1 conflicts with default source release 1.5-error occurs. Changing the target release in the main build.xml of PullParser2.1.10.tgz does not work because some enum-related errors occure then. Reproducible: Always Steps to Reproduce: 1. Simply emerge xpp3 or xpp2 using JDK 1.5.0.x 2. 3. Actual Results: Buildfile: build.xml prepare: [mkdir] Created dir: /var/tmp/portage/xpp3-1.1.3.4m/work/xpp3-1.1.3.4.M/build [mkdir] Created dir: /var/tmp/portage/xpp3-1.1.3.4m/work/xpp3-1.1.3.4.M/build/dist [mkdir] Created dir: /var/tmp/portage/xpp3-1.1.3.4m/work/xpp3-1.1.3.4.M/build/classes [touch] Creating /var/tmp/portage/xpp3-1.1.3.4m/work/xpp3-1.1.3.4.M/build/classes/XPP3_1.1.3.4.M_VERSION update_api: api: [mkdir] Created dir: /var/tmp/portage/xpp3-1.1.3.4m/work/xpp3-1.1.3.4.M/build/api [javac] Compiling 4 source files to /var/tmp/portage/xpp3-1.1.3.4m/work/xpp3-1.1.3.4.M/build/api [javac] javac: target release 1.1 conflicts with default source release 1.5 BUILD FAILED /var/tmp/portage/xpp3-1.1.3.4m/work/xpp3-1.1.3.4.M/build.xml:221: Compile failed; see the compiler error output for details. Expected Results: Clean compilation / emerge. My JDK is Sun's 1.5.0.04. emerge --info reports this: Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6.11-gentoo-r11Maximegalon x86_64) ================================================================= System uname: 2.6.11-gentoo-r11Maximegalon x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage-overlay /usr/local/bmg-main" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X a52 aac aalib acl acpi alsa arts audiofile avi bash-completion berkdb bitmap-fonts bonobo bzlib calendar cdparanoia cdr crypt cups curl dga directfb doc dvd dvdread eds emboss encode esd evo exif expat fam fbcon flac foomaticdb fortran ftp gcj gd gdbm gif gimp gimpprint gnome gpm gstreamer gtk gtk2 gtkhtml guile iconv icq imagemagick imlib ipv6 jabber jack java jpeg junit kde ldap libwww lm_sensors lzw lzw-tiff mad mime mmap mng motif mozilla mp3 mpeg msn musicbrainz mysql nas ncurses nis nls nptl objc ogg oggvorbis openal opengl oscar pam pcre pdflib perl png postgres ppds python qt quicktime readline ruby samba scanner sdl slang smartcard sndfile snmp speex spell sqlite ssl svg symlink sysfs tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales vcd vorbis wmf wxwindows xine xinerama xml xml2 xmms xosd xpm xprint xv xvid yahoo zlib linguas_de userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Created attachment 68616 [details, diff] xpp3 patch to replace variables named enum with something else, since enum is a java5 keyword
Test the patch out hopefully it will work, basically you can not use enum as a variable name in java5 code. Some java programmers havn't caught onto this yet and are still naming variables enum, since it was common practice to name your StringTokenizer object enum.
Julian: Java 5 is still hard masked and even if not this wouldn't be a blocker. See also Bug 79206
Created attachment 68617 [details, diff] xpp2 patch replacing enum variable names
I suggest applying the patches since java5 will adventually become the standard for java. It's a simple fix and should probably be sent upstream.
you can just pass -source 1.4 and you don't need to watch this will be fixed when we roll out the other fixes and unmask 1.5