Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938924 - dev-java/openjdk:8 does not satisfy virtual/jdk:1.8 - how to prefer source-built JDK?
Summary: dev-java/openjdk:8 does not satisfy virtual/jdk:1.8 - how to prefer source-bu...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-02 09:30 UTC by Joe Breuer
Modified: 2024-09-03 07:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Breuer 2024-09-02 09:30:18 UTC
I strongly prefer to run a source-built JDK/JVM.

My fairly current amd64/23.0/desktop/plasma/systemd install is in the weird state where dev-java/openjdk-8.422_p05 apparently does not satisfy virtual/jdk-1.8.0-r9.

When I try to install e.g. xwininfo, emerge wants to install dev-java/openjdk-bin-8.422_p05, shown in the tree as being due to virtual/jdk-1.8.0-r9:

# emerge -bDNavut xwininfo

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

Calculating dependencies... done!
Dependency resolution took 74.85 s (backtrack: 0/20).

[ebuild  N     ] x11-apps/xwininfo-1.1.6::gentoo  158 KiB
[ebuild  N     ]  x11-libs/xcb-util-errors-1.0.1-r1::gentoo  262 KiB
[nomerge       ] sys-apps/findutils-4.10.0::gentoo  USE="nls (-selinux) -static -test -verify-sig" 
[nomerge       ]  sys-devel/gettext-0.22.4::gentoo  USE="acl cxx emacs java ncurses nls openmp (xattr) -doc -git -static-libs -verify-sig" ABI_X86="32 (64) (-x32)" 
[nomerge       ]   virtual/jdk-1.8.0-r9:1.8::gentoo  USE="-headless-awt" 
[ebuild  NS    ]    dev-java/openjdk-bin-8.422_p05:8::gentoo [17.0.12_p7:17::gentoo] USE="alsa cups -examples% -headless-awt (-selinux) -source" 0 KiB

Total: 3 packages (2 new, 1 in new slot), Size of downloads: 420 KiB


I cannot make sense of this, the dependency in virtual/jdk-1.8.0-r9 is written as:

RDEPEND="|| (
                dev-java/openjdk-bin:8[headless-awt=]
                dev-java/openjdk:8[headless-awt=]
)"

I cannot figure out why the installed dev-java/openjdk-8.422_p05 would not be "good enough".

When I run
# emerge -bDNauvt @world
it will also try to install dev-java/openjdk-bin-8.422_p05; however:
# emerge -ca 
will remove that package again.

I've seen that kind of oscillation a long while in the past (don't remember which packages were in involved back then), but I can't remember how to analyze and fix this issue.

Any help would be appreciated, and I'm happy to try out things.


# emerge --info
Portage 3.0.65 (python 3.12.3-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-13, glibc-2.39-r6, 6.6.47-gentoo x86_64)
=================================================================
System uname: Linux-6.6.47-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-glibc2.39
KiB Mem:    32669536 total,   6079788 free
KiB Swap:   16777212 total,  16775912 free
Timestamp of repository gentoo: Sun, 01 Sep 2024 05:45:00 +0000
Head commit of repository gentoo: 24eda65d32055807b278aea8dffbe8b3064df7fa
Timestamp of repository fortunelay: Tue, 29 Aug 2023 15:50:57 +0000
Head commit of repository fortunelay: 8915022e32fc85aa513a79397254324f9ced1fba

Timestamp of repository gentoo-zh: Sat, 31 Aug 2024 15:18:53 +0000
Head commit of repository gentoo-zh: dbbb3f9b9ec39738e5ba3ee14853327422ce7570

Timestamp of repository guru: Sat, 31 Aug 2024 21:48:50 +0000
Head commit of repository guru: a1b09d98cf4e1ba40b0e5ee5782ee8c1daeb314e

Head commit of repository librewolf: ad8bd23b0fad08885620d6cc08a92d7ac0e68e61

Timestamp of repository pkalin: Tue, 20 Aug 2024 20:34:04 +0000
Head commit of repository pkalin: b49c385dcd902cd30d6078e690bbce299eb3eeb3

Timestamp of repository seden: Mon, 19 Aug 2024 06:22:18 +0000
Head commit of repository seden: 62fb27f4a8b53c34124088ac5dd4f5d049a2ac47

Timestamp of repository steam-overlay: Fri, 23 Aug 2024 21:33:51 +0000
Head commit of repository steam-overlay: 1057828cc4261082ad3faf418c27176e0282557b

Timestamp of repository stefantalpalaru: Sun, 21 Jul 2024 15:48:52 +0000
Head commit of repository stefantalpalaru: 264a6c277eb53610f500c185f9f5a581d3b2b32a

Head commit of repository tlp: af2991838d36eb8337616cb66dcda93d455fdd66

Timestamp of repository torbrowser: Wed, 21 Aug 2024 17:48:47 +0000
Head commit of repository torbrowser: 934664b8bd4b7d2ae33ee5d43459c77f3535923c

sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
ccache version 4.9.1 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.9.19_p3::gentoo, 3.11.9_p2::gentoo, 3.12.3-r1::gentoo
dev-lang/rust:             1.79.0::gentoo
dev-util/ccache:           4.9.1-r1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          255.7-r1::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo
sys-devel/llvm:            18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes

fortunelay
    location: /var/db/repos/fortunelay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/fortunelay.git
    masters: gentoo
    volatile: False

gentoo-zh
    location: /var/db/repos/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

jmbreuer
    location: /var/db/repos/jmbreuer
    sync-type: svn
    sync-uri: https://jb-fo.strangled.net/svn/portage/trunk/
    masters: gentoo
    volatile: False

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://codeberg.org/librewolf/gentoo.git
    masters: gentoo
    volatile: False

pkalin
    location: /var/db/repos/pkalin
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pkalin.git
    masters: gentoo
    volatile: False

seden
    location: /var/db/repos/seden
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/seden.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

stefantalpalaru
    location: /var/db/repos/stefantalpalaru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/stefantalpalaru.git
    masters: gentoo guru
    volatile: False

tlp
    location: /var/db/repos/tlp
    sync-type: git
    sync-uri: https://github.com/dywisor/tlp-portage
    masters: gentoo
    volatile: False

torbrowser
    location: /var/db/repos/torbrowser
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/torbrowser.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -mabm --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=6144 -O2 -pipe -momit-leaf-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=skylake -mabm --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=6144 -O2 -pipe -momit-leaf-frame-pointer"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --jobs=12 --load-average=6"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirror.init7.net/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en de"
MAKEOPTS="-j9 -l6"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="zstd"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/zsh"
USE="X Xaw3d a52 aac acl acpi activities alsa amd64 apache2 bluetooth bluray branding bzip2 cairo cdda cdr cet cjk crypt css cups curl cvs dbus declarative dga dri dts dv dvd dvdr emacs encode epub exif fame fastcgi ffmpeg flac flash fontconfig foomaticdb fuse gcj gd gdbm gif glitz glut gphoto2 gpm gtk gui ibus iconv icu imap imlib innodb ipv6 jack java jce joystick jpeg kde kerberos kf6compat kpathsea kwallet lame lcms leim libass libgda libnotify libsamplerate libtirpc lm-sensors lz4 lzo mad man matroska mbox mjpeg mng modplug mono motif mozilla mp3 mp4 mpeg mplayer mtp mule multilib ncurses network network-cron networkmanager nls nsplugin ntfs offensive ogg openal opencl openexr opengl openmp opus pam pango pcap pcmcia pcre pda pdf pipewire plasma plotutils png policykit postscript ppds pulseaudio qml qt5 qt6 readline real rtsp samba scanner screencast sdl seccomp semantic-desktop sensord slang slp smartcard sound spell spice sqlite ssl startup-notification stream subversion svg systemd test-rust theora threads tiff tk truetype trusted udev udisks unicode unwind upower usb v4l v4l2 vaapi vdpau vhosts vim-syntax vlm vorbis vpx vulkan wayland webdav webp widgets wifi wmf wxwidgets x264 xanim xattr xcb xcomposite xft xinerama xml xscreensaver xv xvid xvmc zeroconf zlib zsh-completion zstd" ABI_X86="64 32" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput synaptics void" KERNEL="linux" L10N="en de" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" SANE_BACKENDS="net" VIDEO_CARDS="iris crocus intel i965 nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-02 09:33:28 UTC
Please share emerge -pvO dev-java/openjdk:8 output.
Comment 2 Joe Breuer 2024-09-03 07:29:46 UTC
(In reply to Sam James from comment #1)
> Please share emerge -pvO dev-java/openjdk:8 output.

# emerge -pvO dev-java/openjdk:8

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

[ebuild   R    ] dev-java/openjdk-8.422_p05:8::gentoo  USE="alsa cups jbootstrap (system-bootstrap) (-big-endian) -debug -doc -examples -headless-awt (-javafx) (-selinux) -source" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-03 07:30:35 UTC
(In reply to Joe Breuer from comment #2)
> (In reply to Sam James from comment #1)
> > Please share emerge -pvO dev-java/openjdk:8 output.
> 
> # emerge -pvO dev-java/openjdk:8
> 
> These are the packages that would be merged, in order:
> 
> [ebuild   R    ] dev-java/openjdk-8.422_p05:8::gentoo  USE="alsa cups
> jbootstrap (system-bootstrap) (-big-endian) -debug -doc -examples
> -headless-awt (-javafx) (-selinux) -source" 0 KiB
> 
> Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Interesting. Is this from when you're seeing the same emerge -p -uvDU @world about to pull in openjdk-bin? What happens if you mask openjdk-bin?
Comment 4 Joe Breuer 2024-09-03 07:41:00 UTC
(In reply to Sam James from comment #3)
> (In reply to Joe Breuer from comment #2)
> > (In reply to Sam James from comment #1)
> > > Please share emerge -pvO dev-java/openjdk:8 output.
> > 
> > # emerge -pvO dev-java/openjdk:8
> > 
> > These are the packages that would be merged, in order:
> > 
> > [ebuild   R    ] dev-java/openjdk-8.422_p05:8::gentoo  USE="alsa cups
> > jbootstrap (system-bootstrap) (-big-endian) -debug -doc -examples
> > -headless-awt (-javafx) (-selinux) -source" 0 KiB
> > 
> > Total: 1 package (1 reinstall), Size of downloads: 0 KiB
> 
> Interesting. Is this from when you're seeing the same emerge -p -uvDU @world
> about to pull in openjdk-bin?

Yes, exactly, I had just reconfirmed that again:

# emerge -bDNpuvt @world
                                                                                                                        
These are the packages that would be merged, in reverse order:
                                                            
Calculating dependencies... done!                                                                                       
Dependency resolution took 63.56 s (backtrack: 0/20).
                                                                                                                        
[nomerge       ] app-emulation/virtualbox-7.0.18-r1:0/7.0::gentoo  USE="alsa dbus gui java nls opengl pam pulseaudio sdk
 sdl udev vmmraw -debug -doc -dtrace -lvm (-pch) -python -vboxwebsrv -vde -vnc" PYTHON_SINGLE_TARGET="-python3_10 -pytho
n3_11"                                                      
[nomerge       ]  virtual/jdk-1.8.0-r9:1.8::gentoo  USE="-headless-awt"              
[ebuild  NS    ]   dev-java/openjdk-bin-8.422_p05:8::gentoo [17.0.12_p7:17::gentoo] USE="alsa cups -examples% -headless-
awt (-selinux) -source" 0 KiB
                              
Total: 1 package (1 in new slot), Size of downloads: 0 KiB

> What happens if you mask openjdk-bin?

It's 'silently' gone then:

# emerge -bDNpuvt @world

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

Calculating dependencies... done!
Dependency resolution took 64.93 s (backtrack: 0/20).


Total: 0 packages, Size of downloads: 0 KiB


If I run into any emerge output that has to do with that mask, I'll (try to) remember to add it here.