From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FUD7Z-0002FX-5I for garchives@archives.gentoo.org; Fri, 14 Apr 2006 01:29:13 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.5) with SMTP id k3E1TU9U025463; Fri, 14 Apr 2006 01:29:30 GMT Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by robin.gentoo.org (8.13.6/8.13.5) with ESMTP id k3E1TUl4012471 for ; Fri, 14 Apr 2006 01:29:30 GMT Received: from 146-115-26-214.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com (HELO [192.168.1.104]) ([146.115.26.214]) by smtp02.lnh.mail.rcn.net with ESMTP; 13 Apr 2006 21:29:29 -0400 X-IronPort-AV: i="4.04,119,1144036800"; d="scan'208"; a="225477004:sNHT30102794" Message-ID: <443EFB00.3080309@gentoo.org> Date: Thu, 13 Apr 2006 20:29:36 -0500 From: Joshua Nichols User-Agent: Mail/News 1.5 (X11/20060326) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: Henrique Ferreiro CC: Jon Severinsson , gentoo-java@lists.gentoo.org Subject: Re: [gentoo-java] Re: problems compiling junit References: <1144843758.6927.10.camel@localhost> <1144846384.6927.18.camel@localhost> <1144889890.10780.0.camel@localhost> <443DD5C9.4010401@gentoo.org> <443DE9CB.2050205@severinsson.net> <1144929960.26742.3.camel@localhost> <443E3750.4030400@severinsson.net> <1144932831.26742.8.camel@localhost> <443E3EA6.4040709@severinsson.net> <1144937353.26742.19.camel@localhost> In-Reply-To: <1144937353.26742.19.camel@localhost> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: ebec61f6-c597-4038-9d9a-ef31db50098c X-Archives-Hash: 282a30564798d0a907df42aadee20aa1 Henrique Ferreiro wrote: >>>> I did not modify jdk.conf. Every line is commented. >> Then ant-core, as well as junit, should be build with 1.4. Is that the case? > No. ant-core is being built with jdk-1.5. Anyway junit does not compile using > 1.4 with ant-core. > > Alright... I'm pretty sure what the problem is. If you take a look at /usr/bin/ant... at some point, it pulls in a bunch of jars from several packages. This is necessary to make sure that all the ant tasks work properly. One of these happens to be junit.... So what I believe is happening... you have junit installed (and built with 1.5), then go to rebuild with 1.4. The ebuild calls ant, which pulls in junit compiled with 1.5 onto the classpath. When javac tries to resolve junit classes... it's getting them from the 1.5-built junit, instead of the junit which is being built. So, the workaround would be to unmerge junit before trying to rebuidl it with 1.4. Essentially, this problem comes down to who we handle /usr/bin/ant, and how it pulls in all its dependencies. It is currently hardcoded to bring in certain packages, which is less than ideal, because we need to have fine-grain control over the classpath. In particular, when building packages, we don't want to include the already-compiled version that is living on the system. Aside from this, I recommend you try the java-1.5-fixer I posted in a different thread. It actually goes through all of ant's dependencies, and if any were built with 1.5, will unmerge them, and merge them again. Hope this helps, Josh -- gentoo-java@gentoo.org mailing list