I am running 1.4rc2, compiled dev-java/sun-j2sdk-1.4.0-r2 myself and set it as my system-jvm. Now various emerge operations fail with the error message !!! all ebuilds that could satisfy ">=virtual/jdk-1.4" have been masked. !!! (dependency required by "dev-java/sun-j2sdk-1.4.0-r2" [ebuild]) For example: emerge -p depclean emerge -p --deep -u world This is weird, as I have *two* 1.4.x JVMs installed: * dev-java/sun-j2sdk Latest version available: 1.4.0-r2 Latest version installed: 1.4.0-r2 Size of downloaded files: 143 kB Homepage: http://wwws.sun.com/software/java2/download.html Description: Sun's J2SE Development Kit, version 1.4.0 * dev-java/sun-jdk Latest version available: 1.4.1.01 Latest version installed: 1.4.1.01 Size of downloaded files: 0 kB Homepage: http://java.sun.com/j2se/1.4.1/download.html Description: Sun's J2SE Development Kit, version 1.4.1_01 (The latter is the binary version.) Here is my emerge info: Portage 2.0.46-r4 (default-x86-1.4, gcc-3.2.1, glibc-2.3.1-r2) ================================================================= System uname: 2.4.20 i686 Pentium III (Coppermine) USE="x86 oss 3dnow apm arts avi crypt cups encode gif gpm jpeg kde libg++ mikmod mmx mpeg ncurses nls pdflib png qtmt quicktime sdl spell truetype xml2 xmms xv zlib gdbm berkdb slang readline tetex svga java guile X tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk qt motif opengl mozilla alsa" ARCH="i386" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -O3 -pipe" CXXFLAGS="-march=i686 -O3 -pipe" ACCEPT_KEYWORDS="x86" 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" MAKEOPTS="-j2" JDK_HOME="/opt/sun-j2sdk-1.4.0" JAVA_HOME="/opt/sun-j2sdk-1.4.0" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo"
did you try the java-config ? http://www.gentoo.org/doc/en/java.xml
Here are the available VMs: # java-config --list-available-vms [sun-jdk-1.4.1.01] Sun JDK 1.4.1.01 (/etc/env.d/java/20sun-jdk-1.4.1.01) [sun-j2sdk-1.4.0] Sun JDK 1.4.0 (/etc/env.d/java/20sun-j2sdk-1.4.0) [blackdown-jdk-1.3.1] Blackdown JDK 1.3.1 (/etc/env.d/java/20blackdown-jdk-1.3.1) If I set # java-config --set-system-vm=blackdown-jdk-1.3.1 # env-update # . /etc/profile I see the change in "emerge info", but the error remains. The same with # java-config --set-system-vm=sun-jdk-1.4.1.01
I think I have a partial explanation for the problem. sun-j2sdk-1.4.0-r2 insists that openmotif must be absent, so I unmerged openmotif before building the j2sdk. Afterwards, I found that openmotif is needed by emacs, so I installed it again (emerge let me do that, which may be regarded as a bug). So it is reasonable for emerge to regard the sun-j2sdk-1.4.0-r2 as masked now, because it conflicts with the installed openmotif. However, the sun-jdk-1.4.1.01, which I also have installed, does not conflict with openmotif, so it should be able to satisfy the dependency >=virtual/jdk-1.4 (which makes my explanation only a partial explanation). Anyway, I fail to see why compiling a sun-j2sdk should be impossible with openmotif or lesstif (as the dependencies say), and hence in conflict with emacs!?
Strange - without -u it works, but with -u I get the error: bash-2.05b# emerge -p --deep world These are the packages that I would merge, in order: Calculating world dependencies ...done! [blocks B ] x11-libs/openmotif (from pkg dev-java/sun-j2sdk-1.4.0-r2) [ebuild U ] net-www/mozilla-1.2.1-r5 [1.2.1-r4] bash-2.05b# emerge -p --deep -u world These are the packages that I would merge, in order: Calculating world dependencies \ !!! all ebuilds that could satisfy ">=virtual/jdk-1.4" have been masked. !!! (dependency required by "dev-java/sun-j2sdk-1.4.0-r2" [ebuild])
there's noe more sun-j2sdk-1.4.0-r2 available how do you keep your portage up2date ? do you use PORTAGE_OVERLAY ?
All I do is "emerge rsync" and "emerge -u world". I seem to get a random server for each "emerge rsync". I *do* still have the sun-j2sdk-1.4.0-r2 ebuild: bash-2.05b# ls -laG /usr/portage/dev-java/sun-j2sdk/ total 40 drwxr-xr-x 3 root 4096 Jan 13 21:52 . drwxr-xr-x 53 root 4096 Jan 21 20:24 .. -rw-r--r-- 1 root 2042 Jan 13 21:52 ChangeLog drwxr-xr-x 4 root 4096 Jan 12 13:51 files -rw-r--r-- 1 root 5764 Dec 9 05:20 sun-j2sdk-1.4.0-r2.ebuild -rw-r--r-- 1 root 5179 Jan 12 13:51 sun-j2sdk-1.4.0-r3.ebuild -rw-r--r-- 1 root 4676 Jan 13 21:52 sun-j2sdk-1.4.1.ebuild bash-2.05b# emerge search j2sdk Searching... [ Results for search key : j2sdk ] [ Applications found : 1 ] * dev-java/sun-j2sdk Latest version available: 1.4.0-r2 Latest version installed: 1.4.0-r2 Size of downloaded files: 143 kB Homepage: http://wwws.sun.com/software/java2/download.html Description: Sun's J2SE Development Kit, version 1.4.0 I do not normally play with environment variables such as PORTAGE_OVERLAY. It is interesting though that emerge is happy when I set ACCEPT_KEYWORDS='~x86' *without* any update to the sun-jdk that is installed: bash-2.05b# ACCEPT_KEYWORDS='~x86' emerge -p --deep -u sun-j2sdk These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] sys-apps/cpio-2.5 [2.4.2-r4] [ebuild U ] sys-devel/gcc-config-1.3.1 [1.2.7] [ebuild U ] sys-devel/gettext-0.11.5-r1 [0.11.5] [ebuild U ] sys-devel/gcc-3.2.1-r7 [3.2.1-r6] [ebuild U ] sys-libs/readline-4.3-r4 [4.2a-r1] [ebuild U ] sys-devel/m4-1.4p-r1 [1.4p] [ebuild U ] dev-libs/expat-1.95.5-r1 [1.95.4] [ebuild U ] sys-apps/baselayout-1.8.5.8 [1.8.5.5] [ebuild U ] sys-libs/glibc-2.3.1-r3 [2.3.1-r2] [ebuild U ] media-libs/freetype-2.1.3-r2 [2.1.2-r2] [ebuild U ] x11-misc/ttmkfdir-3.0.4 [2.0-r1] [ebuild U ] sys-devel/autoconf-2.57 [2.54] [ebuild U ] sys-devel/automake-1.7.2 [1.6.3] [ebuild U ] media-libs/fontconfig-2.1-r1 [2.1] [ebuild U ] dev-java/sun-j2sdk-1.4.1 [1.4.0-r2] This would be ok if the installed sun-jdk-1.4.1.01 was masked, but it isn't (KEYWORDS="x86 -ppc -sparc -alpha"). The package.mask has: =dev-java/sun-jdk-1.4.1.01-r1 =dev-java/sun-jdk-1.3.1.06-r1
from ChangeLog 12 Nov 2002; Stefan A. Jones <cretin@gentoo.org> sun-j2sdk-1.4.0-r2.ebuild: This ebuild uses the sun version of motif. Lesstif was causing quite a few crashes. During the emerge openmotif and lesstif must be unmerged to stop java linking to the bad versions. marking this as invalid
emerge -p sun-jdk solves this
From Martin Holzer 2003-01-21 15:30 > emerge -p sun-jdk solves this This does nothing. If I omit the -p, the sun-jdk-1.4.1.01 gets merged again, but the problem persists. > During the emerge openmotif and lesstif must be unmerged > to stop java linking to the bad versions. I had openmotif unmerged during the build, but merged it back afterwards to be able to use emacs again. If you insist that openmotif must remain off the system forever when the sun-j2sdk is installed, that makes the package unusable for many people, as emacs is the most important tool to do real work. It would mean that gentoo cannot have both emacs and a custom-compiled mozilla with java plug-in at the same time :-( My suggestion is to sort out the libXm.so libraries so that the sun-j2sdk finds the sun library it wants, yet the rest of the system finds the openmotif libraries (use a special LD_LIBRARY_PATH for java and mozilla).
Oliver: more infos at #14336 Reopening with Comment 9 as Request
*** This bug has been marked as a duplicate of 5121 ***