Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93649 - java packages with non-UTF8 source files fail to compile with ibm-jdk-bin-1.4*: sun.io.MalformedInputException
Summary: java packages with non-UTF8 source files fail to compile with ibm-jdk-bin-1.4...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 86371 91815 96556 96745 98845 147747 149312 (view as bug list)
Depends on: 155261 166257 176781
Blocks:
  Show dependency tree
 
Reported: 2005-05-23 01:08 UTC by Alexander Skwar
Modified: 2009-04-18 07:30 UTC (History)
7 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 Alexander Skwar 2005-05-23 01:08:51 UTC
[10:03:00 alexander@server:/Gentoo/portage/tree] $ sudo emerge -vpt jython

These are the packages that I would merge, in reverse order:

Calculating dependencies ...done!
[ebuild  N    ] dev-java/jython-2.1-r5  -jikes +readline 0 kB

[...]

>>> Unpacking source...
try path /var/tmp/portage/jython-2.1-r5/work/
error while copying ACKNOWLEDGMENTS to /var/tmp/portage/jython-2.1-r5/work/jython-2.1/ACKNOWLEDGMENTS: sun.io.MalformedInputException
IOException sun.io.MalformedInputException
remove dir /var/tmp/portage/jython-2.1-r5/work/jython-2.1/installer
[...]
remove dir /var/tmp/portage/jython-2.1-r5/work/jython-2.1
can not remove dir /var/tmp/portage/jython-2.1-r5/work/jython-2.1
Abort
>>> Source unpacked.
find: org: Datei oder Verzeichnis nicht gefunden
javac: no source files
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -source <release>         Provide source compatibility with specified release
  -target <release>         Generate class files for specific VM version
  -help                     Print a synopsis of standard options

!!! ERROR: dev-java/jython-2.1-r5 failed.

[10:00:07 alexander@server:~] $ java -version java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia321420-20040626 (JIT enabled: jitc))

Note this line in the output:
find: org: Datei oder Verzeichnis nicht gefunden


[10:06:52 alexander@server:/Gentoo/portage/tree] $ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

jython can be installed just fine when locale is set to C, like so:

$ LC_ALL=C emerge jython











[10:02:42 alexander@server:/Gentoo/portage/tree] $ emerge info
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-ck7-r1.ASN.003.reiser4.module i686)
=================================================================
System uname: 2.6.11-ck7-r1.ASN.003.reiser4.module i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.6.12
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
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.5
sys-devel/binutils:  2.16
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /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 /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distfiles.gentoo.org/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X acl alsa apache2 apm arts artswrappersuid async avi bash-completion bluetooth bzlib cairo calendar caps cdda cddb cdparanoia cdr cdrom codecs crypt cscope css cups dga divx4linux dvdread eds encode esd ethereal exif faad fam fbcon fbdev ffmpeg fftw firefox flash foomaticdb ftp fwdzone gd gdbm gif gimp gimpprint gmail gnokii gnome gphoto2 gpm gs gstreamer gtk gtk2 guile hal iconv idn imagemagick imap imlib java javascript jpeg kde kdeenablefinal kdexdeltas libedit libwww logitech-mouse logrotate lufsusermount lzo lzw lzw-tiff mad maildir matroska matrox mbox mime mmap mmx mng mozdevelop mozilla moznocompose moznoirc mozp3p mozsvg mp3 mpeg mplayer ncurses network nls no-old-linux no_wxgtk1 noantlr nobcel nobeanutils nobsh nocommonslogging nocommonsnet nojdepend nojsch nojython nolog4j nooro nopop3d noregexp norhino noxalan noxerces nptl offensive ofx ogg oggvorbis opengl oss pam parse-clocks pcntl pcre pda pdflib perl pic pie png posix ppds python qt quicktime quotes rdesktop readline real recode samba sasl shared slang sockets speex spell sse ssl svg symlink sysvipc tcltk tcpd theora tidy tiff truetype truetype-fonts type1-fonts unicode usb usepackagedmakefiles vcd videos vim vim-pager vim-with-x vorbis wmf wsconvert x11vnc xchattext xfs xine xml xml2 xmms xv xvid zlib video_cards_matrox linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, PORTDIR_OVERLAY
Comment 1 Alexander Skwar 2005-05-23 01:22:01 UTC
compile:
    [javac] Compiling 433 source files to
/var/tmp/portage/jext-3.2_pre3/work/jext-sources-3.2pre3/build
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] error: IO exception sun.io.MalformedInputException
    [javac] 9 errors

BUILD FAILED
/var/tmp/portage/jext-3.2_pre3/work/jext-sources-3.2pre3/src/build.xml:110:
Compile failed; see the compiler error output for details.

Total time: 14 seconds

!!! ERROR: app-editors/jext-3.2_pre3 failed.


[10:13:20 alexander@server:~] $ java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia321420-20040626 (JIT enabled:
jitc))


After switching the JDK to Blackdown, I can compile things just fine.
Comment 2 Alexander Skwar 2005-05-23 01:26:04 UTC
Seems to be somewhat related to Bug 86371. 86371 is about PPC, though. And it
also mentions, that some packages don't compile with Blackdown.

I'm on x86 and can compile just fine with Blackdown.
Comment 3 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-06-22 20:22:53 UTC
*** Bug 96556 has been marked as a duplicate of this bug. ***
Comment 4 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-07-09 14:15:10 UTC
*** Bug 96745 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Matthijs (RETIRED) gentoo-dev 2005-07-13 03:56:25 UTC
*** Bug 98845 has been marked as a duplicate of this bug. ***
Comment 6 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-09-18 00:57:04 UTC
*** Bug 86371 has been marked as a duplicate of this bug. ***
Comment 7 Joe Jezak (RETIRED) gentoo-dev 2005-09-28 12:16:45 UTC
*** Bug 91815 has been marked as a duplicate of this bug. ***
Comment 8 Santiago Gala 2005-09-28 12:34:26 UTC
The error is due to java wanting to read as utf-8 files with iso-8859-1 files.

Basically the right way to solve it is to use "-encoding=iso-8859-1" in javac
(maybe a similar command for ant) in all ebuilds containing iso-8859-1 chars.

Sometimes LC_ALL=C emerge <whatever> works, but not always.
Comment 9 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-09-28 15:25:35 UTC
Yes, that has been determined, we are in the process of getting a fix into portage.
Comment 10 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-11-05 15:24:50 UTC
Please test the newest version of the IBM JDK (its soft-masked).  It has a fix
for this issue without having to resort to converting the file.  Please comment
if it resolves the issue for you or not.
Comment 11 Kevin 2005-11-08 06:19:43 UTC
In response to your request, here's what I did:

ACCEPT_KEYWORDS="~ppc" emerge -av ibm-jdk-bin
so I now have:
dev-java/ibm-jdk-bin-1.4.2.03
installed.

Then I did this:

hermes adam # java-config --set-system-vm=ibm-jdk-bin-1.4.2.03

and this:

hermes adam # java-config --list-available-vms
[blackdown-jre-1.3.1] "Blackdown JRE 1.3.1" (/etc/env.d/java/20blackdown-jre-1.3.1)
[ibm-jdk-bin-1.4.2.03] "IBM JDK 1.4.2.03" (/etc/env.d/java/20ibm-jdk-bin-1.4.2.03) *
[blackdown-jdk-1.3.1] "Blackdown JDK 1.3.1" (/etc/env.d/java/20blackdown-jdk-1.3.1)
[ibm-jre-bin-1.4.2] "IBM JRE 1.4.2" (/etc/env.d/java/20ibm-jre-bin-1.4.2)


I then re-attempted the action which (when it failed originally) prompted my
filing my bug report (86371 which I think has been incorrectly folded into this
bug).  That action was:

emerge -av ant-tasks
which still fails in a similar (if not identical) way:


These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] dev-java/ant-tasks-1.6.2-r9  -javamail -noantlr -nobcel
-nobeanutils -nobsh -nocommonslogging -nocommonsnet -nojdepend -nojsch -nojython
-nolog4j -nooro -noregexp -norhino -noxalan -noxerces 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] y
>>> emerge (1 of 1) dev-java/ant-tasks-1.6.2-r9 to /
>>> md5 files   ;-) ant-tasks-1.6.2-r10.ebuild
>>> md5 files   ;-) ant-tasks-1.6.2-r9.ebuild
>>> md5 files   ;-) ant-tasks-1.6.5.ebuild
>>> md5 files   ;-) files/digest-ant-tasks-1.6.5
>>> md5 files   ;-) files/1.6.2-scp.patch
>>> md5 files   ;-) files/digest-ant-tasks-1.6.2-r10
>>> md5 files   ;-) files/digest-ant-tasks-1.6.2-r9
>>> md5 src_uri ;-) apache-ant-1.6.2-src.tar.bz2
>>> Unpacking source...
>>> Unpacking apache-ant-1.6.2-src.tar.bz2 to
/var/tmp/portage/ant-tasks-1.6.2-r9/work
tar: A lone zero block at 34226
 * Applying 1.6.2-scp.patch ...                                                
                   [ ok ]>>> Source unpacked.
... Bootstrapping Ant Distribution
... Compiling Ant Classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
... Copying Required Files
... Building Ant Distribution
Buildfile: build.xml

bootstrap:

prepare:

check_for_optional_packages:

javac.preset.1.5+:

javac.preset.1.5-:

javac.preset:

build:
Created dir: /var/tmp/portage/ant-tasks-1.6.2-r9/work/apache-ant-1.6.2/build/lib
Compiling 206 source files to
/var/tmp/portage/ant-tasks-1.6.2-r9/work/apache-ant-1.6.2/build/classes
error: IO exception sun.io.MalformedInputException
1 error

BUILD FAILED
/var/tmp/portage/ant-tasks-1.6.2-r9/work/apache-ant-1.6.2/build.xml:1060: The
following error occurred while executing this line:
/var/tmp/portage/ant-tasks-1.6.2-r9/work/apache-ant-1.6.2/build.xml:628: Compile
failed; see the compiler error output for details.

Total time: 26 seconds
... Failed Building Ant Distribution !
Bootstrap FAILED
>>> Test phase [not enabled]: dev-java/ant-tasks-1.6.2-r9

>>> Install ant-tasks-1.6.2-r9 into /var/tmp/portage/ant-tasks-1.6.2-r9/image/
category dev-java
install: cannot stat `build/lib/ant-junit.jar': No such file or directory

!!! ERROR: dev-java/ant-tasks-1.6.2-r9 failed.
!!! Function java-pkg_dojar, Line 180, Exitcode 1
!!! build/lib/ant-junit.jar not found
!!! If you need support, post the topmost build error, NOT this status message.

hermes adam # epm -qG ibm-jdk-bin
dev-java/ibm-jdk-bin-1.4.2.03

So...
my problem is still present.

Now, just out of curiosity, I tried doing the thing that the filer of this bug
report could not do.  For example:

ACCEPT_KEYWORDS="~ppc" emerge -av jython
This worked and upgraded my previous jython-2.1-r5 to jython-2.1-r6.  No problems.

This reinforces my thinking that my bug 86371 is different than this bug.

I haven't tried emerging ant-tasks with the VM set to blackdown recently, but it
seems that nothing has changed with that (regarding ppc anyway) so I don't see a
reason to try it.

hermes adam # emerge info
Portage 2.0.51.22-r3 (default-linux/ppc/2005.0, gcc-3.4.3-20050110,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r4-kf1 ppc)
=================================================================
System uname: 2.6.11-gentoo-r4-kf1 ppc 7450, altivec supported
Gentoo Base System version 1.4.16
distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
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.5
sys-devel/binutils:  2.15.90.0.3-r4
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O3 -mcpu=powerpc"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/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/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=powerpc"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.ccccom.com http://gentoo.mirrors.pair.com/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j1"
PKGDIR="/usr/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="ppc X Xaw3d aac aalib acl adns alsa altivec apache2 apm artworkextra
audiofile bash-completion bcmath berkdb bidi bitmap-fonts blas bonobo bzip2
bzlib calendar caps cdb cddb cdparanoia cdr cdrom chipcard cpdflib crypt cscope
ctype cups curl curlwrappers dba dbase dbm dbus dbx dga dio directfb divx4linux
dlloader doc dts dvb dvd dvdread edl eds emacs emboss emoticon empress
empress-bcs encode esd ethereal evo examples exif expat f2c fam fastcgi fbcon
ffmpeg fftw filepro flac flash flatfile foomatic foomaticdb fortran fpx freetds
frontbase ftp gatos gb gcj gd gdbm geos ggi gif gimpprint ginac glitz glut gmp
gnome gnustep gnutls gphoto2 gpm graphviz grass gsnd gstreamer gtk gtk2 gtkhtml
guile hardened hardenedphp hbci hyperwave-api iconv icu idea idn imagemagick
imap imlib informix inifile innodb iodbc ipv6 jabber jack java jbig jikes jpeg
jpeg2k junit kde kdeenablefinal kerberos krb4 ladcca lapack lcms ldap leim
libcaca libclamav libgda libwww lirc live lzo m17n-lib mad maildir mailwrapper
matroska mbox mcal mcve memlimit mhash mikmod milter mime ming mng motif mozilla
mp3 mpatrol mpeg mpi msession mssql mysql mythtv nas ncurses network nis nls
nntp oav objc oci8 odbc offensive ofx ogg oggvorbis openal openexr opengl
oracle7 oss ovrimos pam pam-mysql pcmcia pcntl pcre pda pdflib perl pfpro php
pic pie plotutils png pnp portaudio posix postgis postgres ppds prelude profile
proj python qdbm qt quicktime quotes readline recode rtc ruby samba sapdb sasl
scanner sdl session shared sharedmem silc simplexml skey slang slp smartcard
sndfile snmp soap sockets socks5 solid source speex spell spl sqlite ssl svg
sybase sybase-ct sysvipc szip tcltk tcpd tetex tga theora tidy tiff tokenizer
truetype truetype-fonts trusted type1-fonts uim unicode usb v4l v4l2 vda vhosts
vorbis wddx winbind wmf wxwindows xanim xface xim xine xinerama xml xml2 xmlrpc
xmms xosd xpm xscreensaver xsl xv xvid yaz zeo zeroconf zlib video_cards_radeon
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS

Comment 12 Kevin 2005-11-08 06:22:07 UTC
Forgot to mention that I also did the /usr/sbin/env-update and source
/etc/profile after re-assigning vms.
Comment 13 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-11-08 09:31:09 UTC
*** Bug 86371 has been marked as a duplicate of this bug. ***
Comment 14 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-11-09 09:14:11 UTC
*** Bug 86371 has been marked as a duplicate of this bug. ***
Comment 15 Timothy Stotts 2006-04-01 11:51:25 UTC
(In reply to comment #8)
> Sometimes LC_ALL=C emerge <whatever> works, but not always.

Most java packages compile for me in UTF8 locale.  But when one does fail, then LC_ALL=C emerge <whatever> never works for me.

This LC_ALL failure is more an issue in stable portage:  bug 128420

The only work-around that works reliably for me is detailed in:  bug 125998

Hope this is helpful.  Cheers.
Comment 16 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-27 09:00:42 UTC
*** Bug 149312 has been marked as a duplicate of this bug. ***
Comment 17 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-27 09:45:11 UTC
*** Bug 86371 has been marked as a duplicate of this bug. ***
Comment 18 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-27 09:53:29 UTC
*** Bug 147747 has been marked as a duplicate of this bug. ***
Comment 19 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-27 10:19:42 UTC
So, apparently this is fixed in generation-2 eclass that sets LANG and LC_ALL to C when ibm-jdk is used for building. So, to fix this bug we need the generation-2 java system to be stable, and then stabilize gen-2 ebuilds of all affected packages. Meanwhile the workaround is to export LC_ALL="C" and LANG="C" when emerging affected package (should work with portage >=2.1.1 now that bug 51370 was solved).

So, we can use this bug to track all affected packages, to see what needs to get stable or even migrated to gen-2 and then stable. So far the list seems (from the bug reports):

ant-core and ant-tasks will get stable with gen-2 system so that's fine
dev-java/jython-2.1-r6
app-editors/jext-3.2_pre3
app-pda/pilot-link-0.11.8
dev-java/xml-xmlbeans-20041217
dev-java/avalon-logkit-1.2
dev-java/junit-3.8.1-r1
dev-java/bcel-5.1-r2
Comment 20 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-04-18 07:30:29 UTC
Gen 1 ebuilds are gone, so fixed.