Trying to build 5.17.0 with enabled docs fails, dev-java/jna-5.16.0[doc] works. dev-java/jna-5.17.0[-doc] also works. * JAVADOC_SRC_DIRS exists, you need to call ejavadoc separately src/com.sun.jna/versions/9/module-info.java:1: error: too many module declarations found module com.sun.jna { ^ contrib/platform/src/com.sun.jna.platform/versions/9/module-info.java:4: error: module not found: com.sun.jna requires transitive com.sun.jna; ^ 2 errors * ERROR: dev-java/jna-5.17.0::gentoo failed (compile phase): * ejavadoc failed * * Call stack: * ebuild.sh, line 136: Called src_compile * environment, line 2334: Called ejavadoc * environment, line 464: Called die * The specific snippet of code: * javadoc "${javadoc_args}" -d target/api -cp "${classpath}" -quiet @sources || die "ejavadoc failed"; emerge --info jna: Portage 3.0.68 (python 3.13.3-final-0, default/linux/amd64/23.0/desktop/plasma, gcc-14, glibc-2.41-r1, 6.15.0-rc2 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.15.0-rc2-x86_64-AMD_Ryzen_7_1700X_Eight-Core_Processor-with-glibc2.41 KiB Mem: 32813552 total, 19293780 free KiB Swap: 15720380 total, 15366964 free Timestamp of repository gentoo: Mon, 21 Apr 2025 17:15:00 +0000 Head commit of repository gentoo: f0a7a0358d6cef5c6514adaa6c1f658e2d4bc8b8 Timestamp of repository guru: Sun, 20 Apr 2025 09:35:12 +0000 Head commit of repository guru: 450f3009286a72260b58299322acae553e5400ae Timestamp of repository x11: Tue, 15 Apr 2025 14:37:34 +0000 Head commit of repository x11: eb50ea1632709f299ea792de86eede3519ee28ce sh bash 5.2_p37 ld GNU ld (Gentoo 2.44 p1) 2.44.0 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.17-r2::gentoo dev-build/cmake: 3.31.7::gentoo dev-build/libtool: 2.5.4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.7.2::gentoo dev-java/java-config: 2.3.4::gentoo dev-lang/perl: 5.40.2::gentoo dev-lang/python: 3.11.12::gentoo, 3.12.10::gentoo, 3.13.3::gentoo, 3.13.3-r100::gentoo dev-lang/rust: 1.81.0-r101::gentoo, 1.86.0-r1::gentoo llvm-core/clang: 18.1.8-r6::gentoo, 19.1.7::gentoo, 20.1.3::gentoo llvm-core/lld: 18.1.8::gentoo, 19.1.7::gentoo llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.7::gentoo, 20.1.3::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/openrc: 0.61::gentoo sys-apps/sandbox: 2.46::gentoo sys-devel/binutils: 2.44::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 13.3.1_p20250301::gentoo, 14.2.1_p20250301::gentoo sys-devel/gcc-config: 2.12.1::gentoo sys-kernel/linux-headers: 6.14::gentoo (virtual/os-headers) sys-libs/glibc: 2.41-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-max-age: 3 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False local location: /var/ebuilds masters: gentoo priority: 0 volatile: True x11 location: /var/db/repos/x11 sync-type: git sync-uri: https://github.com/gentoo-mirror/x11.git masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-pipe -march=znver1 -O3 -fomit-frame-pointer -fivopts -fweb -frename-registers -ftracer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind" 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.4/ext-active/ /etc/php/cgi-php8.4/ext-active/ /etc/php/cli-php8.4/ext-active/ /etc/php/fpm-php8.4/ext-active/ /etc/php/phpdbg-php8.4/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="-pipe -march=znver1 -O3 -fomit-frame-pointer -fivopts -fweb -frename-registers -ftracer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --jobs=6 --load-average=24 --keep-going" 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 export-pms-vars 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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_GB.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="de en" MAKEOPTS="-j16 -l24" PKGDIR="/var/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" SHELL="/bin/bash" USE="7zip R S3TC X a52 aac aalib ace acl acpi activities ads aften aio alisp alsa altenburgcards amarok amd64 amr amrnb amrr amrwb animgif ao apache2 aqua_theme archive async audacious audiofile aura autoipd avahi bcel bcp bdf beagle bidi bigpatch binfilter bittorrent bl blas blender-game bluetooth bonusscripts boost branding bzip2 c++ cairo calendar caps carbone_theme cblas-external cdda cdio cdparanoia cdr cet cgi chm chroot cifsupcall cisco clang client clucene cmdctrl cmdsubmenu colord compress connectionstatus consolekit contactnotes context contrib corefonts cpio cpufreq crypt cryptsetup cscope css ctype cups curl cutterlimit cutterqueue cuttime cvs cvsgraph cxx cycles dar64 dbase dbm dbus dbx dc1394 dec_av dec_av2 declarative demo designer device-mapper divx djvu dlz dmi dmx dnotify doc domainkeys dot double-precision dpmod drafts dri dts dv dvb dvbplayer dvd dvdarchive dvdchapjump dvdr dvdread dvi ecc editor egl elf elogind eme-free emoticon encode enscript equalizer eselect-ldso evdev excel exif exiv2 expat extensions extra extra-algorithms extra-cardsets extraengine extras farstream fat fbcon fdt festival ffmpeg fftw file file-icons flac fluidsynth fmod font-server fontconfig fortran fping fpx frei0r ftp fts3 fuse g3dvl gbm gcj gd gdbm gecko gegl geoip gflags gif gimp git gkrellm glade glamor gles gles1 gles2 glib glibc-omitfp glitz glsa glut gmedia gmp gnutls gopher gpac gpg gpgme gphoto2 gpm graphics graphite graphviz gs gsettings gstreamer gtk gtk3 gui gutenprint gzip haptic harfbuzz hddtemp hdri highlight history html htmlhandbook http http2 httpd hvm hwdb ical iceweasel iconv icq icu id3 id3tag ide idea ieee1394 image imagemagick imap import-filter infowidget inherit-graph inkjar innodb inotify inspector introspection ipfilter ipsec iptc ipv6 irc irrlicht ithreads jabber jack jad jadetex java java-external java6 jce jemalloc jingle jit jni john jpeg jpeg2k juju jumpplay kde kdecards kdenlive kdepim kdrive kexi kf6compat kipi kmid kpathsea ktts kvm kwallet lame lapack latex lcms ldap legacy-systray libcaca libei libkms libmpeg2 libmysqlclient libnotify libproxy libsamplerate libsexy libssh2 libtirpc libvisual libwww liemikuutio lights livebuffer llvm llvm-shared-libs lm_sensors logrotate logviewer loop-playback lto lua lucene lv2 lyx lzma lzo mad magic mail mailwrapper mainmenuhooks maps masquerade math matroska maya-shaderlibrary mbox mbrola md5sum mdev mdnsresponder-compat meanwhile melt menu-plugin menubar menuorg messages metric mhash midi mikmod mime mimencode minizip mixer mjpeg mmap mmx mmxext mng mod modplug mounts-check mozdevelop mozdom mozilla mp2 mp3 mp4 mp4live mpd mpeg mpeg2 mpg123 mpi mplayer mppe-mppc mpu401 mschap msn mtp multilib multiprocess multitarget musepack music mysql mysqli mythtv nagios-dns nagios-ntp nagios-ping nagios-ssh nat native-exceptions ncurses nepomuk net netjack netmeeting network network-cron networkmanager nfs nfsidmap nfsv4 nfsv41 nls nntp normalize nova nsplugin nspr nss ntfs ntfsprogs nuv objc offensive ogg ogg123 ole opcache opencl openexr opengl openimageio openmp openssh openssl openvpn opus osmesa otr pam pango pascal pcap pcre pcre16 pcre32 pda pdf pdfimport pdfium perl php physfs pim pipewire pixmaps pkcs11 plasma player plotutils pmu png policykit portaudio posix postfix postproc postscript povray ppds pptp printsupport pth pulseaudio python qemu qml qt3support qt5 qt6 query-browser quicktime r600-llvm-compiler radio rar raw rc5 rdesktop rdp readline realmedia remix replaygain restrict-javascript rle rocm romio rpc rss rtc rtmp rtsp samba sasl sbig scanner screen screencast script scripttools sdk sdl sdl-image sdl-sound sdl2 sdlaudio seamonkey search seccomp secure-delete semantic-desktop sensord server shared-dricore shorten shout sid signatures simplexml skins smime smp smtp sndfile sockets socks5 solver songs sortrecords sound soundex sounds sox speech speedo speex spell spice sql sqlite sqlite3 srtp sse sse2 sse3 sse4a ssl ssse3 stars startup-notification stats stemmer stlport stream strongswan_plugins_aesni strongswan_plugins_gcm strongswan_plugins_rdrand su submenu subtitles subversion suhosin suid-wrapper svc svg svgz swat sylpheed sysfs syslog system-bootstrap system-cairo system-icu system-jpeg system-jsoncpp system-libvncserver system-libvpx system-sqlite systray sysvipc szip t1lib taglib tagwriting tb4 teletext test-rust tetex tex text texteffect textures tftp tga themes theora thesaurus threads threadsafe tidy tiff timercmd timerinfo tk tls toolbar tools transcode trayicon truetype tta ttxtsubs twolame udev udisks ui unicode unlock-notify upcall upower usb usbredir userfiles utils uudeview uuencode v4l v4l2 vaapi vamp vcd vcdx vdr video videos view vim-syntax virgl visualization vlm vnc vncviewer voice volctrl vorbis vorbis-psy vpx vulkan wav wavpack wayland wayland-compositor web webdav webinterface webkit webm webp widgets wifi winbind winpopup wireshark wma wmf wmp wxwidgets x264 x265 xanim xattr xcb xcf xcomposite xephyr xetex xext xface xforms xfs xft xhtml xine xinerama xkb xml xmp xnest xorg xosd xplanet xpm xrandr xrender xscreensaver xsl xslt xspice xv xvfb xvid xvmc xvnc xwayland yahoo yv12 zeroconf zip zlib zrtp zstd zvbi" ABI_X86="32 64" ADA_TARGET="gcc_14" AMDGPU_TARGETS="gfx803" 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 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" APACHE2_MPMS="worker" 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 navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-GB en-US de de-DE" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="19" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-4" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_13 python3_12" QEMU_SOFTMMU_TARGETS="x86_64 alpha arm i386 m68k mips mips64 mips64el mipsel ppc ppc64 ppcemb s390x sparc sparc64" RUBY_TARGETS="ruby34 ruby33" VIDEO_CARDS="dummy v4l virgl radeon r600 radeonsi amdgpu" 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, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= dev-java/jna-5.16.0::gentoo was built with the following: USE="doc -source -test" ABI_X86="(64)" ELIBC="(glibc)" KERNEL="(linux)" dev-java/jna-5.17.0::gentoo was built with the following: USE="-doc -source -test" ABI_X86="(64)" ELIBC="(glibc)" KERNEL="(linux)" 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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync xattr"
Not yet sure what's the root cause of this error. The same logic, applied to dev-java/byte-buddy-1.17.5 works without problems. As a workaround, we can remove the second mudule-info.java which anyway does not have any documentation tags.
All of this looks kind of weird, but I'm not really seeing the cause. Probably the switch of the java version: 5.16: >=virtual/jdk-1.8:* 5.17: >=virtual/jdk-11:* java-pkg-simple.eclass chooses the active VM from that DEPEND and so 5.17 now uses a newer version of javadoc, which might cause this problem. Just removing one of the module-info.java seems wrong. 1) Both are "broken": src/com.sun.jna/versions/9/module-info.java:1: error: too many module declarations found module com.sun.jna { contrib/platform/src/com.sun.jna.platform/versions/9/module-info.java:4: error: module not found: com.sun.jna requires transitive com.sun.jna; 2) The files where just written, these are not part of the upstream sources: writing to src/com.sun.jna/versions/9/module-info.java javac -source 9 -target 9 -d target/versions/9 -encoding UTF-8 -classpath :com.sun.jna.jar --module-path :com.sun.jna.jar --module-version 5.17.0 --patch-module com.sun.jna=com.sun.jna.jar src/com.sun.jna/versions/9/module-info.java warning: [options] system modules path not set in conjunction with -source 9 1 warning writing to contrib/platform/src/com.sun.jna.platform/versions/9/module-info.java javac -source 9 -target 9 -d target/versions/9 -encoding UTF-8 -classpath target/versions/9:jna.jar:com.sun.jna.platform.jar --module-path target/versions/9:jna.jar:com.sun.jna.platform.jar --module-version 5.17.0 --patch-module com.sun.jna.platform=com.sun.jna.platform.jar contrib/platform/src/com.sun.jna.platform/versions/9/module-info.java warning: [options] system modules path not set in conjunction with -source 9 From java-pkg-simple.eclass: # if target < 9, we need to compile module-info.java separately # as this feature is not supported before Java 9 5.16 with the older VM does not generate any module-info.java at all. 3) the path used for module-info.java looks weird: The normal source files are in src/com/sun/jna and contrib/platform/src/com/sun/jna/platform. But the module-info.java get put into src/com.sun.jna and contrib/platform/src/com.sun.jna.platform. The newer byte-buddy-1.17.5 that uses this construct needs >=virtual/jdk-24:*, that has not been keyworded yet, so I can't easily compare with that. The older 1.15.11 writes a module-info.java directly from the ebuild.
(In reply to Torsten Kaiser from comment #2) > All of this looks kind of weird, but I'm not really seeing the cause. Having proper multi-module support for ejavadoc should solve it. In the past we workedaround with JAVA_JAR_FILENAME="ignoreme.jar"
(In reply to Torsten Kaiser from comment #2) > [...] > 3) the path used for module-info.java looks weird: > The normal source files are in src/com/sun/jna and > contrib/platform/src/com/sun/jna/platform. > But the module-info.java get put into src/com.sun.jna and > contrib/platform/src/com.sun.jna.platform. Fyi, see https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/java-pkg-simple.eclass?id=8643a627c63a350e0260b50769cd557272140d4e