Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922147 - dev-java/openjdk-21.0.1_p12: ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ21WB_HandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
Summary: dev-java/openjdk-21.0.1_p12: ld.lld: error: version script assignment of 'SUN...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-15 02:57 UTC by nvinson234
Modified: 2024-10-23 08:05 UTC (History)
7 users (show)

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


Attachments
build.log.xz (build.log.xz,247.51 KB, application/x-xz)
2024-01-15 03:00 UTC, nvinson234
Details
openjdk-17.0.10_p7-fix-lld-symbols.patch (file_922147.txt,458 bytes, patch)
2024-03-17 10:35 UTC, Chris Pritchard
Details | Diff
openjdk-21.0.2_p13-fix-lld-symbols.patch (file_922147.txt,504 bytes, patch)
2024-03-17 10:36 UTC, Chris Pritchard
Details | Diff
openjdk-21.0.2_p13 build.log after patch (openjdk-21.0.2_p13-build.log.xz,260.91 KB, application/x-xz)
2024-03-17 10:37 UTC, Chris Pritchard
Details
openjdk-17.0.10_p7 build.log after patch (openjdk-17.0.10_p7-build.log.xz,267.29 KB, application/x-xz)
2024-03-17 10:38 UTC, Chris Pritchard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nvinson234 2024-01-15 02:57:31 UTC
With ld.lld-17 openjdk-21.0.1_p12 fails to compile and reports the following errors:

d.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ21WB_HandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ24WB_HandshakeReadMonitorsE19ReadMonitorsClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ26WB_AsyncHandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZL20reinitialize_itablesvE18ReinitTableClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN12JvmtiEnvBase27check_for_periodic_clean_upEvE28ThreadInsideIterationClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN14ClassLoaderExt20process_module_tableEP10JavaThreadP16ModuleEntryTableE19ModulePathsGatherer' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN15ClassLoaderData19demote_strong_rootsEvE25TransitionRootsOopClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN15G1RemSetSummary6updateEvE11CollectData' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16DefNewGeneration26remove_forwarding_pointersEvE22ResetForwardedMarkWord' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet22set_active_all_threadsEbbE22SetThreadActiveClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet23abandon_partial_markingEvE25AbandonThreadQueueClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16java_lang_Thread21async_get_stack_traceEP7oopDescP10JavaThreadE20GetStackTraceClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN17BarrierSetNMethod21nmethod_entry_barrierEP7nmethodE19OopKeepAliveClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN18G1ConcurrentRefine30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet22abandon_logs_and_statsEvE23AbandonThreadLogClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN7Threads25change_thread_claim_tokenEvE11ResetClaims' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN7ZVerify24threads_start_processingEvE22StartProcessingClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN9G1CardSet14num_containersEvE21GetNumberOfContainers' failed: symbol not defined
clang++: error: linker command failed with exit code 1 (use -v to see invocation)


Reproducible: Always




$ emerge --info
Portage 3.0.61 (python 3.11.7-final-0, default/linux/amd64/17.1/desktop, gcc-13, glibc-2.38-r9, 6.6.7-gentoo x86_64)
=================================================================
System uname: Linux-6.6.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-4771_CPU_@_3.50GHz-with-glibc2.38
KiB Mem:    32553208 total,   9332976 free
KiB Swap:    2097148 total,   2097136 free
Timestamp of repository gentoo: Sun, 14 Jan 2024 12:50:14 +0000
Head commit of repository gentoo: b63240cf918ffc3446732d047084ba9708895cd5

Timestamp of repository brother-overlay: Tue, 26 Dec 2023 14:18:05 +0000
Head commit of repository brother-overlay: 18efecd707fd1ed6ced4695c65294c5c945c78c6

Head commit of repository magpie: 7d57bd84154ca78f70bddfbc552adaa3e0bb90e6

sh bash 5.2_p21-r2
ld GNU ld (Gentoo 2.41 p4) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p21-r2::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:             1.74.1::gentoo
dev-util/cmake:            3.28.1-r1::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.52.1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r4::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20231216::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r2::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r9::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: true

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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-march=native -O3 -pipe -flto=thin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXX="clang++"
CXXFLAGS="-march=native -O3 -pipe -flto=thin"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build"
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="-march=native -O3 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync 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="-march=native -O3 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j8"
NM="llvm-nm"
PKGDIR="/var/cache/binpkgs"
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"
RANLIB="llvm-ranlib"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi alsa amd64 branding bzip2 cairo cdda cdr clang cleartype cli corefonts crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif glamor gpm gtk gui iconv icu ipv6 jpeg lcms libnotify libtirpc lto mad mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust theora tiff truetype udev udisks unicode upower usb vaapi vorbis vpx vulkan wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" 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="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US en" 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-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 nvinson234 2024-01-15 03:00:46 UTC
Created attachment 882304 [details]
build.log.xz
Comment 2 nvinson234 2024-01-15 03:01:38 UTC
upstream PR: https://github.com/openjdk/jdk21u-dev/pull/166
Comment 3 Chris Pritchard 2024-03-17 10:31:49 UTC
The upstream patch gets through that error, but now I've got a new error when trying to build (clang/libcxx-18). Additionally, a slight tweak to the upstream patch is needed to build openjdk-17.

https://paste.gentoo.zip/ok7oOREq - build.log for openjdk-21.0.2_p13
https://paste.gentoo.zip/hfRwPiWX - build.log for openjdk-17.0.10_p7
https://paste.gentoo.zip/nXBJACiY - openjdk-21.0.2_p13 patch
https://paste.gentoo.zip/1N14U7fz - openjdk-17.0.10_p7 patch (also needs building with -Wl,--undefined-version in LDFLAGS)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-17 10:33:55 UTC
(In reply to Chris Pritchard from comment #3)

Please always use attachments, compressed if necessary. Pastebins expire or may not be accessible behind firewalls.
Comment 5 Chris Pritchard 2024-03-17 10:35:38 UTC
Created attachment 887834 [details, diff]
openjdk-17.0.10_p7-fix-lld-symbols.patch
Comment 6 Chris Pritchard 2024-03-17 10:36:14 UTC
Created attachment 887835 [details, diff]
openjdk-21.0.2_p13-fix-lld-symbols.patch
Comment 7 Chris Pritchard 2024-03-17 10:37:56 UTC
Created attachment 887836 [details]
openjdk-21.0.2_p13 build.log after patch
Comment 8 Chris Pritchard 2024-03-17 10:38:30 UTC
Created attachment 887837 [details]
openjdk-17.0.10_p7 build.log after patch
Comment 9 Gino McCarty 2024-04-09 16:58:42 UTC
Looks very similar to my issue I'm on llvm-17

https://bugs.gentoo.org/show_bug.cgi?id=928656