From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 110D7158094 for ; Sat, 9 Jul 2022 04:56:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30B75E08CD; Sat, 9 Jul 2022 04:56:44 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 110B2E08CD for ; Sat, 9 Jul 2022 04:56:44 +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 EB87D340D83 for ; Sat, 9 Jul 2022 04:56:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8398D391 for ; Sat, 9 Jul 2022 04:56:41 +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: <1657342571.5ca83cbca717c9d04ffa46f9a7fce31fe32b2d95.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/hpx/, sys-cluster/hpx/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-cluster/hpx/files/hpx-1.8.0-fix-musl-exec_pagesize-not-defined.patch sys-cluster/hpx/files/hpx-1.8.0-fix-musl-execinfo.patch sys-cluster/hpx/files/hpx-1.8.0-fix-musl-rtdl-not-declared.patch sys-cluster/hpx/hpx-1.8.0.ebuild X-VCS-Directories: sys-cluster/hpx/files/ sys-cluster/hpx/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 5ca83cbca717c9d04ffa46f9a7fce31fe32b2d95 X-VCS-Branch: master Date: Sat, 9 Jul 2022 04:56:41 +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: 87093ef6-87ce-41cb-a9e0-bc9f14ad94f2 X-Archives-Hash: d23ea4d68a087ec0f754c400af1f45a4 commit: 5ca83cbca717c9d04ffa46f9a7fce31fe32b2d95 Author: brahmajit das gmail com> AuthorDate: Sat Jul 9 04:40:04 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jul 9 04:56:11 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ca83cbc sys-cluster/hpx: Fix building on musl These patches fixes building on musl. I've tried to document the patches to the best of my abilities. Mainly fixes the RTLD_DI_ORIGIN not being present in musl. However with this PR [1] we won't be requiring these patches anymore from 1.8.1 [1]: https://github.com/STEllAR-GROUP/hpx/pull/5947 Closes: https://bugs.gentoo.org/829242 Signed-off-by: brahmajit das gmail.com> Closes: https://github.com/gentoo/gentoo/pull/26281 Signed-off-by: Sam James gentoo.org> ...-1.8.0-fix-musl-exec_pagesize-not-defined.patch | 47 ++++++++++++++++++++++ .../hpx/files/hpx-1.8.0-fix-musl-execinfo.patch | 16 ++++++++ .../hpx-1.8.0-fix-musl-rtdl-not-declared.patch | 25 ++++++++++++ sys-cluster/hpx/hpx-1.8.0.ebuild | 3 ++ 4 files changed, 91 insertions(+) diff --git a/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-exec_pagesize-not-defined.patch b/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-exec_pagesize-not-defined.patch new file mode 100644 index 000000000000..d2e54b9df256 --- /dev/null +++ b/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-exec_pagesize-not-defined.patch @@ -0,0 +1,47 @@ +# EXEC_PAGESIZE is a preprocessor macro from the Linux Kernel headers. Include +# the appropriate Linux header file +# +# With this PR https://github.com/STEllAR-GROUP/hpx/pull/5947 merged, from +# 1.8.1 we can drop these patches +--- a/components/performance_counters/memory/src/mem_counter_linux.cpp ++++ b/components/performance_counters/memory/src/mem_counter_linux.cpp +@@ -14,6 +14,11 @@ + #include + #include + ++// Fix for musl. Use linux/param.h for EXEC_PAGESIZE ++#ifdef __linux__ ++#include ++#endif ++ + #include + #include + +--- a/libs/core/coroutines/include/hpx/coroutines/detail/context_linux_x86.hpp ++++ b/libs/core/coroutines/include/hpx/coroutines/detail/context_linux_x86.hpp +@@ -37,6 +37,11 @@ + #include + #include + ++// Fix for musl. Use linux/param.h for EXEC_PAGESIZE ++#ifdef __linux__ ++#include ++#endif ++ + #if defined(HPX_HAVE_STACKOVERFLOW_DETECTION) + + #include +--- a/libs/core/coroutines/include/hpx/coroutines/detail/posix_utility.hpp ++++ b/libs/core/coroutines/include/hpx/coroutines/detail/posix_utility.hpp +@@ -67,6 +67,11 @@ + #define EXEC_PAGESIZE static_cast(sysconf(_SC_PAGESIZE)) + #endif + ++// Fix for musl. Use linux/param.h for EXEC_PAGESIZE ++#ifdef __linux__ ++#include ++#endif ++ + /** + * Stack allocation routines and trampolines for setcontext + */ diff --git a/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-execinfo.patch b/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-execinfo.patch new file mode 100644 index 000000000000..4c82ca3f6be1 --- /dev/null +++ b/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-execinfo.patch @@ -0,0 +1,16 @@ +# Check for execinfo only on glibc and ulibc systems. +# +# With this PR https://github.com/STEllAR-GROUP/hpx/pull/5947 merged, from +# 1.8.1 we can drop these patches +--- a/libs/core/debugging/src/backtrace.cpp ++++ b/libs/core/debugging/src/backtrace.cpp +@@ -19,7 +19,9 @@ + + #if (defined(__linux) || defined(__APPLE__) || defined(__sun)) && \ + (!defined(__ANDROID__) || !defined(ANDROID)) ++#if defined(__GLIBC__) + #define HPX_HAVE_EXECINFO ++#endif + #define HPX_HAVE_DLFCN + #if defined(__GNUC__) && !defined(__clang__) + #define HPX_HAVE_UNWIND diff --git a/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-rtdl-not-declared.patch b/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-rtdl-not-declared.patch new file mode 100644 index 000000000000..0264aeab52f5 --- /dev/null +++ b/sys-cluster/hpx/files/hpx-1.8.0-fix-musl-rtdl-not-declared.patch @@ -0,0 +1,25 @@ +# RTLD_DI_ORIGIN is not defined in musl as a result hpx fails to build. +# Closes: https://bugs.gentoo.org/829242 +# +# With this PR https://github.com/STEllAR-GROUP/hpx/pull/5947 merged, from +# 1.8.1 we can drop these patches +--- a/libs/core/plugin/include/hpx/plugin/detail/dll_dlopen.hpp ++++ b/libs/core/plugin/include/hpx/plugin/detail/dll_dlopen.hpp +@@ -319,6 +319,7 @@ namespace hpx { namespace util { namespace plugin { + std::string result; + + #if !defined(__ANDROID__) && !defined(ANDROID) && !defined(__APPLE__) ++#if defined(RTLD_DI_ORIGIN) + char directory[PATH_MAX] = {'\0'}; + const_cast(*this).LoadLibrary(ec); + if (!ec && ::dlinfo(dll_handle, RTLD_DI_ORIGIN, directory) < 0) +@@ -333,6 +334,9 @@ namespace hpx { namespace util { namespace plugin { + } + result = directory; + ::dlerror(); // Clear the error state. ++#else ++ result = path(dll_name).parent_path().string(); ++#endif + #elif defined(__APPLE__) + // SO staticfloat's solution + const_cast(*this).LoadLibrary(ec); diff --git a/sys-cluster/hpx/hpx-1.8.0.ebuild b/sys-cluster/hpx/hpx-1.8.0.ebuild index a1b86f1f953f..118e080a1120 100644 --- a/sys-cluster/hpx/hpx-1.8.0.ebuild +++ b/sys-cluster/hpx/hpx-1.8.0.ebuild @@ -47,6 +47,9 @@ DEPEND="${RDEPEND}" PATCHES=( "${FILESDIR}/${P}-python.patch" + "${FILESDIR}/${P}-fix-musl-exec_pagesize-not-defined.patch" + "${FILESDIR}/${P}-fix-musl-execinfo.patch" + "${FILESDIR}/${P}-fix-musl-rtdl-not-declared.patch" ) hpx_memory_requirement() {