From nobody Mon Dec 11 15:15:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Splgq5JB4z53jnh; Mon, 11 Dec 2023 15:16:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Splgq12ktz4DPD; Mon, 11 Dec 2023 15:16:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702307767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kvur7s7dTjXJsiD6Df25oQXRF+ccbtGoFIvaHd8h+ZU=; b=GdK53MX8cc7iXqHF7fQNBGNXyKcvIqZR6sIsYhC8wPNgkl8K/UQLtnf9aGdISQ0SAQ/47D //KLg7th54qrjvJzGMD8AEl832SXJbCcTodwrgSCpJwdwLhW15KwkYBll+R+EFK3FHbmyB jvEVlZq3+5lZVV14WWHl9Y6Or8rvGy1CamlBEl/LGkKfkxoq5wIoXxp9rovRq8S7yc7zCb glAUCbyZwoIvJjedFwwf2UkvhOPWCzR9hMvDhrXaq438tJcYqf6Mk4RGR6vBTpv4nLVSz9 atSxNDMm2KiHITi3QJAcysK+Ltx9X/uqx5R4o+MjziRKIedeNqCobICiNGXZaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702307767; a=rsa-sha256; cv=none; b=q1iJRz48Nz+FCgXQ6O00Ca+KNX7I1VQNsfAqQ3MpD9KKfozSGWBE3nibovUoOe1lu7h9Ei KFXPtpApxB9rpYErY0Z7bYapUlilyFSWrmDiIwc3NYGvakZTjjpEA6bBVuYTOD3lVb6uY2 Dy21AQdk19jZxpsTsf3fhqUCATthEXN1pP0MuoAiDfzCI5l9+jzFwvQ3tL4EEC9KgXnrW1 6UYs27CkzC/rewB19z/CJg7hd8gj5i0qFp76Cr0WVhDUCiA4W+bDcJjfxR68qmPpnuAo1Y jeiZildzAVJBB+f9qIL8G32hC4yKDHQI4M5H0pu2JMIIHpMX5x4A5yLVOx1e3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702307767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kvur7s7dTjXJsiD6Df25oQXRF+ccbtGoFIvaHd8h+ZU=; b=te5Xg36CE++yicD4OfskT/uS+BgUqmf6xlLqb+7BeOkFSaNeV0+mhSOy3Jv9mOaW1tXFuX /lCJQPQN9pCqAio/JNcb3NyO4Ybx02nzdMDqOyU6wt6+TEI8a/Qzd+j27L4WjCaLbrTETB z9UTWEUjhUeYfGlI3/sB66u7bR9k0Rat1I1XBXWTjIeDw51xREoWTgQLBbDv44tB9VP2yg gd/+DuFQouosz/PgrSSXJX8tw43dE8vxuRO8Pc5KeBXq+4CE2RUa5m+xg3TrWZyeAicvI6 Duk4onNFV9N/jjaxeYJ12otGh9Mcpe4smviZs4NBG2LR5DUdOiL3cPHrOPQxgA== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Splgp6Wpjz1Zw9; Mon, 11 Dec 2023 15:16:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D5BFC34B7C; Mon, 11 Dec 2023 16:16:05 +0100 (CET) From: Dimitry Andric Message-Id: <4BE6917B-663A-4ED7-9E1A-A49FBA188456@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: 5c16e71d30c3 - main - Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 Date: Mon, 11 Dec 2023 16:15:48 +0100 In-Reply-To: Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Kristof Provost References: <202312081739.3B8HdJYC068067@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45 Content-Type: multipart/alternative; boundary="Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0" --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 11 Dec 2023, at 16:03, Kristof Provost wrote: > On 8 Dec 2023, at 18:39, Dimitry Andric wrote: > The branch main has been updated by dim: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388dd43b217de10a3ccb4= b0219d0d = > commit 5c16e71d30c388dd43b217de10a3ccb4b0219d0d > Merge: b121cb0095c8 703029dbba78 > Author: Dimitry Andric > AuthorDate: 2023-11-30 20:06:52 +0000 > Commit: Dimitry Andric > CommitDate: 2023-12-08 17:35:59 +0000 >=20 > Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367 >=20 > This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb = and > openmp to llvmorg-17.0.6-0-g6009708b4367. >=20 > PR: 273753 > MFC after: 1 month >=20 >=20 > There appears to be some fallout in some ports. >=20 > For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this: >=20 > /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O2 -pipe = -fstack-protector-strong -fno-strict-aliasing -Wall -version-info = 5:6:5 -Wl,--version-script,../libivykis.posix.ver = -fstack-protector-strong -o libivykis.la -rpath /usr/local/lib iv_avl.lo = iv_event.lo iv_fatal.lo iv_task.lo iv_timer.lo iv_tls.lo iv_work.lo = iv_event_raw_posix.lo iv_fd.lo iv_fd_poll.lo iv_fd_pump.lo = iv_main_posix.lo iv_popen.lo iv_signal.lo iv_thread_posix.lo = iv_tid_posix.lo iv_time_posix.lo iv_wait.lo iv_fd_kqueue.lo > libtool: link: cc -shared -fPIC -DPIC .libs/iv_avl.o = .libs/iv_event.o .libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o = .libs/iv_tls.o .libs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o = .libs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o = .libs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o = .libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o = .libs/iv_fd_kqueue.o -O2 -fstack-protector-strong = -Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong = -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6 > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_register' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_unregister' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_register' failed: symbol not defined > ld: error: version script assignment of 'IVYKIS_0.29' to symbol = 'iv_inotify_watch_unregister' failed: symbol not defined > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > I believe the issue is that it doesn=E2=80=99t build inotify code on = FreeBSD, but still mentions the relevant functions in the linker script. = The other affected ports I=E2=80=99ve run into appear to have similar = issues. >=20 In this case, if it never builds the inotify code, you can safely delete = those symbols from the linker version script. > There=E2=80=99s likely to be a fair amount of fallout from that, e.g. = https://github.com/llvm/llvm-project/issues/75056 >=20 > I=E2=80=99m not sure what the best path forward is. Should we try to = make ld warn but not fail on issues like that, or fix each affected port = or ? >=20 I fixed dozens of ports for this in https://bugs.freebsd.org/273753, but = I haven't gone over all of them, since I have limited resources. That said, there are generally two ways to fix this: either add = -Wl,--undefined-version to the linker flags, or actually remove the = undefined symbols from the linker version scripts. Example of the former: = https://cgit.freebsd.org/ports/commit/?id=3De0c21e404ed0f04c06c3bce7dd093c= 6e5ffea188 : --- a/java/openjfx14/Makefile +++ b/java/openjfx14/Makefile @@ -95,6 +95,9 @@ _INSTALLDIR=3D ${PREFIX}/${PKGBASE} CFLAGS+=3D -Wno-error=3Dincompatible-function-pointer-types .endif +# Suppress errors with lld >=3D 17 due to undefined symbols. +LDFLAGS+=3D -Wl,--undefined-version + post-extract: ${MKDIR} ${WRKDIR}/jars .for f in core grouping queries queryparser sandbox Example of the latter: = https://cgit.freebsd.org/ports/commit/?id=3Daef056cf0fe1852a7b708d090310a6= eb4853b269 : --- = a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym= +++ = b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym= @@ -1,5 +1,5 @@ ---- ext/pg_query/pg_query_ruby.sym.orig 2023-06-25 07:13:00 UTC +--- ext/pg_query/pg_query_ruby.sym.orig 2023-11-19 20:29:16 UTC +++ ext/pg_query/pg_query_ruby.sym -@@ -1 +1,2 @@ - _Init_pg_query +@@ -1 +1 @@ +-_Init_pg_query +Init_pg_query -Dimitry --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On 11 Dec = 2023, at 16:03, Kristof Provost <kp@FreeBSD.org> = wrote:
On 8 Dec 2023, at 18:39, Dimitry Andric = wrote:

The branch main has been = updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=3D5c16e71d30c388= dd43b217de10a3ccb4b0219d0d

commit = 5c16e71d30c388dd43b217de10a3ccb4b0219d0d
Merge: b121cb0095c8 703029dbba78
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-11-30 20:06:52 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-08 17:35:59 +0000

Merge = llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367

This updates llvm, clang, compiler-rt, libc++, = libunwind, lld, lldb and
openmp to llvmorg-17.0.6-0-g6009708b4367.

PR: = 273753
MFC after: 1 month


There appears to be some fallout in some ports.

For example, devel/ivykis (but also sysutils/flashrom and = databases/rrdtool) fails like this:

/bin/sh ../libtool  --tag=3DCC    =
--mode=3Dlink cc  -O2 -pipe  -fstack-protector-strong =
-fno-strict-aliasing  -Wall  -version-info 5:6:5 =
-Wl,--version-script,../libivykis.posix.ver -fstack-protector-strong -o =
libivykis.la -rpath /usr/local/lib iv_avl.lo iv_event.lo iv_fatal.lo =
iv_task.lo  iv_timer.lo iv_tls.lo iv_work.lo iv_event_raw_posix.lo =
iv_fd.lo  iv_fd_poll.lo iv_fd_pump.lo iv_main_posix.lo  iv_popen.lo =
iv_signal.lo iv_thread_posix.lo  iv_tid_posix.lo iv_time_posix.lo =
iv_wait.lo    iv_fd_kqueue.lo
libtool: link: cc -shared  -fPIC -DPIC  .libs/iv_avl.o .libs/iv_event.o =
.libs/iv_fatal.o .libs/iv_task.o .libs/iv_timer.o .libs/iv_tls.o =
.libs/iv_work.o .libs/iv_event_raw_posix.o .libs/iv_fd.o =
.libs/iv_fd_poll.o .libs/iv_fd_pump.o .libs/iv_main_posix.o =
.libs/iv_popen.o .libs/iv_signal.o .libs/iv_thread_posix.o =
.libs/iv_tid_posix.o .libs/iv_time_posix.o .libs/iv_wait.o =
.libs/iv_fd_kqueue.o    -O2 -fstack-protector-strong =
-Wl,--version-script -Wl,../libivykis.posix.ver -fstack-protector-strong =
  -Wl,-soname -Wl,libivykis.so.0 -o .libs/libivykis.so.0.5.6
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_unregister' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_watch_register' failed: symbol not defined
ld: error: version script assignment of 'IVYKIS_0.29' to symbol =
'iv_inotify_watch_unregister' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see =
invocation)

I believe the issue is that it doesn=E2=80=99= t build inotify code on FreeBSD, but still mentions the relevant = functions in the linker script. The other affected ports I=E2=80=99ve = run into appear to have similar = issues.

In this case, if it = never builds the inotify code, you can safely delete those symbols from = the linker version script.

There=E2=80=99s likely to be a fair amount of fallout from = that, e.g. https://github.= com/llvm/llvm-project/issues/75056

I=E2=80=99m = not sure what the best path forward is. Should we try to make ld warn = but not fail on issues like that, or fix each affected port or = ?




--- a/java/openjfx14/Makefile
+++ b/java/openjfx14/Makefile
@@ -95,6 +95,9 @@ _INSTALLDIR=3D =  ${PREFIX}/${PKGBASE}
 CFLAGS+=3D       = -Wno-error=3Dincompatible-function-pointer-types
 .endif

+# Suppress = errors with lld >=3D 17 due to undefined = symbols.
+LDFLAGS+=3D   =    -Wl,--undefined-version
+
 post-extract:
        ${MKDIR} = ${WRKDIR}/jars
 .for f in = core grouping queries queryparser = sandbox


--- = a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym=
+++ = b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym=
@@ -1,5 +1,5 = @@
---- = ext/pg_query/pg_query_ruby.sym.orig       =  2023-06-25 07:13:00 UTC
+--- = ext/pg_query/pg_query_ruby.sym.orig       =  2023-11-19 20:29:16 UTC
 +++ = ext/pg_query/pg_query_ruby.sym
-@@ = -1 +1,2 @@
- = _Init_pg_query
+@@ -1 +1 = @@
+-_Init_pg_query
 +Init_pg_query

-Dimit= ry

= --Apple-Mail=_C1039ED0-471E-418F-B309-A701E8315DF0-- --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZXcnpAAKCRCwXqMKLiCW o2wvAKDRVumoSrgNKyR3a8ZAyvXl9FgtQACgtG+38ivaq2zYKtAHDifxS7kwCJY= =N/rs -----END PGP SIGNATURE----- --Apple-Mail=_9BCCE6DB-3DD5-40D6-9BAA-65DC475E8C45--