Page MenuHomeFreeBSD

java/openjdk{19,20,21}: fix build with lld 17
ClosedPublic

Authored by michaelo on Jan 26 2024, 5:11 PM.
Tags
None
Referenced Files
F82915273: D43620.diff
Fri, May 3, 10:58 PM
Unknown Object (File)
Sun, Apr 14, 1:47 AM
Unknown Object (File)
Fri, Apr 12, 10:05 AM
Unknown Object (File)
Sun, Apr 7, 7:45 AM
Unknown Object (File)
Apr 1 2024, 2:02 AM
Unknown Object (File)
Apr 1 2024, 2:02 AM
Unknown Object (File)
Apr 1 2024, 2:02 AM
Unknown Object (File)
Apr 1 2024, 1:49 AM
Subscribers
None

Details

Summary

Building java/openjdk{19,20,21} with lld 17 results in the following link errors:

ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ21WB_HandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ24WB_HandshakeReadMonitorsE19ReadMonitorsClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ26WB_AsyncHandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZL20reinitialize_itablesvE18ReinitTableClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN12JvmtiEnvBase27check_for_periodic_clean_upEvE28ThreadInsideIterationClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN15G1RemSetSummary6updateEvE11CollectData' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet22set_active_all_threadsEbbE22SetThreadActiveClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet23abandon_partial_markingEvE25AbandonThreadQueueClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN18G1ConcurrentRefine30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet12abandon_logsEvE23AbandonThreadLogClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet16concatenate_logsEvE27ConcatenateThreadLogClosure' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined
ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN7Threads25change_thread_claim_tokenEvE11ResetClaims' failed: symbol not defined

This is because lld 17 defaults to errors when undefined symbols are
referenced in linker version scripts. The problem is due to the Makefile
JvmMapfile.gmk, which generates a linker version script. It uses "nm
--defined-only" to dump symbols in object files, but this also includes
local (hidden) symbols. Add "--extern-only" to make it only dump global
symbols.

PR: 276425
MFH: 2024Q1

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable