Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 786699 - sys-libs/db: Please update to min java 1.8:*
Summary: sys-libs/db: Please update to min java 1.8:*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL: https://archives.gentoo.org/gentoo-de...
Whiteboard:
Keywords:
Depends on:
Blocks: jdk11
  Show dependency tree
 
Reported: 2021-04-29 07:56 UTC by Volkmar W. Pogatzki
Modified: 2021-04-30 10:57 UTC (History)
6 users (show)

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


Attachments
build log with IllegalArgumentException (sys-libs:db-5.3.28-r7:20210429-162515.log,329.59 KB, text/plain)
2021-04-29 16:33 UTC, Daniel Nilsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volkmar W. Pogatzki 2021-04-29 07:56:23 UTC
All presently available versions of sys-libs/db use deprecated java versions.

git --no-pager grep -E "virtual/(jre|jdk)" | sort
db-18.1.32.ebuild:      java? ( >=virtual/jdk-1.5 )
db-18.1.32.ebuild:      java? ( >=virtual/jre-1.5 )"
db-18.1.40.ebuild:      java? ( >=virtual/jdk-1.5 )
db-18.1.40.ebuild:      java? ( >=virtual/jre-1.5 )"
db-4.2.52_p5-r3.ebuild: java? ( >=virtual/jdk-1.4 )"
db-4.2.52_p5-r3.ebuild: java? ( >=virtual/jre-1.4 )"
db-4.3.29_p1-r3.ebuild: java? ( >=virtual/jdk-1.4 )"
db-4.3.29_p1-r3.ebuild: java? ( >=virtual/jre-1.4 )"
db-4.4.20_p4-r3.ebuild: java? ( >=virtual/jdk-1.4 )"
db-4.4.20_p4-r3.ebuild: java? ( >=virtual/jre-1.4 )"
db-4.5.20_p2-r3.ebuild: java? ( >=virtual/jdk-1.4 )"
db-4.5.20_p2-r3.ebuild: java? ( >=virtual/jre-1.4 )"
db-4.5.20_p2-r4.ebuild: java? ( >=virtual/jdk-1.4 )"
db-4.5.20_p2-r4.ebuild: java? ( >=virtual/jre-1.4 )"
db-4.6.21_p4-r2.ebuild: java? ( >=virtual/jdk-1.4 )"
db-4.6.21_p4-r2.ebuild: java? ( >=virtual/jre-1.4 )"
db-4.6.21_p4-r3.ebuild: java? ( >=virtual/jdk-1.4 )"
db-4.6.21_p4-r3.ebuild: java? ( >=virtual/jre-1.4 )"
db-4.7.25_p4-r2.ebuild: java? ( >=virtual/jdk-1.5 )"
db-4.7.25_p4-r2.ebuild: java? ( >=virtual/jre-1.5 )"
db-4.7.25_p4-r3.ebuild: java? ( >=virtual/jdk-1.5 )"
db-4.7.25_p4-r3.ebuild: java? ( >=virtual/jre-1.5 )"
db-4.8.30-r3.ebuild:    java? ( >=virtual/jdk-1.5 )"
db-4.8.30-r3.ebuild:    java? ( >=virtual/jre-1.5 )"
db-4.8.30-r4.ebuild:    java? ( >=virtual/jdk-1.5 )"
db-4.8.30-r4.ebuild:    java? ( >=virtual/jre-1.5 )"
db-5.1.29-r2.ebuild:    java? ( >=virtual/jdk-1.5 )"
db-5.1.29-r2.ebuild:    java? ( >=virtual/jre-1.5 )"
db-5.3.28-r2.ebuild:    java? ( >=virtual/jdk-1.5 )
db-5.3.28-r2.ebuild:    java? ( >=virtual/jre-1.5 )"
db-5.3.28-r4.ebuild:    java? ( >=virtual/jdk-1.5 )"
db-5.3.28-r4.ebuild:    java? ( >=virtual/jre-1.5 )"
db-5.3.28-r5.ebuild:    java? ( >=virtual/jdk-1.5 )"
db-5.3.28-r5.ebuild:    java? ( >=virtual/jre-1.5 )"
db-6.0.35-r2.ebuild:    java? ( >=virtual/jdk-1.5 )"
db-6.0.35-r2.ebuild:    java? ( >=virtual/jre-1.5 )"
db-6.0.35-r3.ebuild:    java? ( >=virtual/jdk-1.5 )"
db-6.0.35-r3.ebuild:    java? ( >=virtual/jre-1.5 )"
db-6.1.38.ebuild:       java? ( >=virtual/jdk-1.5 )
db-6.1.38.ebuild:       java? ( >=virtual/jre-1.5 )"
db-6.2.38.ebuild:       java? ( >=virtual/jdk-1.5 )
db-6.2.38.ebuild:       java? ( >=virtual/jre-1.5 )"


Please update to supporting java 1.8 and newer:
>=virtual/jdk-1.8:*
>=virtual/jre-1.8:*
Comment 1 Larry the Git Cow gentoo-dev 2021-04-29 08:12:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c53fdc2cec122f33799fdc6f246800b9e9a0c09e

commit c53fdc2cec122f33799fdc6f246800b9e9a0c09e
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-04-29 08:11:35 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-04-29 08:12:24 +0000

    sys-libs/db: Adjusted java deps
    
    Closes: https://bugs.gentoo.org/786699
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 sys-libs/db/db-18.1.32.ebuild      | 4 ++--
 sys-libs/db/db-18.1.40.ebuild      | 4 ++--
 sys-libs/db/db-4.2.52_p5-r3.ebuild | 4 ++--
 sys-libs/db/db-4.3.29_p1-r3.ebuild | 4 ++--
 sys-libs/db/db-4.4.20_p4-r3.ebuild | 4 ++--
 sys-libs/db/db-4.5.20_p2-r3.ebuild | 4 ++--
 sys-libs/db/db-4.5.20_p2-r4.ebuild | 4 ++--
 sys-libs/db/db-4.6.21_p4-r2.ebuild | 4 ++--
 sys-libs/db/db-4.6.21_p4-r3.ebuild | 4 ++--
 sys-libs/db/db-4.7.25_p4-r2.ebuild | 4 ++--
 sys-libs/db/db-4.7.25_p4-r3.ebuild | 4 ++--
 sys-libs/db/db-4.8.30-r3.ebuild    | 4 ++--
 sys-libs/db/db-4.8.30-r4.ebuild    | 4 ++--
 sys-libs/db/db-5.1.29-r2.ebuild    | 4 ++--
 sys-libs/db/db-5.3.28-r2.ebuild    | 4 ++--
 sys-libs/db/db-5.3.28-r4.ebuild    | 4 ++--
 sys-libs/db/db-5.3.28-r5.ebuild    | 4 ++--
 sys-libs/db/db-6.0.35-r3.ebuild    | 4 ++--
 sys-libs/db/db-6.1.38.ebuild       | 4 ++--
 sys-libs/db/db-6.2.38.ebuild       | 4 ++--
 20 files changed, 40 insertions(+), 40 deletions(-)
Comment 2 Miroslav Šulc gentoo-dev 2021-04-29 08:26:07 UTC
thanks. though if fixed this way, if the jar file is already installed, its bytecode won't be converted to java 1.8 and so the jar file will not work with java 11. for new installs this will work fine. the recommended way is a revbump so that the jar file bytecode is updated to 1.8.
Comment 3 Larry the Git Cow gentoo-dev 2021-04-29 08:49:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dc58f45f305e1faf2c9bcc1ac5207f08fe98e67

commit 1dc58f45f305e1faf2c9bcc1ac5207f08fe98e67
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-04-29 08:48:53 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-04-29 08:49:25 +0000

    sys-libs/db: Revbumps for adjusted java deps
    
    Bug: https://bugs.gentoo.org/786699
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 sys-libs/db/{db-1.85-r4.ebuild => db-1.85-r5.ebuild}           | 0
 sys-libs/db/{db-18.1.32.ebuild => db-18.1.32-r1.ebuild}        | 0
 sys-libs/db/{db-18.1.40.ebuild => db-18.1.40-r1.ebuild}        | 0
 sys-libs/db/{db-3.2.9_p2-r1.ebuild => db-3.2.9_p2-r2.ebuild}   | 0
 sys-libs/db/{db-4.2.52_p5-r3.ebuild => db-4.2.52_p5-r4.ebuild} | 0
 sys-libs/db/{db-4.3.29_p1-r3.ebuild => db-4.3.29_p1-r4.ebuild} | 0
 sys-libs/db/{db-4.4.20_p4-r3.ebuild => db-4.4.20_p4-r4.ebuild} | 0
 sys-libs/db/{db-4.5.20_p2-r3.ebuild => db-4.5.20_p2-r5.ebuild} | 0
 sys-libs/db/{db-4.5.20_p2-r4.ebuild => db-4.5.20_p2-r6.ebuild} | 0
 sys-libs/db/{db-4.6.21_p4-r2.ebuild => db-4.6.21_p4-r4.ebuild} | 0
 sys-libs/db/{db-4.6.21_p4-r3.ebuild => db-4.6.21_p4-r5.ebuild} | 0
 sys-libs/db/{db-4.7.25_p4-r2.ebuild => db-4.7.25_p4-r4.ebuild} | 0
 sys-libs/db/{db-4.7.25_p4-r3.ebuild => db-4.7.25_p4-r5.ebuild} | 0
 sys-libs/db/{db-4.8.30-r3.ebuild => db-4.8.30-r5.ebuild}       | 0
 sys-libs/db/{db-4.8.30-r4.ebuild => db-4.8.30-r6.ebuild}       | 0
 sys-libs/db/{db-5.1.29-r2.ebuild => db-5.1.29-r3.ebuild}       | 0
 sys-libs/db/{db-5.3.28-r2.ebuild => db-5.3.28-r6.ebuild}       | 0
 sys-libs/db/{db-5.3.28-r4.ebuild => db-5.3.28-r7.ebuild}       | 0
 sys-libs/db/{db-5.3.28-r5.ebuild => db-5.3.28-r8.ebuild}       | 0
 sys-libs/db/{db-6.0.35-r3.ebuild => db-6.0.35-r4.ebuild}       | 0
 sys-libs/db/{db-6.1.38.ebuild => db-6.1.38-r1.ebuild}          | 0
 sys-libs/db/{db-6.2.38.ebuild => db-6.2.38-r1.ebuild}          | 0
 22 files changed, 0 insertions(+), 0 deletions(-)
Comment 4 Mike Gilbert gentoo-dev 2021-04-29 16:00:11 UTC
From bug 736870 comment 14:

To complete the abovo comment: does not compile with current icedtea-bin. Tested on 2 systems, same result.

Relevant emerge output:

##### cut ########

env CLASSPATH="./classes" /opt/icedtea-bin-3.16.0/bin/java -classpath ./classes \
    com.sleepycat.persist.model.ClassEnhancer ./classes
java.lang.IllegalArgumentException
        at com.sleepycat.asm.ClassReader.<init>(ClassReader.java:167)
        at com.sleepycat.asm.ClassReader.<init>(ClassReader.java:153)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceBytes(ClassEnhancer.java:297)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:246)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.main(ClassEnhancer.java:108)
Exception in thread "main" java.lang.IllegalArgumentException
        at com.sleepycat.asm.ClassReader.<init>(ClassReader.java:167)
        at com.sleepycat.asm.ClassReader.<init>(ClassReader.java:153)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceBytes(ClassEnhancer.java:297)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:246)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.enhanceFile(ClassEnhancer.java:242)
        at com.sleepycat.persist.model.ClassEnhancer.main(ClassEnhancer.java:108)
make: *** [Makefile:975: db-5.3.jar] Error 1
 * ERROR: sys-libs/db-5.3.28-r7::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/db-5.3.28-r7::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/db-5.3.28-r7::gentoo'`.
 * The complete build log is located at '/var/log/portage/sys-libs:db-5.3.28-r7:20210429-153512.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/db-5.3.28-r7/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/db-5.3.28-r7/work/db-5.3.28/build_unix-abi_x86_64.amd64'
 * S: '/var/tmp/portage/sys-libs/db-5.3.28-r7/work/db-5.3.28/build_unix'
!!! When you file a bug report, please include the following information:
GENTOO_VM=icedtea-bin-8  CLASSPATH="" JAVA_HOME="/opt/icedtea-bin-3.16.0"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""
and of course, the output of emerge --info =db-5.3.28
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-29 16:06:16 UTC
Of course, we could do with the full build.log.
Comment 6 Daniel Nilsson 2021-04-29 16:33:07 UTC
Created attachment 704013 [details]
build log with IllegalArgumentException

I get the same IllegalArgementException when building sys-libs/db-5.3.28-r7
Build log attached.


Portage 3.0.18 (python 3.8.8-final-0, default/linux/amd64/17.1/desktop, gcc-10.2.0, glibc-2.32-r7, 5.10.27-gentoo x86_64)
=================================================================
System uname: Linux-5.10.27-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-glibc2.2.5
KiB Mem:    32878024 total,  29088620 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Thu, 29 Apr 2021 15:15:01 +0000
Head commit of repository gentoo: 6ecb605bc2c001df9eb8e8be6800e4f35e7bf1da
sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.8.8_p1::gentoo
dev-lang/rust:            1.51.0-r2::gentoo
dev-util/cmake:           3.18.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.21::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.2-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

localrepo
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=16 --load-average=16"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox 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="https://mirror.leaseweb.com/gentoo/ https://mirrors.soeasyto.com/distfiles.gentoo.org/ https://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en sv"
MAKEOPTS="-j16 -l16"
PKGDIR="/usr/portage/packages"
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"
USE="X a52 aac acpi alsa amd64 berkdb branding bzip2 cairo cdr cli crypt cups dbus dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif gtk gtk3 gui iconv icu java jpeg lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg openexr opengl openmp pam pango pcre pdf png policykit ppds readline sdl seccomp smp spell split-usr sqlite ssl startup-notification svg tiff truetype udev unicode upower usb vaapi vim-syntax vorbis wxwidgets x264 xattr xcb xml xrandr xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en sv" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 7 Daniel Nilsson 2021-04-29 16:44:12 UTC
Forgot to add this:
GENTOO_VM=openjdk-8  CLASSPATH="" JAVA_HOME="/usr/lib64/openjdk-8"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""

I have dev-java/openjdk-8.272_p10 installed, will update to dev-java/openjdk-8.292_p10 and see if it makes any difference.
Comment 8 Daniel Nilsson 2021-04-29 17:03:10 UTC
Same issue with the newer openjdk version.
Comment 9 Miroslav Šulc gentoo-dev 2021-04-29 17:20:22 UTC
seems i found the cause. in the ClassReader constructor there is this condition:

        if (readShort(6) > Opcodes.V1_7) {
            throw new IllegalArgumentException();
        }

which imo checks java version (in fact not java itself but source/target - that is bytecode, simply said) and if it is greater than 1.7, it throws that exception.

the fix is this:

diff --git a/sys-libs/db/db-5.3.28-r7.ebuild b/sys-libs/db/db-5.3.28-r7.ebuild
index 9143d24498e1..1366e5fd9c47 100644
--- a/sys-libs/db/db-5.3.28-r7.ebuild
+++ b/sys-libs/db/db-5.3.28-r7.ebuild
@@ -37,9 +37,9 @@ REQUIRED_USE="test? ( tcl )"
 # the entire testsuite needs the TCL functionality
 DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
        test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
-       java? ( >=virtual/jdk-1.8 )"
+       java? ( >=virtual/jdk-1.7:* )"
 RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
-       java? ( >=virtual/jre-1.8 )"
+       java? ( >=virtual/jre-1.7:* )"
 
 MULTILIB_WRAPPED_HEADERS=(
        /usr/include/db${SLOT}/db.h


with this change that version compiles fine.


i suppose this has to be done on all versions < 6, lower db versions might even require lower jdk/jre version specified, i did not test those. on my system i have sys-libs/db-6.0.35-r4:6.0 and that compiles fine with jdk 1.8 so versions 6+ should be ok with jdk 1.8.
Comment 10 Mike Gilbert gentoo-dev 2021-04-29 17:25:49 UTC
(In reply to Miroslav Šulc from comment #9)

I just tested most of the older versions, and only db-5.3 seems to fail with java 1.8.
Comment 11 Larry the Git Cow gentoo-dev 2021-04-29 17:26:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb973e046fd1d76d4b9918d6177d4b0a03f80d5c

commit bb973e046fd1d76d4b9918d6177d4b0a03f80d5c
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2021-04-29 17:23:25 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2021-04-29 17:26:13 +0000

    sys-libs/db: downgrade 5.3 to java 1.7
    
    Bug: https://bugs.gentoo.org/786699
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-libs/db/db-5.3.28-r6.ebuild | 4 ++--
 sys-libs/db/db-5.3.28-r7.ebuild | 4 ++--
 sys-libs/db/db-5.3.28-r8.ebuild | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
Comment 12 Miroslav Šulc gentoo-dev 2021-04-29 17:28:32 UTC
just a note. it would be more correct to specify virtual/jdk:1.7 but that does not pass repoman/pkgcheck. but the patch i posted before should do the trick and make things work.

there is also an option to change the condition in ClassReader to this (version 1.8):

if (readShort(6) > Opcodes.V1_8) {

but that would need testing whether things are not broken. they might have the test there for a reason...
Comment 13 Miroslav Šulc gentoo-dev 2021-04-29 17:29:31 UTC
(In reply to Mike Gilbert from comment #10)
> (In reply to Miroslav Šulc from comment #9)
> 
> I just tested most of the older versions, and only db-5.3 seems to fail with
> java 1.8.

that's really interesting :-) thanks for doing the testing :-)
Comment 14 Mike Gilbert gentoo-dev 2021-04-29 17:37:25 UTC
(In reply to Miroslav Šulc from comment #12)
> it would be more correct to specify virtual/jdk:1.7 but that
> does not pass repoman/pkgcheck.

There is no version of virtual/jdk that has SLOT="1.7", so of course such a dependency would fail.

I'm sure you have heard this before, but parsing DEPEND in the eclass to alter build time behavior is really weird.

I think the java eclasses should be using a separate variable to specify the java source version instead of inferring it from DEPEND.
Comment 15 Daniel Nilsson 2021-04-29 18:19:21 UTC
I can confirm that this fixes the issue for me.
Thank you for the quick fix!
Comment 16 João P. Teixeira 2021-04-30 08:05:46 UTC
(In reply to Sam James from comment #5)
> Of course, we could do with the full build.log.

Note taken.
Comment 17 João P. Teixeira 2021-04-30 08:30:35 UTC
Thanks for the fix.
Comment 18 Adrian Bassett 2021-04-30 09:28:34 UTC
(In reply to Miroslav Šulc from comment #9)
> seems i found the cause. in the ClassReader constructor there is this
> condition:
> 
>         if (readShort(6) > Opcodes.V1_7) {
>             throw new IllegalArgumentException();
>         }
> 
> which imo checks java version (in fact not java itself but source/target -
> that is bytecode, simply said) and if it is greater than 1.7, it throws that
> exception.
> 
> the fix is this:
> 
> diff --git a/sys-libs/db/db-5.3.28-r7.ebuild
> b/sys-libs/db/db-5.3.28-r7.ebuild
> index 9143d24498e1..1366e5fd9c47 100644
> --- a/sys-libs/db/db-5.3.28-r7.ebuild
> +++ b/sys-libs/db/db-5.3.28-r7.ebuild
> @@ -37,9 +37,9 @@ REQUIRED_USE="test? ( tcl )"
>  # the entire testsuite needs the TCL functionality
>  DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
>         test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
> -       java? ( >=virtual/jdk-1.8 )"
> +       java? ( >=virtual/jdk-1.7:* )"
>  RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
> -       java? ( >=virtual/jre-1.8 )"
> +       java? ( >=virtual/jre-1.7:* )"
>  
>  MULTILIB_WRAPPED_HEADERS=(
>         /usr/include/db${SLOT}/db.h
> 
> 
> with this change that version compiles fine.
> 
> 
> i suppose this has to be done on all versions < 6, lower db versions might
> even require lower jdk/jre version specified, i did not test those. on my
> system i have sys-libs/db-6.0.35-r4:6.0 and that compiles fine with jdk 1.8
> so versions 6+ should be ok with jdk 1.8.

I found db-6.0.35-r4 also wouldn't emerge without the above fix (same diagnostics as in comment#4), so my experience is different to that described in the comment above.

GENTOO_VM=openjdk-bin-8  CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-8.292_p10"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER=""

[ebuild   R    ] sys-libs/db-6.0.35-r4:6.0::gentoo  USE="cxx java tcl -doc -examples -test" ABI_X86="(64) -32 (-x32)" 0 KiB
Comment 19 Miroslav Šulc gentoo-dev 2021-04-30 09:38:15 UTC
rechecking, maybe i forgot to check the java use flag...
Comment 20 Miroslav Šulc gentoo-dev 2021-04-30 09:48:39 UTC
yes, it failed. just verifying the fix is correct and will commit it.
Comment 21 Adrian Bassett 2021-04-30 10:08:45 UTC
(In reply to Miroslav Šulc from comment #20)
> yes, it failed. just verifying the fix is correct and will commit it.

Thanks!
Comment 22 Larry the Git Cow gentoo-dev 2021-04-30 10:53:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8e03934426bd753b01fc53d0b726640d7400299

commit a8e03934426bd753b01fc53d0b726640d7400299
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2021-04-30 10:50:52 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2021-04-30 10:53:06 +0000

    sys-libs/db: fixed min java in 6.0.35-r4
    
    Bug: https://bugs.gentoo.org/786699
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 sys-libs/db/db-6.0.35-r4.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)