From nobody Fri Jan 10 11:56:01 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 4YV0VB3g3Qz5kBF9 for ; Fri, 10 Jan 2025 11:56:02 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YV0VB36hXz4T3N; Fri, 10 Jan 2025 11:56:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736510162; 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=S/jdoVrksf3T1slPKCLjM9WH8LNCuJ0Xcbllr8rM2JI=; b=FvENIxP1ZYzyvO/xFyI9pGDAvEIfuUOMlwLlRSiZLhI4cM+niSXnNiRW3WRNfdT6Ke7t9P vJEoOAWaXAeWznSiE5DC4Iy732ePtspzIKMRqRul4ekMXCl7bTZ2hq1O7BeZsUjrWfP1ci ijdQScH5rn1pRrznUsHUfgfGNB64KWoenwF6Vp7iyD+QifbQSOB/Nslf7GR3WQr5IX1yxo eyCwJLkZRsqiKqCtIP9MDDt7fWYzwlyOlwjH74ouBhW5lIP9FSgNeyp2Hv0p0tUG91/Qhw h6PdxnaGI+2dBPxlbcRWeZPzZj81/d9KW9M4fSmD8Uw45jagyEkirxW/IWOXMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736510162; 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=S/jdoVrksf3T1slPKCLjM9WH8LNCuJ0Xcbllr8rM2JI=; b=xLwnYcilRFVKppcb0bDg7lNFSGjQlS25BVhKp9c2my/CFPCd7FFtyiiM5s8tNvaGre0eJl J23NVcaeLeC/le5uIpDc4AROe0Wc3xBId99C+wvOBwUPaKAlbl9m7NOtI8VwkInLZpIHY/ o+SZQnH4L7SlpMJttzzOQIkiFuwrnB85pV3FQT2upbgetkXNl2sTUoUTMp3PvnSSNeJIyQ MCVpKt8iRsa4X34OvEiR9w1q1uvwyUqI4ElbJ1oK8cR6v2KxcL0G5MME1w6nLD0XR4sedK tyxuhU2DQGuO9bLuF/vdKqDHpmC9FCqYz3YXSqUYgl4SCUtowlPME9AgXWIruw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736510162; a=rsa-sha256; cv=none; b=eXebI42oe2d8b4Th58bt8RsBpEebmjebwt5qCdOgvlxFFEvoV8I3g8WFZWSlaOB50jxaMR EAPDcD2K/vC0t6Ot4LtONeH/DnDtja+Mx28TfmsRvyaAZ8dn8o4W1hq7JlF2WjvlYP/ahZ xgsg6i0N0klchZN7jFwaQoJRDi/U8lFaCaPHZCSOZ9MJwsKsLJziUl+80juDxywfNUvuDZ toVkwypkrZEMNRfhFNAZIntyYZeGtgDgvTt/YdbckKcnrLTqZEuE1vwzCGhVHBAV5ofXZ8 CiL30WzWpZN+2toqs3caQoG7I4/cv06sNky8FLv8xuFH+UDvjalFNVS84kxkKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 "R10" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YV0VB1k6Fzn5S; Fri, 10 Jan 2025 11:56:02 +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 35B7B67791; Fri, 10 Jan 2025 12:56:01 +0100 (CET) Content-Type: text/plain; charset=utf-8 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 \(3731.700.6.1.9\)) Subject: Re: libxkbcommon version-script detection From: Dimitry Andric In-Reply-To: <2EFAFFD8-E1E1-42D0-B41D-217E97C27F2E@bsd4all.org> Date: Fri, 10 Jan 2025 12:56:01 +0100 Cc: FreeBSD CURRENT Content-Transfer-Encoding: quoted-printable Message-Id: References: <518E81E7-F1F0-422C-88A0-718088E4FDB6@bsd4all.org> <1DCB46A8-04C7-4F1A-ADEE-A5402E4B5617@FreeBSD.org> <2EFAFFD8-E1E1-42D0-B41D-217E97C27F2E@bsd4all.org> To: Peter Blok X-Mailer: Apple Mail (2.3731.700.6.1.9) On 10 Jan 2025, at 12:20, Peter Blok wrote: >=20 > Test works ok when using clang18 from ports >=20 >> On 10 Jan 2025, at 11:19, Dimitry Andric wrote: >>=20 >> On 10 Jan 2025, at 10:22, Peter Blok wrote: >>>=20 >>> 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. >>>=20 >>> 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 >>>=20 >>> Below the meson.build check. If I force have_version_script to true, = the versioned symbols are created and other code links fine. >>>=20 >>> # 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', >>> ) >>>=20 >>> Below the output for the test. >>>=20 >>> Checking if "-Wl,--version-script" : links: NO >>>=20 >>> 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. >>>=20 >>> However when I capture "make configure" with ktrace, it fails with = the error below. >>>=20 >>> 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) >>>=20 >>> What flags need to be added in meson.build to allow it to work? >>>=20 >>> BTW This is on recent stable, but I suspect it fails the same way on = current which I do not run at the moment. >>=20 >> It works just fine on -CURRENT: >>=20 >> ... >> Checking if "-Wl,--version-script" : links: YES >>=20 >> Not sure what is going wrong in your environment. Is this stable/14? It appears to help when the lines: local: *; are removed from = /wrkdirs/usr/ports/x11/libxkbcommon/work/libxkbcommon-1.7.0/xkbcommon.map.= Apparently on main, environ and __progname are slightly different. In any case, the "local: *;" thing has caused problems before, so maybe = it's better to get rid of it. -Dimitry