From e0c21e404ed0f04c06c3bce7dd093c6e5ffea188 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 13 Nov 2023 14:16:57 +0100 Subject: [PATCH] java/openjfx14: fix build with lld 17 Building java/openjfx14 with lld 17 results in the following link errors: ld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF6StringC1EPKtj' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF8LockBase8lockSlowEv' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF8LockBase10unlockSlowEv' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF10fastMallocEj' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF16fastZeroedMallocEj' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZNK3WTF10StringView23underlyingStringIsValidEv' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_addRangeImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_collapseImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_collapseToEndImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_collapseToStartImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_containsNodeImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_deleteFromDocumentImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_dispose' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_emptyImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_extendImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getAnchorNodeImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getAnchorOffsetImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getBaseNodeImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getBaseOffsetImpl' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getExtentNodeImpl' failed: symbol not defined This is because lld 17 defaults to errors when undefined symbols are referenced in linker version scripts. Suppress the errors since openjfx14 is mostly unmaintained. PR: 273753 MFH: 2023Q4 --- java/openjfx14/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/openjfx14/Makefile b/java/openjfx14/Makefile index 7b8c05991ef66..5680f1862979b 100644 --- a/java/openjfx14/Makefile +++ b/java/openjfx14/Makefile @@ -95,6 +95,9 @@ _INSTALLDIR= ${PREFIX}/${PKGBASE} CFLAGS+= -Wno-error=incompatible-function-pointer-types .endif +# Suppress errors with lld >= 17 due to undefined symbols. +LDFLAGS+= -Wl,--undefined-version + post-extract: ${MKDIR} ${WRKDIR}/jars .for f in core grouping queries queryparser sandbox