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

Bug 363147

Summary: circular dependencies between dev-java/xalan, dev-java/bcel and dev-java/ant-junit
Product: Gentoo Linux Reporter: Sebastian Bille <sebastian.bille>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: normal CC: diegomichel, gentoo, sera
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.xml patch
Patch for findbugs-patch
A new ebuild for bcel-5.2

Description Sebastian Bille 2011-04-11 19:08:04 UTC
I am using the stable portage tree and put all the packages that i need to emerge findbugs in /etc/portage/package.keywords:
dev-util/findbugs
dev-java/jformatstring
dev-java/bcel

I also needed to set 
dev-java/bcel findbugs
in my /etc/portage/package.use

When i try to emerge dev-util/findbugs-1.3.9 it says:
These are the packages that would be merged, in order:

Calculating dependencies... done!


[ebuild  N    ] dev-util/findbugs-1.3.9  USE="-doc -source -test" 8,029 kB
[nomerge      ]  dev-java/jaxen-1.1.1  USE="-doc -examples -source -test" 
[nomerge      ]   dev-java/jdom-1.0-r4  USE="-doc -examples -source" 
[ebuild  N    ]    dev-java/jdom-jaxen-1.0-r1  3,489 kB
[ebuild  N    ]     dev-java/jaxen-1.1.1  USE="-doc -examples -source -test" 265 kB
[ebuild  N    ]      dev-java/dom4j-1.6.1-r3  USE="-doc -source -test" 9,463 kB
[ebuild  N    ]       dev-java/jsr173-1.0-r1  USE="-doc -source" 625 kB
[ebuild  N    ]        dev-java/jaxme-0.5.2  USE="-doc -source" 5,351 kB
[ebuild  N    ]         dev-java/xmldb-20011111-r1  USE="-doc -source" 36 kB
[nomerge      ] dev-util/findbugs-1.3.9  USE="-doc -source -test" 
[nomerge      ]  dev-java/junit-4.6 [3.8.2-r1] USE="-doc -examples -source -test" 
[ebuild  N    ]   dev-java/hamcrest-core-1.1  USE="-source" 1,631 kB
[ebuild  N    ]    dev-java/jarjar-0.9  USE="-doc -source -test" 184 kB
[ebuild  N    ]     dev-java/asm-2.0-r1  USE="-doc -source" 253 kB
[ebuild  N    ]  dev-java/asm-3.2  USE="-doc -source" 832 kB
[ebuild  N    ]   dev-java/ant-owanttask-1.1-r12  10 kB
[ebuild  N    ]  dev-java/bcel-5.2-r1  USE="findbugs -doc -source" 263 kB
[ebuild  N    ]   dev-java/ant-junit-1.8.1  0 kB
[ebuild  N    ]    dev-java/xalan-2.7.1  USE="-doc -source" 6,138 kB
[ebuild  NS   ]   dev-java/junit-4.6 [3.8.2-r1] USE="-doc -examples -source -test" 1,230 kB

Total: 16 packages (15 new, 1 in new slot), Size of downloads: 37,793 kB

 * Error: circular dependencies:

(dev-java/xalan-2.7.1, ebuild scheduled for merge) depends on
 (dev-java/bcel-5.2-r1, ebuild scheduled for merge) (buildtime)
  (dev-java/ant-junit-1.8.1, ebuild scheduled for merge) (buildtime)
   (dev-java/xalan-2.7.1, ebuild scheduled for merge) (runtime)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.


Reproducible: Always

Steps to Reproduce:
1. emerge findbugs
2.
3.
Actual Results:  
emerge failed

Expected Results:  
get installed
Comment 1 diego miche 2011-04-13 02:45:26 UTC
Same problem here

emerge dev-java/xalan -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!


[nomerge      ] dev-java/xalan-2.7.1  USE="-doc -source" 
[ebuild  N    ]  dev-java/bcel-5.2-r1  USE="-doc -findbugs -source" 0 kB
[ebuild  N    ]   dev-java/junit-4.8.2-r1  USE="-doc -examples -source -test" 1,557 kB
[ebuild  N    ]    dev-java/hamcrest-core-1.1  USE="-source" 1,631 kB
[ebuild  N    ]     dev-java/jarjar-0.9  USE="-doc -source -test" 184 kB
[ebuild  N    ]      dev-java/asm-2.0-r1  USE="-doc -source" 253 kB
[ebuild  N    ]       dev-java/ant-owanttask-1.1-r12  10 kB
[ebuild  N    ]   dev-java/ant-junit-1.8.1  5,740 kB
[ebuild  N    ]    dev-java/xalan-2.7.1  USE="-doc -source" 0 kB

Total: 8 packages (8 new), Size of downloads: 9,373 kB

 * Error: circular dependencies:

(dev-java/bcel-5.2-r1::gentoo, ebuild scheduled for merge) depends on
 (dev-java/ant-junit-1.8.1::gentoo, ebuild scheduled for merge) (buildtime)
  (dev-java/xalan-2.7.1::gentoo, ebuild scheduled for merge) (runtime)
   (dev-java/bcel-5.2-r1::gentoo, ebuild scheduled for merge) (buildtime)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.

 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

(chroot) mybox / # 
******
(chroot) mybox / # emerge --info
Portage 2.2.2 (default/linux/x86/2008.0/desktop, gcc-4.4.5, glibc-2.11.2-r2, 2.6.38.2-zen i686)
=================================================================
System uname: Linux-2.6.38.2-zen-i686-AMD_Phenom-tm-_II_X2_550_Processor-with-gentoo-2.1.8
Portage Tree: /usr/portage
Portage HEAD: 4c9bb13fe20d7986ee57f33ef6a45146054edc11 /usr/portage/.git/refs/heads/funtoo.org
ccache version 3.1.4 [enabled]
app-shells/bash:     4.1_p10
dev-lang/python:     2.6.6-r1
dev-util/ccache:     3.1.4
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.1.8-r2
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.68
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.32 (sys-kernel/linux-headers)
Repositories: gentoo
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10 AdobeFlash-10.1 PUEL"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -fomit-frame-pointer -march=amdfam10 -pipe -mtune=amdfam10"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -fomit-frame-pointer -march=amdfam10 -pipe -mtune=amdfam10"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks fixlafiles fixpackages mini-manifest news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="git://github.com/funtoo/portage-mini-2010.git"
SYNC_USER="root"
USE="3dnow X a52 aac acl acpi alac alsa berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt curl cxx dbus dri dts dvd dvdr dvdread emboss encode esd exif fam firefox flac fortran gdbm gdu gif gpm iconv ipv6 jpeg lame lcms libnotify mad mikmod minimal mmx mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python readline sdl session spell sse sse2 sse3 ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb userlocales vaapi vdpau vorbis wavpack win32codecs x264 x86 xcb xml xorg xulrunner xv xvid 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 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC_UMASK

(chroot) mybox / #
Comment 2 ctxnop 2011-04-13 14:58:33 UTC
Same here when trying to emerge tomcat.
This isn't a findbugs problem as the circular dependancy is on xalan.
Comment 3 daid kahl 2011-04-14 03:55:51 UTC
I can work around the cycle using bcel-5.2 instead of bcel-5.2-r1.

So it's some problem in the bcel revision 1 ebuild I guess.

ie:

# emerge -1av =bcel-5.2

Then we can continue with whatever we were trying to do that pulled these dependencies.
Comment 4 Sebastian Bille 2011-04-14 06:51:29 UTC
The workaround does it's job for me, too! 
What should be done now? Should the status of this bug be set to RESOLVED and a new bug opened for bcel?
Comment 5 manwe 2011-04-14 13:37:53 UTC
Had exactly the same problem when trying to emerge netbeans. But emerge -1 =bcel-5.2 helped.
Comment 6 coran.fisher@gmail.com 2011-04-17 02:26:18 UTC
emerge -1 =bcel-5.2 solved my issue trying to compile icedtea as well.
Comment 7 Alistair Bush (RETIRED) gentoo-dev 2011-04-20 10:05:08 UTC
Believe the solution for this is too have xalan as a PDEPEND in ant-junit.

Sadly I haven't been able to test this properly as i don't use emerge.
Comment 8 Ralph Sennhauser (RETIRED) gentoo-dev 2011-04-20 15:47:08 UTC
The shipped build.xml was generated with ant:ant but not sanitized.
The patch bcel-5.2-build.xml.patch takes care of this.

The patch findbugs-bcel-5.2_p20070531.patch.patch removes the build.xml from findbugs-bcel-5.2_p20070531.patch. It isn't used and forces the ebuild to backup the shipped build.xml.
The ebuild assumes this patch to be in ${FILESDIR}, of course, applying to the current patch would be nicer.

The ebuild removes the dependency on ant-junit and junit. Neither is needed, as there are no unit tests at all. Also no need to rewrite the classpath.
Finally bumped to EAPI=4 and does apply the above mentioned patches.
ANT_OPTS gets unset later and so I removed it as well.

So there is no circular dependency which needs to be worked around.


PS: The patches bcel-5.1-gentoo-buildxml.diff and bcel-5.1-gentoo-src.diff are apparently no longer in use.
Comment 9 Ralph Sennhauser (RETIRED) gentoo-dev 2011-04-20 15:48:06 UTC
Created attachment 270675 [details, diff]
build.xml patch
Comment 10 Ralph Sennhauser (RETIRED) gentoo-dev 2011-04-20 15:48:51 UTC
Created attachment 270677 [details, diff]
Patch for findbugs-patch
Comment 11 Ralph Sennhauser (RETIRED) gentoo-dev 2011-04-20 15:49:34 UTC
Created attachment 270679 [details]
A new ebuild for bcel-5.2
Comment 12 Alistair Bush (RETIRED) gentoo-dev 2011-04-21 08:30:27 UTC
committed thanks sera.