From nobody Fri Jan 10 09:22:31 2025 X-Original-To: freebsd-current@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 4YTx5F35LQz5jw67 for ; Fri, 10 Jan 2025 09:22:41 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4YTx5C70vfz47G8; Fri, 10 Jan 2025 09:22:39 +0000 (UTC) (envelope-from pblok@bsd4all.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org; dmarc=none Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id 71830B774; Fri, 10 Jan 2025 10:22:34 +0100 (CET) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wpx492sFkKs2; Fri, 10 Jan 2025 10:22:33 +0100 (CET) Received: from smtpclient.apple (geer_ip [81.172.230.56]) by mail.bsd4all.org (Postfix) with ESMTPSA id C689FB803; Fri, 10 Jan 2025 10:22:33 +0100 (CET) From: Peter Blok Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: libxkbcommon version-script detection Message-Id: <518E81E7-F1F0-422C-88A0-718088E4FDB6@bsd4all.org> Date: Fri, 10 Jan 2025 10:22:31 +0100 To: FreeBSD CURRENT , dim@freebsd.org X-Mailer: Apple Mail (2.3696.120.41.1.10) X-Rspamd-Queue-Id: 4YTx5C70vfz47G8 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.90)[-0.902]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[bsd4all.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; FROM_HAS_DN(0.00)[] Hi, I have recompiled x11/libxkbcommon and it fails to detect if the = compiler/linker supports versioned symbols. As a result other code = expecting the versioned symbol to exist, fail to link. C compiler for the host machine: cc (clang 19.1.5 "FreeBSD clang version = 19.1.5 (https://github.com/llvm/llvm-project.git = llvmorg-19.1.5-0-gab4b5a2db582)") C linker for the host machine: cc ld.lld 19.1.5 Below the meson.build check. If I force have_version_script to true, the = versioned symbols are created and other code links fine. # Supports -Wl,--version-script? have_version_script =3D cc.links( 'int main(){}', args: '-Wl,--undefined-version,--version-script=3D' + = meson.current_source_dir()/'xkbcommon.map', name: '-Wl,--version-script', ) Below the output for the test. Checking if "-Wl,--version-script" : links: NO If I create test.c with content "int main(){}=E2=80=9D and compile it = manually with the same flags AFAIK, it compiles ok. No errors. However when I capture "make configure" with ktrace, it fails with the = error below. ld: error: non-exported symbol 'environ' in '/usr/lib/crt1.o' is = referenced by DSO '/lib/libc.so.7' ld: error: non-exported symbol '__progname' in '/usr/lib/crt1.o' = is referenced by DSO '/lib/libc.so.7' cc: error: linker command failed with exit code 1 (use -v to see = invocation) What flags need to be added in meson.build to allow it to work? BTW This is on recent stable, but I suspect it fails the same way on = current which I do not run at the moment. Peter