From: Joshua Nichols <nichoj@gentoo.org>
To: Henrique Ferreiro <henrique.ferreiro@gmail.com>
Cc: gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] Re: problems compiling junit
Date: Thu, 13 Apr 2006 00:38:33 -0400 [thread overview]
Message-ID: <443DD5C9.4010401@gentoo.org> (raw)
In-Reply-To: <1144889890.10780.0.camel@localhost>
Henrique Ferreiro wrote:
> O Mér, 12-04-2006 ás 12:21 +0000, Wiktor Wandachowicz escribiu:
>
>> Henrique Ferreiro <henrique.ferreiro@...> writes:
>>
>>
>>>> # java-config-1 -L
>>>>
>>> [sun-jdk-1.4.2.10] "Sun JDK
>>> 1.4.2.10" (/etc/env.d/java/20sun-jdk-1.4.2.10) *
>>>
>> While the above is correct, the latter...
>>
>>
>>>> # java-config-2 -L
>>>>
>>> 1) Sun JDK 1.4.2.10 [sun-jdk-1.4]
>>> (/usr/share/java-config-2/vm/sun-jdk-1.4)
>>> *) Sun JDK 1.5.0.06 [sun-jdk-1.5]
>>> (/usr/share/java-config-2/vm/sun-jdk-1.5)
>>>
>> ... explains a bit - you probably shouldn't have a SYSTEM JVM
>> set to Java 1.5 as of today. You can do so freely on your regular
>> user account.
>>
>
> The the migration document shoud warm about this. Anyway, I did
>
> java-config-2 -S sun-jdk-1.4
>
>
The document doesn't explicitly state it, but java-check-environment
should be upset with you using a 1.5 system vm. In the event that it
doesn't mind... then it's a bug.
> Now:
>
> $ java -version
> java version "1.4.2_10"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)
>
> But ant-core continues to build with java-1.5.
>
The new system has a separation between the system vm, and the vm used
to compile package (fuller details here [1]) The vm used at build time
is determined by the virtual/jdk dependency of the ebuild and settings
in /etc/java-config-2/build/jdk.conf . In this jdk.conf, you could go like:
*=sun-jdk-1.5
And it would try to build packages that it can with 1.5. If a package
can only be built with 1.4, then the vm would be switched to a 1.4 vm.
So.... this suggests to me that you have a line like the one above in
jdk.conf. Is this the case?
>>>> # which java
>>>>
>>> /usr/bin/java
>>> localhost ~ # ls -l /usr/bin/java
>>> lrwxrwxrwx 1 root root 22 Abr 6 17:00 /usr/bin/java
>>> -> /usr/bin/run-java-tool
>>>
>>>> # java -version
>>>>
>>> java version "1.5.0_06"
>>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
>>> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
>>>
>> The above confirms that fact.
>>
>>
>>>> # echo ${PATH}
>>>>
>>> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:
>>> /usr/i686-pc-linux-gnu/gcc-bin/3.4.6:/opt/sun-jdk-1.4.2.10/bin:
>>> /opt/sun-jdk-1.4.2.10/jre/bin:/opt/sun-jdk-1.4.2.10/jre/javaws
>>>
>> Here the /usr/bin/java symliked to run-java-tool takes precedence
>> over the /opt/sun-jdk-1.4.2.10/bin (this is expected).
>>
>>
>>>> # emerge -pv =sun-jdk-1.4*
>>>>
>>> [ebuild NSF ] dev-java/java-sdk-docs-1.4.2 33,591 kB
>>> [ebuild Rf ] dev-java/sun-jdk-1.4.2.10-r13 USE="X alsa doc*
>>> nsplugin* -jce" 0 kB [5]
>>>
>>> Total size of downloads: 33,591 kB
>>> Portage overlays:
>>> [1] /usr/portage/local/layman/portage
>>> [2] /usr/portage/local/layman/bmg-main
>>> [3] /usr/portage/local/layman/gentopia
>>> [4] /usr/portage/local/layman/java-experimental
>>> [5] /usr/portage/local/layman/migration
>>>
>> A nice set of overlays ;)
>> Most probably you've stepped onto a problem similar to the one already
>> discussed (mixing java-experimental and migration overlays is not always
>> healthy), see here:
>> http://thread.gmane.org/gmane.linux.gentoo.java/825/focus=825
>>
>> However, setting your preferred gen-2 system VM and rebuilding the offensive
>> packages should help. You can try to find them by using:
>>
>> # emerge -pvet junit | less
>>
>> But spotting said packages requires a bit of patience and a good eye :)
>> However, the situation is fixable, either manually or maybe through
>> the java-1.5-fixer (http://article.gmane.org/gmane.linux.gentoo.java/839)
>>
>> BTW, if you choose to try the java-1.5-fixer script, could you please
>> describe your experiences? I never used this (never needed it, though)
>> but I'm curious how this could help in such situation.
>>
>> Wiktor
>>
>>
>
>
[1]
https://projects.gentooexperimental.org/expj/wiki/Old_system_new_system_and_why
--
gentoo-java@gentoo.org mailing list
next prev parent reply other threads:[~2006-04-13 4:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 12:09 [gentoo-java] problems compiling junit Henrique Ferreiro
2006-04-12 11:36 ` [gentoo-java] " Wiktor Wandachowicz
2006-04-12 12:53 ` Henrique Ferreiro
2006-04-12 12:21 ` Wiktor Wandachowicz
2006-04-13 0:58 ` Henrique Ferreiro
2006-04-13 4:38 ` Joshua Nichols [this message]
2006-04-13 6:03 ` Jon Severinsson
2006-04-13 12:06 ` Henrique Ferreiro
2006-04-13 11:34 ` Jon Severinsson
[not found] ` <1144932831.26742.8.camel@localhost>
2006-04-13 12:05 ` Jon Severinsson
2006-04-13 14:07 ` Henrique Ferreiro
2006-04-13 14:09 ` Henrique Ferreiro
2006-04-14 1:29 ` Joshua Nichols
2006-04-14 15:24 ` Henrique Ferreiro
2006-04-14 14:47 ` Joshua Nichols
2006-04-14 21:19 ` Wiktor Wandachowicz
2006-04-12 11:51 ` Wiktor Wandachowicz
2006-04-12 13:25 ` Joshua Nichols
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=443DD5C9.4010401@gentoo.org \
--to=nichoj@gentoo.org \
--cc=gentoo-java@lists.gentoo.org \
--cc=henrique.ferreiro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox