From nobody Fri Jan 10 10:19:45 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 4YTyM76XVDz5k2Sr for ; Fri, 10 Jan 2025 10:19:47 +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 4YTyM763PHz4GV7; Fri, 10 Jan 2025 10:19:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736504387; 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=qDIpvqENEbXRSmvroBPmQWVMKauzJtyoeHYxUvaOXOk=; b=FfCc/KPduOf9ffclzXyFru1li7s4ZRl9Ip7VNHe4p88B4eH5+lqkXyo03nigOK21iY8EMW 262/gvjLpHJsZxDamWsl6QtAvaxFArGEXIXJ8WGGLMnvaGepUpA85JY7FssJpmAxPDrSyF tQ+cS5+6BOKAradqruJjfYcnYBIXyBZCjnGNHwR0wRyf3Uk+YBrlhUjq9IhIqq99R84TY4 vJhgYKEfvNeXASzlXYk6wNMOWlcnrXqmDsCZAwEHTavb5umo1VGAApTrFmStCQl4mwcP94 WSIveIj0gh0eLN7/AIj14D5HhtZNo/vTKX5nENTSyKnCTvsKEf8GI0wtt9p65g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736504387; 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=qDIpvqENEbXRSmvroBPmQWVMKauzJtyoeHYxUvaOXOk=; b=HYNvpk3NVcUuedzPyGw5VHQ8g7XFny4ge96RJRSlfSmVLo74cfrLwFdKJLmIpl8Wr8cEe5 7EkAPEjj/hud+4k+gflRBBPvQvj884rST1EY0yYYL4iobgF3y1RSXjMzZMXxJTYjrJx4Hi AY2zg0L0XVlaIAJRXmzuXs1C1JAQ8H5HP+QWuuuwjR8obMfKlFgqm9sbi+69Bn7irsNBIN y3kGbeps6Jh4Jd7G6MFNjoy4cK/m4E1IqtS+l01+XP/RqInAYaHhX7i/w9iwGQjxUBUUqy ySKp+uDaeMZh8D1psghgfc4FuUnsTBHye8ps8ltpoajUOPPPlHMPaufMO5ZOTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736504387; a=rsa-sha256; cv=none; b=En83o+X8RLk+DYZoStK318X4v2l6902Z0ByDuOcCdZPTHaZWQuqpzx9LPsODGT+gCW0Goa hsA+rs3iUlWZvG6YgT3SYNqNKTcVQP/ulTtOHTRIPn/7d8j1OgZj6JbVqyhGZw01GLobFz vQesIkCuLo9HXjQ77uYg9zbz/C1cG0RHG7yEKoxFwgIT+V4Z9/Fu5gm0I5vLfL9v2L9XsK JFjBZIx+K1gHH2HiF4ZEUthLV5mlqoI6KUeQB8Sl8h1MT+kaqAdzEH7gUJGy7C6Dy4OF/w rpS4uZrm1JH7s7yCjCvbHsC1waVeepPCQtt+X0CTsV9UtlfNvRCKwnCKRYoNxQ== 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 4YTyM74V22zm1D; Fri, 10 Jan 2025 10:19:47 +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 DC4A0673EE; Fri, 10 Jan 2025 11:19:45 +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: <518E81E7-F1F0-422C-88A0-718088E4FDB6@bsd4all.org> Date: Fri, 10 Jan 2025 11:19:45 +0100 Cc: FreeBSD CURRENT Content-Transfer-Encoding: quoted-printable Message-Id: <1DCB46A8-04C7-4F1A-ADEE-A5402E4B5617@FreeBSD.org> References: <518E81E7-F1F0-422C-88A0-718088E4FDB6@bsd4all.org> To: Peter Blok X-Mailer: Apple Mail (2.3731.700.6.1.9) 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. It works just fine on -CURRENT: ... Checking if "-Wl,--version-script" : links: YES Not sure what is going wrong in your environment. Is this stable/14? -Dimitry