Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 22748

Summary: xalan-2.4.1-r2 fails
Product: Gentoo Linux Reporter: Tobias Sager <moixa>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED WORKSFORME    
Severity: normal CC: narada.sage
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tobias Sager 2003-06-13 06:38:38 UTC
This is the output:
<snip>
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/xalan-2.4.1-r2 to /
>>> md5 src_uri ;-) xalan-j_2_4_1-src.tar.gz
>>> Unpacking source...
>>> Unpacking xalan-j_2_4_1-src.tar.gz to /var/tmp/portage/xalan-2.4.1-r2/work
>>> Source unpacked.
Buildfile: build.xml

prepare:
     [echo] Project:Xalan-Java version:2_4_1 build.xml $Revision: 1.180 $
    [mkdir] Created dir: /var/tmp/portage/xalan-2.4.1-r2/work/xalan-j_2_4_1/build
    [mkdir] Created dir: /var/tmp/portage/xalan-2.4.1-r2/work/xalan-j_2_4_1/build/classes

compile:
     [echo] compile entire source tree and copy .properties and .res files to build tree.
    [javac] Compiling 437 source files to /var/tmp/portage/xalan-2.4.1-r2/work/xalan-j_2_4_1/build/classes
    [javac] /var/tmp/portage/xalan-2.4.1-r2/work/xalan-j_2_4_1/src/org/apache/xml/dtm/ref/DTMManagerDefault.java:394: cannot resolve symbol
    [javac] symbol  : class IncrementalSAXSource_Xerces 
    [javac] location: package ref
    [javac]               coParser=org.apache.xml.dtm.ref.IncrementalSAXSource_Xerces.createIncrementalSAXSource();
    [javac]                                              ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
    [javac] 1 error

BUILD FAILED
file:/var/tmp/portage/xalan-2.4.1-r2/work/xalan-j_2_4_1/build.xml:243: Compile failed; see the compiler error output for details.

Total time: 11 seconds

!!! ERROR: dev-java/xalan-2.4.1-r2 failed.
!!! Function src_compile, Line 19, Exitcode 1
!!! build failed
</snip>

Any ideas?

<snip>
# emerge info 
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.2.5-r2,2.3.1-r4)
=================================================================
System uname: 2.4.20-xfs-r3 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.80GHz
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/portage.local"
USE="x86 oss apm crypt cups gif jpeg libwww mikmod mmx ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb gdbm berkdb slang readline aalib svga java guile mysql X sdl gpm tcpd pam ssl python esd imlib oggvorbis gtk qt motif opengl cdr sse sse2 -3dnow pcmcia pnp trusted pda gphoto2 dga fbcon -gnome libg++ tcltk tiff alsa dvd ggi mozilla xml perl samba -doc -kde xfs gtkhtml encode avi mpeg -arts gtk2 usb ethereal"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="fixpackages sandbox ccache userpriv"
</snip>
Comment 1 Alwyn Schoeman 2003-06-17 07:16:18 UTC
From the forums it appears that adding Xerces to your CLASSPATH environment using java-config solves the problem.

Now the problem becomes the following:

Xerces is emerged as a dependency of Xalan. So in order to fix the emerge the Xalan ebuild should be changed to 

1) Check whether Xerces is in CLASSPATH.
2) If not there, add it temporarily to the CLASSPATH.
3) If there, don't bother.

Now one part where emerge REALLY SUCKS is that it should display messages that is important to the user in a way where the user needs to read it to continue merging.  At least all these messages should be written to file and displayed at the end of the last merge... This is where debconf rulez.

E.g. It should say something like:
Xerces: To add xerces to your classpath do this....
Xalan: To add xalan to your classpath do this....

Comment 2 Tobias Sager 2003-06-19 02:22:45 UTC
Okay, this worked.

Why is the classpath of xerces/xalan not automatically added to env.d after
installation?
Comment 3 Narada Sage 2003-08-06 14:56:25 UTC
Bug 22748 (this one) and bug 23756 are reporting the same package failing.  Also, I've just emerged xalan and I get the following problem.  Any suggestions?

$ emerge xalan 
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/xalan-2.5.1 to /
>>> md5 src_uri ;-) xalan-j_2_5_1-src.tar.gz
>>> Unpacking source...
>>> Unpacking xalan-j_2_5_1-src.tar.gz to /var/tmp/portage/xalan-2.5.1/work
>>> Source unpacked.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main

!!! ERROR: dev-java/xalan-2.5.1 failed.
!!! Function src_compile, Line 21, Exitcode 1
!!! build failed

$ emerge info
Portage 2.0.48-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.21 i686 Intel(R) Pentium(R) III Mobile CPU      1200MHz
GENTOO_MIRRORS="http://ftp.gentoo.skynet.be/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.linux.no/ http://trumpetti.atm.tut.fi/gentoo/ http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://darkstar.ist.utl.pt/gentoo/ http://ftp.caliu.info/pub/gentoo/ http://gentoo.inode.at/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow avi crypt encode foomaticdb gif jpeg mad mmx mpeg ncurses pdflib png quicktime truetype xml2 xmms xv zlib directfb berkdb slang readline aalib bonobo svga java mysql X sdl gpm tcpd pam libwww ssl perl python imlib oggvorbis gtk motif opengl cdr acpi acpi4linux apache2 dvd faad fax fbcon imap kerberos maildir md5sum nptl offensive pcmcia php pnp sse tiff usb xml -apm -arts -cups -kde -libg++ -mikmod -nls -qt -spell -gtkhtml -gdbm -tcltk -guile -esd -gnome -mozilla"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="-march=pentium3 -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j3"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache buildpkg"
Comment 4 Tobias Sager 2003-08-14 00:03:02 UTC
What is `env` saying for CLASSPATH?
Comment 5 Narada Sage 2003-08-14 05:02:39 UTC
$ env | grep CLASSPATH
CLASSPATH=/opt/sun-jdk-1.4.2/jre/lib:/opt/sun-jdk-1.4.2/lib/tools.jar:.

Strangely, after upgrading to sun-jdk-1.4.2 and setting it as system VM using java-config xalan emerges perfectly.  So, I no longer have a problem with xalan.
Comment 6 Adrian Almenar 2003-08-23 20:28:11 UTC
It working here, if you have any additional info to add you're welcome.