From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE6BB1584AD for ; Thu, 24 Apr 2025 23:33:07 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id B59D1343023 for ; Thu, 24 Apr 2025 23:33:07 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id A9E1F1104A9; Thu, 24 Apr 2025 23:33:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A018D11028B for ; Thu, 24 Apr 2025 23:33:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 533DA343016 for ; Thu, 24 Apr 2025 23:33:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DDD862529 for ; Thu, 24 Apr 2025 23:33:04 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1745537504.8ac2ad88832e37b7df16a842a1cbc57d259431e4.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/, dev-cpp/folly/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-cpp/folly/files/folly-2025.04.14.00-CMake-Avoid-finding-liburing.patch dev-cpp/folly/folly-2025.04.14.00-r1.ebuild dev-cpp/folly/folly-2025.04.14.00.ebuild X-VCS-Directories: dev-cpp/folly/files/ dev-cpp/folly/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8ac2ad88832e37b7df16a842a1cbc57d259431e4 X-VCS-Branch: master Date: Thu, 24 Apr 2025 23:33:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6af7709f-368f-4570-b4de-bdde55531e05 X-Archives-Hash: cd98f75981dfda20555b93acb7d86cdd commit: 8ac2ad88832e37b7df16a842a1cbc57d259431e4 Author: sin-ack protonmail com> AuthorDate: Thu Apr 24 21:06:43 2025 +0000 Commit: Sam James gentoo org> CommitDate: Thu Apr 24 23:31:44 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ac2ad88 dev-cpp/folly: add IUSE io-uring There are three different problems being addressed here: 1. Recent Folly versions depend on liburing features that have not yet been released. 2. Folly has no build system configuration option to disable io_uring support. 3. Folly's CMake build system will unconditionally add liburing as a library to link against, which downstream Facebook libraries rely on. The third one creates an implicit dependency between Folly and liburing which means if liburing gets depcleaned or otherwise unmerged, other Facebook packages will fail to build. We solve this by conditionally patching out io_uring support based on USE=io-uring and having a (currently technically invalid) dependency on the yet-unreleased liburing-2.10, which will make it automagically start working once we do have that release in ::gentoo. Ref: https://github.com/facebook/folly/issues/2420 Bug: https://bugs.gentoo.org/954335 Signed-off-by: sin-ack protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41734 Signed-off-by: Sam James gentoo.org> ...025.04.14.00-CMake-Avoid-finding-liburing.patch | 30 ++++++++++++++++++++++ ....14.00.ebuild => folly-2025.04.14.00-r1.ebuild} | 25 +++++++++--------- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/dev-cpp/folly/files/folly-2025.04.14.00-CMake-Avoid-finding-liburing.patch b/dev-cpp/folly/files/folly-2025.04.14.00-CMake-Avoid-finding-liburing.patch new file mode 100644 index 000000000000..80399fb9c432 --- /dev/null +++ b/dev-cpp/folly/files/folly-2025.04.14.00-CMake-Avoid-finding-liburing.patch @@ -0,0 +1,30 @@ +From a0d86ed3bc2150ddfad50ab1b2eb09bea7a277d2 Mon Sep 17 00:00:00 2001 +From: sin-ack +Date: Thu, 24 Apr 2025 20:59:06 +0000 +Subject: [PATCH] CMake: Avoid finding liburing + +Otherwise, Folly will unconditionally add it to the list of libraries to +link even if io_uring support is otherwise disabled, creating an +implicit dependency on it that can't be tracked by package managers. +--- + CMake/folly-deps.cmake | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake +index 6ce4c679a..b1e20a901 100644 +--- a/CMake/folly-deps.cmake ++++ b/CMake/folly-deps.cmake +@@ -139,10 +139,6 @@ find_package(LibAIO) + list(APPEND FOLLY_LINK_LIBRARIES ${LIBAIO_LIBRARIES}) + list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBAIO_INCLUDE_DIRS}) + +-find_package(LibUring) +-list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) +-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) +- + find_package(Libsodium) + list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) + list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS}) +-- +2.49.0 + diff --git a/dev-cpp/folly/folly-2025.04.14.00.ebuild b/dev-cpp/folly/folly-2025.04.14.00-r1.ebuild similarity index 81% rename from dev-cpp/folly/folly-2025.04.14.00.ebuild rename to dev-cpp/folly/folly-2025.04.14.00-r1.ebuild index 05ec9d0a3f03..48695a36dd84 100644 --- a/dev-cpp/folly/folly-2025.04.14.00.ebuild +++ b/dev-cpp/folly/folly-2025.04.14.00-r1.ebuild @@ -22,16 +22,9 @@ SRC_URI="https://github.com/facebook/folly/releases/download/v${PV}/${PN}-v${PV} LICENSE="Apache-2.0" SLOT="0/${PV}" KEYWORDS="~amd64 ~arm64 ~ppc64" -IUSE="llvm-libunwind test" +IUSE="io-uring llvm-libunwind test" RESTRICT="!test? ( test )" -# NOTE: liburing support is disabled because Folly depends on features -# that are not available in the current stable version of liburing. -# -# See: https://github.com/facebook/folly/issues/2420 -# -# NOTE: Re-check during next bump whether liburing released a version with -# zcrx support. RDEPEND=" app-arch/bzip2 app-arch/lz4:= @@ -51,8 +44,8 @@ RDEPEND=" sys-libs/zlib llvm-libunwind? ( llvm-runtimes/libunwind:= ) !llvm-libunwind? ( sys-libs/libunwind:= ) + io-uring? ( >=sys-libs/liburing-2.10:= ) " -# libiberty is linked statically DEPEND=" ${RDEPEND} sys-libs/binutils-libs @@ -61,9 +54,6 @@ DEPEND=" PATCHES=( "${FILESDIR}"/${PN}-2024.11.04.00-musl-fix.patch - # NOTE: Disable liburing support as mentioned above. Folly doesn't have - # a configure flag for this so we must patch the check out. - "${FILESDIR}"/${PN}-2025.04.14.00-force-liburing-off.patch ) src_unpack() { @@ -73,6 +63,17 @@ src_unpack() { default } +src_prepare() { + # Folly has no configuration option for disabling io_uring support + # so we need to patch it out. + if use !io-uring; then + eapply "${FILESDIR}"/${PN}-2025.04.14.00-force-liburing-off.patch + eapply "${FILESDIR}"/${PN}-2025.04.14.00-CMake-Avoid-finding-liburing.patch + fi + + cmake_src_prepare +} + src_configure() { local mycmakeargs=( -DCMAKE_INSTALL_DIR="$(get_libdir)/cmake/${PN}"