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

Bug 236377

Summary: dev-java/javatoolkit has unneeded dependency on dev-python/pyxml
Product: Gentoo Linux Reporter: Gian <news.gdc>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: minor CC: arfrever
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gian 2008-09-01 18:25:19 UTC
xml-commons-external fails to compile, apparently because no XML parser is found. Emergeing dev-python/pyxml fixes the problem. I think xml-commons-external should depend on it.

Reproducible: Always

Steps to Reproduce:
1. emerge -C dev-python/pyxml
2. emerge dev-java/xml-commons-external
Actual Results:  
Rewriting source attributes
Using Sax to rewrite the build.xml files
Rewriting ./build.xml
Traceback (most recent call last):
  File "/usr/bin/xml-rewrite-2.py", line 229, in <module>
    rewriter.process(f)
  File "/usr/bin/xml-rewrite-2.py", line 142, in process
    parse(in_stream, self)
  File "/usr/lib/python2.5/xml/sax/__init__.py", line 30, in parse
    parser = make_parser()
  File "/usr/lib/python2.5/xml/sax/__init__.py", line 93, in make_parser
    raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found
 *
 * ERROR: dev-java/xml-commons-external-1.3.04 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3937:  Called java-pkg-2_src_compile
 *             environment, line 2137:  Called eant 'src_compile' 'src_compile' 'jar'
 *             environment, line  780:  Called java-ant_bsfix
 *             environment, line 1953:  Called java-ant_bsfix_files '-f'
 *             environment, line 1998:  Called _bsfix_die 'build.xml'
 *             environment, line  264:  Called die
 * The specific snippet of code:
 *           die ${1};
 *  The die message:
 *   xml-rewrite2 failed: ./build.xml
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-java/xml-commons-external-1.3.04/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/xml-commons-external-1.3.04/temp/environment'.
 *
!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.6  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.07"
JAVACFLAGS="-source 1.3 -target 1.3" COMPILER=""
and of course, the output of emerge --info


Expected Results:  
Compiles succesfully.

$ emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 i686)
=================================================================
System uname: 2.6.25-gentoo-r7 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz
Timestamp of tree: Mon, 01 Sep 2008 16:30:03 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.3-r4, 2.5.2-r6
dev-python/pycrypto: 2.0.1-r5
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo http://distfiles.gentoo.org"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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="/var/overlays/mine"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acpi alsa bash-completion berkdb bzip2 cli cracklib cups dbus dri flac gcj gdbm gif gpm hal iconv idn ipv6 isdnlog java java5 java6 jpeg laptop lm_sensors midi mp3 mudflap mysql ncurses nls nptl nptlonly ogg opengl openmp pam pcre png pppd readline reflection session spell spl sse sse2 ssl tcpd tiff truetype unicode vim-syntax vim-with-x x86 xcomposite xinerama xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-09-06 11:04:49 UTC
The problem was in a bit different package, but thanks for reporting, now fixed in CVS :)
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2008-09-07 15:25:30 UTC
Vlastimil: Care to point out what your idea is what the problem was? I'm inlined to think this is the same issue as I pointed out in bug 233166#c7
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-09-07 20:54:05 UTC
(In reply to comment #2)
> Vlastimil: Care to point out what your idea is what the problem was? I'm
> inlined to think this is the same issue as I pointed out in bug 233166#c7
 
The problem was not in dev-java/xml-commons-external specifically but in dev-java/javatoolkit which contains the python script /usr/bin/xml-rewrite-2.py which is called to rewrite build.xml of most Ant-based java packages such as the xml-commons-external. The fact that it has also 'xml' in name is not related, just coincidence that might be misleading :)

As the xml-rewrite-2.py from javatoolkit rewrites build.xml files, it obviously has to parse them. Now I myself have no idea whether python should have xml support itself (the script uses xml.dom.minidom from what I can see), but since the 0.3.0 versions of javatoolkit have dev-python/pyxml dependency, I assumed it was really missing in 0.2.0 and added it. Now bug 233166 indicates that it's an error in python installation?
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2008-09-08 15:04:32 UTC
The default XML parser implementing Python's xmlreader interface is pyexpat and part of Python, unless the - unsupported - "build" use flag is used or - unlikely - there's a bug in the Python build script. Another way to trigger this would be some non-Portage Python installation. Maybe folks having done the dead stupid libexpat.so.x -> y are affected, too.

These bug reports are most likely the symptom of locally screwed up systems as described above - but I cannot say for sure, if there isn't a real problem behind it.


From the Python documentation: 

>It is important to note that modules in the xml package require that there be at least one SAX-compliant XML parser available. Starting with Python 2.3, the Expat parser is included with Python, so the xml.parsers.expat module will always be available. You may still want to be aware of the PyXML add-on package; that package provides an extended set of XML libraries for Python.


From what I see, you use stock Python and not any other libraries, which would require pyxml, so it is unneeded.
Comment 5 Gian 2008-09-08 20:00:31 UTC
(In reply to comment #4)
> These bug reports are most likely the symptom of locally screwed up systems as
> described above - but I cannot say for sure, if there isn't a real problem
> behind it.

You were right, Carsten. As you suggested in 233166#c10 , /usr/lib/python2.5/lib-dynload/pyexpat.so was missing on my system and re-emergeing Python 2.5 fixed the problem. I think it happened during the upgrade from 2.4.3-r4 from stage3 to 2.5.2-r6. I remember some file collision, I probably did something wrong trying to fix that.
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-09-28 15:55:59 UTC
Alright I'm renaming this bug as the original version of javatoolkit is gone but 0.3.0-r2 still has pyxml dependency which should therefore not be needed apparently? 
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-08 17:00:52 UTC
Fixed in dev-java/javatoolkit-0.3.0-r5.