public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/files/, dev-cpp/folly/
Date: Sat, 13 Aug 2022 15:09:19 +0000 (UTC)	[thread overview]
Message-ID: <1660403339.f51bef9d5b01a1d7289732657b9e0a12e217fdb1.sam@gentoo> (raw)

commit:     f51bef9d5b01a1d7289732657b9e0a12e217fdb1
Author:     brahmajit das <listout <AT> protonmail <DOT> com>
AuthorDate: Fri Aug 12 19:46:37 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 13 15:08:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f51bef9d

dev-cpp/folly: add 2022.08.08.00

With folly-2022.08.08.00, there seems to be a undefined reference issue
to undefined reference to
folly::detail::base64_detail::base64Decode_SSE4_2. With newer release we
can remove the patch.

Signed-off-by: brahmajit das <listout <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26838
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/folly/Manifest                             |  1 +
 ...lly-2022.08.08.00-undefined-reference-fix.patch | 62 +++++++++++++++
 dev-cpp/folly/folly-2022.08.08.00.ebuild           | 93 ++++++++++++++++++++++
 3 files changed, 156 insertions(+)

diff --git a/dev-cpp/folly/Manifest b/dev-cpp/folly/Manifest
index 672efed2879e..23c3b4d7dca4 100644
--- a/dev-cpp/folly/Manifest
+++ b/dev-cpp/folly/Manifest
@@ -1,3 +1,4 @@
 DIST folly-2022.03.28.00.tar.gz 3616507 BLAKE2B da003701abe599f20ac87a2785fe9a4cd4a8896d182737eb1eac6384f3d75a792225b426febea7cc4ea99aac1a1f31eb7330e0a297f43ae7d5aafccd93784560 SHA512 6eee07b3e82247c3c8672442503e9a69a1c4607604269fc0760e11a2d0e5595029e6995fbe7c970d2052a7f228f6b92112630e6d5c624369fc52e5ad1823ef74
 DIST folly-2022.04.11.00.tar.gz 3632587 BLAKE2B 13820f6dc600727fa97603181be97a568cc8b3c713659717592853827dac050d5f1f6d98178e3054871233b48ac18f713589bf43b36ea29445cad557ce13bacf SHA512 7aa0be95d6f8b21aaa88558cf5921c526ab5a8c8121b858eb6e7ea19946d7a82dff06d90b7a365cef5c56a43d8d57af8d01b8b11b27262fbed9ee8c9e701b5ac
 DIST folly-v2022.07.04.00.tar.gz 3647988 BLAKE2B ab8916ff4be1468d44dc0892126448682554ea95ce879166f457b621c3157cb22d0292fe2c58744494efe0fbabbf77732184335cd22244724c740910cf3a8303 SHA512 11fc32768539d8d42c7396eeac522238450617c8dde302b45c64bb93fd6ceaef7bb193b897802962782e8211c3931d31bf8df68e06741ce855d9725510677d7a
+DIST folly-v2022.08.08.00.tar.gz 3684846 BLAKE2B 462c183effea452ca706a7a14ebba820f377bc5ba6fd1475b15ca10e3c21df60a16b529b6599cf5dd5df2913b1fbd0432a3c411ab0aa400a9c84bb6aecd2f70f SHA512 f44dbf96f42a86d44cad46129750ae2bc0abb6702e148de10def4b241a3c7afa62ad19acca96609e8a9bfdfeeb7eda3f19d8eb161b5e41702c943ca87a75c88e

diff --git a/dev-cpp/folly/files/folly-2022.08.08.00-undefined-reference-fix.patch b/dev-cpp/folly/files/folly-2022.08.08.00-undefined-reference-fix.patch
new file mode 100644
index 000000000000..1a21386b1e83
--- /dev/null
+++ b/dev-cpp/folly/files/folly-2022.08.08.00-undefined-reference-fix.patch
@@ -0,0 +1,62 @@
+https://github.com/facebook/folly/commit/10fc2e449038d9ffda5cd53999edb9875c4cb151
+
+From 10fc2e449038d9ffda5cd53999edb9875c4cb151 Mon Sep 17 00:00:00 2001
+From: Simon Marlow <smarlow@fb.com>
+Date: Fri, 12 Aug 2022 08:26:40 -0700
+Subject: [PATCH] Fix bugs in Cmake setup
+
+Summary:
+Please see https://github.com/facebook/folly/issues/1823 and
+https://github.com/facebook/folly/issues/1478
+
+* CMAKE_LIBRARY_ARCHITECTURE is not always defined
+* This doesn't work: `set(IS_X86_64_ARCH NOT(IS_X86_64_ARCH STREQUAL "-1"))`
+* Two conditionals for `IS_X86_64_ARCH` were reversed
+
+Reviewed By: bochko
+
+Differential Revision: D38653631
+
+fbshipit-source-id: c4b6f2820a2280356a7eb69bf0e9253434b5e750
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,8 +27,19 @@ if(POLICY CMP0075)
+   cmake_policy(SET CMP0075 NEW)
+ endif()
+
+-string(FIND "${CMAKE_LIBRARY_ARCHITECTURE}" "x86_64" IS_X86_64_ARCH)
+-set(IS_X86_64_ARCH NOT(IS_X86_64_ARCH STREQUAL "-1"))
++if("${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "")
++  # CMAKE_LIBRARY_ARCHITECTURE is not always set, so we have to assume
++  # arch might be x86_64
++  message(WARNING "CMAKE_LIBRARY_ARCHITECTURE not set, assuming x86_64")
++  set(IS_X86_64_ARCH ON)
++else()
++  string(FIND "${CMAKE_LIBRARY_ARCHITECTURE}" "x86_64" IS_X86_64_ARCH)
++  if(IS_X86_64_ARCH STREQUAL "-1")
++    set(IS_X86_64_ARCH OFF)
++  else()
++    set(IS_X86_64_ARCH ON)
++  endif()
++endif()
+
+ # includes
+ set(CMAKE_MODULE_PATH
+@@ -230,7 +241,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ endif()
+
+ # base64 SIMD files compilation
+-if (${IS_X86_64_ARCH})
++if (NOT(${IS_X86_64_ARCH}))
+   message(
+     STATUS
+     "arch ${CMAKE_LIBRARY_ARCHITECTURE} does not match x86_64, "
+@@ -256,7 +267,7 @@ else()
+ endif()
+
+ if (${LIBSODIUM_FOUND})
+-  if (${IS_X86_64_ARCH})
++  if (NOT(${IS_X86_64_ARCH}))
+     message(
+       STATUS
+       "arch ${CMAKE_LIBRARY_ARCHITECTURE} does not match x86_64, "

diff --git a/dev-cpp/folly/folly-2022.08.08.00.ebuild b/dev-cpp/folly/folly-2022.08.08.00.ebuild
new file mode 100644
index 000000000000..2b7704b001fd
--- /dev/null
+++ b/dev-cpp/folly/folly-2022.08.08.00.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="An open-source C++ library developed and used at Facebook"
+HOMEPAGE="https://github.com/facebook/folly"
+SRC_URI="https://github.com/facebook/folly/releases/download/v${PV}/${PN}-v${PV}.tar.gz"
+S="${WORKDIR}"
+
+LICENSE="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="llvm-libunwind test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="app-arch/bzip2
+	app-arch/lz4:=
+	app-arch/snappy:=
+	app-arch/xz-utils
+	app-arch/zstd:=
+	dev-cpp/gflags:=
+	dev-cpp/glog:=[gflags]
+	dev-libs/boost:=[context,threads(+)]
+	dev-libs/double-conversion:=
+	dev-libs/libaio
+	dev-libs/libevent:=
+	dev-libs/libfmt:=
+	dev-libs/libsodium:=
+	dev-libs/openssl:=
+	sys-libs/liburing:=
+	sys-libs/zlib
+	llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+	!llvm-libunwind? ( sys-libs/libunwind:= )"
+# libiberty is linked statically
+DEPEND="${RDEPEND}
+	sys-libs/binutils-libs"
+BDEPEND="test? ( sys-devel/clang )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}"-2022.07.04.00-musl-fix.patch
+	"${FILESDIR}/${PN}"-2022.08.08.00-undefined-reference-fix.patch
+)
+
+pkg_setup() {
+	[[ ${BUILD_TYPE} == "binary" ]] && return
+
+	if use test && ! tc-is-clang ; then
+		# Always build w/ Clang for now to avoid gcc ICE
+		# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230
+		#if [[ $(gcc-major-version) -eq 12 ]] ; then
+		#	return
+		#fi
+
+		## Only older GCC 11 is broken
+		#if [[ $(gcc-major-version) -eq 11 && $(gcc-minor-version) -ge 3 && $(gcc-micro-version) -ge 1 ]] ; then
+		#	return
+		#fi
+
+		ewarn "Forcing build with Clang due to GCC bug (because tests are enabled)"
+		#ewarn "(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104008)"
+
+		export CC=${CHOST}-clang
+		export CXX=${CHOST}-clang++
+	fi
+}
+
+src_configure() {
+	# TODO: liburing could in theory be optional but fails to link
+
+	local mycmakeargs=(
+		-DLIB_INSTALL_DIR="$(get_libdir)"
+
+		-DBUILD_TESTS=$(usex test)
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+	local myctestargs=(
+		# - timeseries_histogram_test.TimeseriesHistogram.Percentile|HHWheelTimerTest
+		# Long-standing known test failure
+		# TODO: report upstream
+		# - HHWheelTimerTest.HHWheelTimerTest.CancelTimeout
+		# Timeouts are fragile
+		-E "(timeseries_histogram_test.TimeseriesHistogram.Percentile|HHWheelTimerTest.HHWheelTimerTest.CancelTimeout)"
+	)
+
+	cmake_src_test
+}


             reply	other threads:[~2022-08-13 15:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13 15:09 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-15 17:08 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/folly/files/, dev-cpp/folly/ Sam James
2023-01-21 21:57 Sam James
2023-06-02 12:40 Sam James
2023-06-24  6:32 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1660403339.f51bef9d5b01a1d7289732657b9e0a12e217fdb1.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox