From nobody Wed Jan 10 16:22:10 2024 X-Original-To: freebsd-stable@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 4T9CkG6jv4z57HbL for ; Wed, 10 Jan 2024 16:22:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4T9CkG68qGz56Kk; Wed, 10 Jan 2024 16:22:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704903734; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w1zRj/xh0oRbzd1Z1KcpuTqlICBU+bKNZU5dZtHpxGs=; b=hzsRv+dAK552RDdhQBylt2lWR0gmr6qDYNYbIjNB6LuQPey78mvoncFnteOn1xgKFXy85d Ltd3FFkgdekmB5WC8RKmAb9M1NszmYgmhsW5A7fYw6ZYz2otGIsSpeHy0/wYZCoESKQd7q 6x9gdpBbajSmxAKwvjiy3RI4X3n3FxXpV4UwmPa80w/kLxJd1j0oLI8/LosyLIW3nLYmpS iAe8uE7l4A/kSrASrpeYAZVZYZXIHmrkfDrBbpUGlP/2KEb+XWm3MZ49JRFol7wD+c92xC rhyPvoZMLe38bvkCjHebbwXM3oiLM1cJgYBZcLZ/UYNBTCYxmALlp0h+NHcevw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704903734; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w1zRj/xh0oRbzd1Z1KcpuTqlICBU+bKNZU5dZtHpxGs=; b=N+6QFg0ePyYi12BeIBULeacJ0jdmOl/sfbZ4562uKB9Jm1xga27r1V3TxeCij/KiGinxjY rN8Dn1fMm7N2EbIcLMTtDf03g5PuSxH3JNMdlsPuDO3VQurNpzKIuLyp9AFcJu8UrDpWUv KoUV53i4wxqtdrC/n7w4gjB2b+uoAzf9gZRi8/ft9w36hFIlXPZFiBK9dnpu6ch7+m/PjQ 87u0Yg/WUrwK3ZW9spOTBxuriNv0cs48JX5G/wIhrTF5UfZu6eoLzRjkljHQr0m3RfuewE me+pCIvDp6bpVlYxRPlQcgji2ZQVrUfkGfm1nCyyMyIX7pxKYrwypf0GuiXeOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704903734; a=rsa-sha256; cv=none; b=KCz3f/lBB5FJ4eORGgqDcRLyF/2eelp2f08npAKEMd86XLtqobrH1xvMFH55/nfjZeEhWJ 9wYxUmu2A8GSL1aJL3zjWKftiYYpAfcI3QCAuvEHoFx2CIb1BF9EBsWTEUMP54iEBVjzuW iGiLhmHoo7w28NFsBkQ4r5fI+kH3QTUoMyGaUZvfe7/AiQUeN1QAaJMo8hGOD+80Hxeu9k u6mmDTTlEcKjufFUhh7RajtinzQpH/aR7c/vm6KJCr1/35nETOHVkwcdbAsFTfKgTplFV3 jLt/UsTtxAA84hHE3qosaGd3tHg7zMJNwGIgPEOWgwWkhRkmA9suFc8MR4vZhA== 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 4T9CkG42hBz197j; Wed, 10 Jan 2024 16:22:14 +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 2D02D571C2; Wed, 10 Jan 2024 17:22:11 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: clang 17 and ports fallout From: Dimitry Andric In-Reply-To: <20ceec23-fe90-41de-a3d8-82eada0d56e7@sentex.net> Date: Wed, 10 Jan 2024 17:22:10 +0100 Cc: Antoine Brodin , FreeBSD-STABLE Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: References: <06381879-c328-4051-bb2f-9c3620d90fa0@sentex.net> <4a0db68d-bb13-4238-a251-74d02ff14a17@sentex.net> <04837a47-a39c-40c5-a045-2d27fb3893ac@sentex.net> <20ceec23-fe90-41de-a3d8-82eada0d56e7@sentex.net> To: mike tancsa X-Mailer: Apple Mail (2.3731.700.6) On 10 Jan 2024, at 13:16, mike tancsa wrote: >=20 > On 1/10/2024 2:53 AM, Antoine Brodin wrote: >> The preferred way is fixing the port by removing the undefined = symbols >>>=20 >>> from the linker version script in the port, but if that is not = possible >>> or difficult, add -Wl,--undefined-version to the linker flags = suppresses >>> the error. E.g. in the port Makefile: >>>=20 >>> LDFLAGS+=3D -Wl,--undefined-version >>>=20 >>> For an example, see: >>>=20 >>> = https://github.com/freebsd/freebsd-ports/commit/37790b26cbda11cd4bb6f237b8= 6cd94739c4059c >>>=20 >>> Thanks very much! That did indeed fix databases/rrdtool and and = sysutils/flashrom builds. What is the best way to flag any such issues ? = Just open a PR for each individual port ? >>>=20 >> Hello, >>=20 >> databases/rrdtool builds fine on stable/13 here: >> = https://pkg-status.freebsd.org/gohan04/data/stable13amd64-default-foo/2024= -01-09_21h18m24s/logs/rrdtool-1.8.0_2.log >>=20 >>=20 > I am not sure why it fails for me both in poudrier and outside it. But = the same type of error as=20 > = https://pkg-status.freebsd.org/gohan04/data/stable13amd64-default-foo/2024= -01-09_21h18m24s/logs/errors/ivykis-0.42.4.log > and adding=20 > LDFLAGS+=3D -Wl,--undefined-version >=20 >=20 > fixes it for me > I just checked on releng_14 that also has clang 17 MFCd and I get the = same error on the port. I am building it with less features than the = default so not sure if that makes it fail in my environment. However the = same options work with clang16 > /usr/local/lib -L/usr/local/lib -o rrdupdate rrdupdate.o = librrdupd.la=20 > libtool: link: cc -O2 -pipe -fstack-protector-strong -isystem = /usr/local/include -fno-strict-aliasing -D_GNU_SOURCE = -fno-strict-aliasing -Wall -std=3Dgnu99 -pedantic -Wundef -Wshadow = -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations = -Wnested-externs -Winline -Wold-style-definition -W -I.. -O2 -pipe = -fstack-protector-strong -isystem /usr/local/include = -fno-strict-aliasing -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=3Dgnu99= -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align = -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline = -Wold-style-definition -W -fstack-protector-strong -o rrdupdate = rrdupdate.o -L/usr/local/lib ./.libs/librrdupd.a -lm -lwrap -lglib-2.0 = -lintl -pthread > libtool: link: echo "{ global:" > .libs/librrd.so.8.3.0-ver > libtool: link: sed -e "s|$|;|" < ./librrd.sym >> = .libs/librrd.so.8.3.0-ver > libtool: link: echo "local: *; };" >> .libs/librrd.so.8.3.0-ver > libtool: link: cc -shared -fPIC -DPIC .libs/librrd_la-rrd_version.o = .libs/librrd_la-rrd_last.o .libs/librrd_la-rrd_lastupdate.o = .libs/librrd_la-rrd_first.o .libs/librrd_la-rrd_dump.o = .libs/librrd_la-rrd_flushcached.o .libs/librrd_la-rrd_fetch.o = .libs/librrd_la-rrd_fetch_cb.o .libs/librrd_la-rrd_resize.o = .libs/librrd_la-rrd_tune.o .libs/librrd_la-rrd_list.o = .libs/librrd_la-rrd_restore.o -Wl,--whole-archive ./.libs/librrdupd.a = -Wl,--no-whole-archive -L/usr/local/lib -lglib-2.0 -lintl -lm -lwrap = -lxml2 -O2 -fstack-protector-strong -pthread -O2 = -fstack-protector-strong -fstack-protector-strong -Wl,-rpath = -Wl,/usr/local/lib -pthread -Wl,-soname -Wl,librrd.so.8 = -Wl,-version-script -Wl,.libs/librrd.so.8.3.0-ver -o = .libs/librrd.so.8.3.0 > ld: error: version script assignment of 'global' to symbol 'rrd_graph' = failed: symbol not defined > ld: error: version script assignment of 'global' to symbol = 'rrd_graph_v' failed: symbol not defined > ld: error: version script assignment of 'global' to symbol 'rrd_lcd' = failed: symbol not defined > ld: error: version script assignment of 'global' to symbol = 'rrd_reduce_data' failed: symbol not defined > ld: error: version script assignment of 'global' to symbol 'rrd_xport' = failed: symbol not defined > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > gmake[4]: *** [Makefile:773: librrd.la] Error 1 > gmake[4]: Leaving directory = '/usr/ports/databases/rrdtool/work/rrdtool-1.8.0/src' > gmake[3]: *** [Makefile:618: all] Error 2 > gmake[3]: Leaving directory = '/usr/ports/databases/rrdtool/work/rrdtool-1.8.0/src' > gmake[2]: *** [Makefile:504: all-recursive] Error 1 > gmake[2]: Leaving directory = '/usr/ports/databases/rrdtool/work/rrdtool-1.8.0' > =3D=3D=3D> Compilation failed unexpectedly. > Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the = failure to I built the port and it worked just fine, but apparently this happens = only when you turn off the GRAPH option. I committed a fix in = https://cgit.freebsd.org/ports/commit/?id=3D2ed094adef32cc683a9a077f1c8eb2= 241754068a . -Dimitry