Date: Mon, 8 Jan 2024 23:50:31 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: mike tancsa <mike@sentex.net> Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: clang 17 and ports fallout Message-ID: <D365EB02-14AC-4F85-B687-962C20A7BA04@FreeBSD.org> In-Reply-To: <4a0db68d-bb13-4238-a251-74d02ff14a17@sentex.net> References: <06381879-c328-4051-bb2f-9c3620d90fa0@sentex.net> <4a0db68d-bb13-4238-a251-74d02ff14a17@sentex.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8 Jan 2024, at 21:57, mike tancsa <mike@sentex.net> wrote: >=20 > On 1/8/2024 3:40 PM, mike tancsa wrote: >> After today's MFC of clang17, I am seeing some fallout from a few = ports that build with clang16 on RELENG_13 but now fail. Any ideas what = might be going on ? I have nothing in /etc/make.conf nor /etc/src.conf >>=20 > These build on RELENG_14, so perhaps something still needs to be MFC'd = to RELENG_13 ? >=20 > I have tried both with and without poudriere. Same error in poudriere >=20 > d_la-rrd_update.lo librrdupd_la-rrd_modify.lo = librrdupd_la-quicksort.lo librrdupd_la-rrd_thread_safe.lo -lm -lwrap = -lglib-2.0 -lintl > libtool: link: ar cr .libs/librrdupd.a .libs/librrdupd_la-mutex.o = libs/librrdupd_la-optparse.o .libs/librrdupd_la-rrd_strtod.o = libs/librrdupd_la-rrd_create.o .libs/librrdupd_la-hash_32.o = libs/librrdupd_la-rrd_parsetime.o .libs/librrdupd_la-rrd_hw.o = libs/librrdupd_la-rrd_hw_math.o .libs/librrdupd_la-rrd_hw_update.o = libs/librrdupd_la-rrd_diff.o .libs/librrdupd_la-rrd_format.o = libs/librrdupd_la-rrd_info.o .libs/librrdupd_la-rrd_error.o = libs/librrdupd_la-rrd_open.o .libs/librrdupd_la-rrd_client.o = libs/librrdupd_la-rrd_nan_inf.o .libs/librrdupd_la-rrd_rpncalc.o = libs/librrdupd_la-rrd_utils.o .libs/librrdupd_la-rrd_snprintf.o = libs/librrdupd_la-rrd_update.o .libs/librrdupd_la-rrd_modify.o = libs/librrdupd_la-quicksort.o .libs/librrdupd_la-rrd_thread_safe.o > libtool: link: ranlib .libs/librrdupd.a > libtool: link: ( cd ".libs" && rm -f "librrdupd.la" && ln -s = "../librrdupd.la" "librrdupd.la" ) > /bin/sh ../libtool --tag=3DCC --mode=3Dlink cc -O2 -pipe = -fstack-protector-strong -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.. -D_THREAD_SAFE = -pthread -O2 -pipe -fstack-protector-strong -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 -version-info 11:0:3 -export-symbols ./librrd.sym = -fstack-protector-strong -L/usr/local/lib -L/usr/local/lib -o = librrd.la -rpath /usr/local/lib librrd_la-rrd_version.lo = librrd_la-rrd_last.lo librrd_la-rrd_lastupdate.lo librrd_la-rrd_first.lo = librrd_la-rrd_dump.lo librrd_la-rrd_flushcached.lo = librrd_la-rrd_fetch.lo librrd_la-rrd_fetch_cb.lo librrd_la-rrd_resize.lo = librrd_la-rrd_tune.lo librrd_la-rrd_list.lo librrd_la-rrd_restore.lo = librrdupd.la -lglib-2.0 -lintl -lm -lwrap -lxml2 > 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 -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[3]: *** [Makefile:773: librrd.la] Error 1 > gmake[3]: Leaving directory = '/wrkdirs/usr/ports/databases/rrdtool/work/rrdtool-1.8.0/src' > gmake[2]: *** [Makefile:618: all] Error 2 > gmake[2]: Leaving directory = '/wrkdirs/usr/ports/databases/rrdtool/work/rrdtool-1.8.0/src' > gmake[1]: *** [Makefile:504: all-recursive] Error 1 > gmake[1]: Leaving directory = '/wrkdirs/usr/ports/databases/rrdtool/work/rrdtool-1.8.0' > *** Error code 1 I fixed a lot of ports in the run-up to merging llvm-17 in 15-CURRENT, but I could not get them all. The preferred way is fixing the port by removing the undefined symbols 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: LDFLAGS+=3D -Wl,--undefined-version For an example, see: = https://github.com/freebsd/freebsd-ports/commit/37790b26cbda11cd4bb6f237b8= 6cd94739c4059c -Dimitry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D365EB02-14AC-4F85-B687-962C20A7BA04>