From nobody Wed Jan 31 12:11:03 2024 X-Original-To: gecko@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 4TQ18n6nRQz58Nw6 for ; Wed, 31 Jan 2024 12:11:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TQ18n3cLzz4VhD for ; Wed, 31 Jan 2024 12:11:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706703065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0IqD2PMm0WPXkPtN14v96twbBF5T8yGMH8EegckjM5Y=; b=oMMF7gbKFsJXSZQQ/UBnbqCXiXD804LKSnfbFUy1fPOlBfG8vrR8mvBaiugr0GfJHKum1W vJewsAdUWw6ZQyRYdzl3m0ShWCEkFGDQQoTzXUGI7K+cGpuItizTFhlKNsD5sWDjrw0VaO poM6eTmfB5X6gD8P4VAbEHx+tY4hzRuGcBkuE9dSdLJG9VXryqhWefiOmioveJU7OvHm9h vveV95bPB3mbFq1NwR2vMJt0ab9iP4FWhGdU3kKWVaJHVSrZNr9bFCFa5XwdwcawPqxJLX Z9AmmcwgDOkQ/GYfmWF3ihpPohF005GFRRBXFIkcMtPZQUF1hwSkRDj0Rpa6vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706703065; a=rsa-sha256; cv=none; b=Hacnp+A/TMUvuWKk01IwKfnK2eSe2nxEZmm99JJBY2Bg6Uyl+HDY1NmHQBrQbCOQmKTW9M 19hrrLh91+/i3U4/S61TXTD8mUpZaM3xU1Itx+BATxqcuD2XosLsilz8HLPYYEIr6L29oh SLy4Gg7AEQ3ZdtXbH+klszM68k8tL8tR+2JN4ogVcDxnDuI3mfDyz/MUEkt7sLapxTheh9 pgwIBOQmNKiXkCzjZ6tJd97eXnIdg/9IBYvzNyeir63VP/QVXBIGQdEAZ141UWwxKpaxdh UCSVZ2GIXk4z/qWLPA9CJfBoCKHK6CiYi+qefGD91Qql/yFfKwRjnPY4lHA3FA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TQ18n2hGBzHKP for ; Wed, 31 Jan 2024 12:11:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40VCB5Yj008058 for ; Wed, 31 Jan 2024 12:11:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40VCB5PV007981 for gecko@FreeBSD.org; Wed, 31 Jan 2024 12:11:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: gecko@FreeBSD.org Subject: maintainer-feedback requested: [Bug 276746] www/firefox: fix build with libc++ 18 Date: Wed, 31 Jan 2024 12:11:03 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gecko@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Gecko Rendering Engine issues List-Archive: https://lists.freebsd.org/archives/freebsd-gecko List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-gecko@freebsd.org MIME-Version: 1.0 Bugzilla Automation has asked freebsd-gecko (Nobody) for maintainer-feedback: Bug 276746: www/firefox: fix build with libc++ 18 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276746 --- Description --- This fixes two problems in www/firefox related to libc++ 18: * rust-bindgen problems with tuple definitions * visibility issues caused by gcc_hidden.h The first problem is that rust-bindgen uses some tricks to generate bindings for C++ components, but gets confused by some new constructs in libc++ 18 headers, causing it to generate faulty binding code. This is described more fully in ; in the mean time, upstream committed to fix it. The second problem is that the firefox build uses a rather brute force technique to suppress visibility of unwanted symbols in their shared libraries: they include a file config/gcc_hidden.h in front of almost every source file. This file contains nothing but a line containing "#pragma GCC visibility push(hidden)", forcing everything after it to have hidden visibility. This causes link errors with libc++ 18 and later, similar to: ld.lld: error: undefined hidden symbol: std::__1::basic_string, std::__1::allocator>::append(char const*, unsigned long) The issue is described more fully in , but upstream has not been able to decide if it is really a problem on their end, or if they want to support the use case at all. A better way to fix this is by using the more usual -fvisibility command line flags, which are similar in effect, but do not override extern declarations such as the ones in libc++ headers (see also ). This is achieved by patching build/moz.configure/toolchain.configure, to use the -fvisibility=3Dhidden and -fvisibility-inlines-hidden flags on FreeBSD in addition to Darwin. I am considering also sending this upstream.