Skip to contentSkip to conversation

rocksdb: Exclude on ppc/musl

PATCH New Khem Raj 1 participant 6 messages Mar 27, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/6 rocksdb: Exclude on ppc/musl

Needs porting

---
 meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 1 +
 meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb              | 4 ++++
 2 files changed, 5 insertions(+)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -0
index a74fe0e9d0..6e001ce1f3 100644
@@ -223,6 +223,7 @@ RDEPENDS:packagegroup-meta-oe-dbs ="\
     soci \
     sqlite \
 "
+RDEPENDS:packagegroup-meta-oe-dbs:remove:libc-musl:powerpc = "rocksdb"
 
 RDEPENDS:packagegroup-meta-oe-dbs-python2 ="\
     ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', 'mysql-python', '', d), "", d)} \
meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb +4 -0
index 205ae1dfc9..2ad2d38a53 100644
@@ -52,3 +52,7 @@ do_install:append() {
 }
 
 LDFLAGS:append:riscv64 = " -pthread"
+
+# Need toku_time_now() implemented for ppc/musl
+# see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
+COMPATIBLE_HOST:libc-musl:powerpc = "null"
Signature · 1 line
2.35.1
author
#1 lore raw

PATCH 2/6 gsl: Disable on musl/ppc

---
 meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 1 +
 meta-oe/recipes-support/gsl/gsl.inc                        | 3 +++
 2 files changed, 4 insertions(+)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -0
index 6e001ce1f3..08d9e91704 100644
@@ -951,6 +951,7 @@ RDEPENDS:packagegroup-meta-oe-support:remove:riscv32 = "gperftools uim"
 RDEPENDS:packagegroup-meta-oe-support:remove:powerpc = "ssiapi tbb"
 RDEPENDS:packagegroup-meta-oe-support:remove:powerpc64le = "ssiapi"
 RDEPENDS:packagegroup-meta-oe-support:remove:libc-musl = "pcp"
+RDEPENDS:packagegroup-meta-oe-support:remove:libc-musl:powerpc = "gsl"
 
 RDEPENDS:packagegroup-meta-oe-test ="\
     bats \
meta-oe/recipes-support/gsl/gsl.inc +3 -0
index 0dd197efa4..d0fa9344eb 100644
@@ -7,3 +7,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 inherit autotools pkgconfig binconfig
 
 LEAD_SONAME = "libgsl.so"
+
+# Uses fpu_control.h which is glibc only header see ieee-utils/fp-gnuppc.c
+COMPATIBLE_HOST:libc-musl:powerpc = "null"
Signature · 1 line
2.35.1
author
#2 lore raw

PATCH 3/6 a2jmidid: Fix build on ppc/musl

In reply to Khem Raj
---
 .../jack/a2jmidid/ppc_musl_ucontext.patch     | 19 +++++++++++++++++++
 meta-oe/recipes-multimedia/jack/a2jmidid_9.bb |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta-oe/recipes-multimedia/jack/a2jmidid/ppc_musl_ucontext.patch
meta-oe/recipes-multimedia/jack/a2jmidid/ppc_musl_ucontext.patch new file +19 -0
new file mode 100644
index 0000000000..1fa64812ef
@@ -0,0 +1,19 @@
+Add musl/ppc mcontext differences specific checks to choose
+correct gregs and context structure definitions
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/sigsegv.c
++++ b/sigsegv.c
+@@ -95,7 +95,11 @@ static void signal_segv(int signum, sigi
+     for(i = 0; i < NGREG; i++)
+         a2j_error("reg[%02d]       = 0x" REGFORMAT, i,
+ #if defined(__powerpc__) && !defined(__powerpc64__)
++# if defined(__GLIBC__)
+                 ucontext->uc_mcontext.uc_regs[i]
++# else
++                ucontext->uc_regs->gregs[i]
++# endif
+ #elif defined(__powerpc64__)
+                 ucontext->uc_mcontext.gp_regs[i]
+ #elif defined(__sparc__) && defined(__arch64__)
meta-oe/recipes-multimedia/jack/a2jmidid_9.bb +1 -0
index 339145dd0c..bfdf26ed46 100644
@@ -13,6 +13,7 @@ SRCREV = "de37569c926c5886768f892c019e3f0468615038"
 SRC_URI = " \
     git://github.com/linuxaudio/a2jmidid;protocol=https;branch=master \
     file://riscv_ucontext.patch \
+    file://ppc_musl_ucontext.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.35.1
author
#3 lore raw

PATCH 4/6 abseil-cpp: Fix ppc/musl patch

In reply to Khem Raj

typecasting to pt_regs is not needed

---
 .../abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch                | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/abseil-ppc-fixes.patch +1 -1
index e8048fe940..95210565c2 100644
@@ -62,7 +62,7 @@ Signed-off-by: Khem Raj <[email protected]>
 +#elif defined(__powerpc__) && defined(__GLIBC__)
      return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]);
 +#elif defined(__powerpc__)
-+    return reinterpret_cast<void*>(((struct pt_regs *)context->uc_regs)->gregs[32]);
++    return reinterpret_cast<void*>((context->uc_regs)->gregs[32]);
  #elif defined(__riscv)
      return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
  #elif defined(__s390__) && !defined(__s390x__)
Signature · 1 line
2.35.1
author
#4 lore raw

PATCH 5/6 gperftools: Disable cpu profiles for ppc/musl

In reply to Khem Raj

Enable heap profiler and heap checker for ppc64/musl as it works now

---
 meta-oe/recipes-support/gperftools/gperftools_2.9.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-oe/recipes-support/gperftools/gperftools_2.9.1.bb +2 -1
index bd42e7c4ec..d056622b2b 100644
@@ -39,7 +39,8 @@ COMPATIBLE_HOST:riscv32 = "null"
 ARM_INSTRUCTION_SET:armv5 = "arm"
 ARM_INSTRUCTION_SET:toolchain-clang:arm = "arm"
 
-EXTRA_OECONF:append:libc-musl:powerpc64le = " --disable-cpu-profiler --disable-heap-profiler --disable-heap-checker"
+EXTRA_OECONF:append:libc-musl:powerpc64le = " --disable-cpu-profiler"
+EXTRA_OECONF:append:libc-musl:powerpc = " --disable-cpu-profiler"
 PACKAGECONFIG ?= "libunwind static"
 PACKAGECONFIG:remove:arm:libc-musl = "libunwind"
 PACKAGECONFIG:remove:riscv64 = "libunwind"
Signature · 1 line
2.35.1
author
#5 lore raw

PATCH 6/6 pmdk: Fix build with newer ndctl

In reply to Khem Raj
---
 ...axctl.h-instead-of-ndctl-libdaxctl.h.patch | 69 +++++++++++++++++++
 meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb  |  3 +-
 2 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/pmdk/pmdk/0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch
meta-oe/recipes-extended/pmdk/pmdk/0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch new file +69 -0
new file mode 100644
index 0000000000..0b03ffdea5
@@ -0,0 +1,69 @@
+From 932252c0ba54a51c8bcf58b747656e29cdebfa6a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 26 Mar 2022 13:06:50 -0700
+Subject: [PATCH] use daxctl/libdaxctl.h instead of ndctl/libdaxctl.h
+
+Upstream-Status: Submitted [https://github.com/pmem/pmdk/pull/5413]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/libpmem2/badblocks_ndctl.c        | 2 +-
+ src/libpmem2/region_namespace_ndctl.c | 2 +-
+ src/libpmem2/usc_ndctl.c              | 2 +-
+ src/tools/daxio/daxio.c               | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/libpmem2/badblocks_ndctl.c b/src/libpmem2/badblocks_ndctl.c
+index 9a5910bba..cc637f7f4 100644
+--- a/src/libpmem2/badblocks_ndctl.c
++++ b/src/libpmem2/badblocks_ndctl.c
+@@ -16,7 +16,7 @@
+ #include <sys/sysmacros.h>
+ #include <fcntl.h>
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ 
+ #include "libpmem2.h"
+ #include "pmem2_utils.h"
+diff --git a/src/libpmem2/region_namespace_ndctl.c b/src/libpmem2/region_namespace_ndctl.c
+index 1383796a9..e31185984 100644
+--- a/src/libpmem2/region_namespace_ndctl.c
++++ b/src/libpmem2/region_namespace_ndctl.c
+@@ -6,7 +6,7 @@
+  */
+ 
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ #include <sys/sysmacros.h>
+ #include <fcntl.h>
+ 
+diff --git a/src/libpmem2/usc_ndctl.c b/src/libpmem2/usc_ndctl.c
+index be63e879b..c58032a83 100644
+--- a/src/libpmem2/usc_ndctl.c
++++ b/src/libpmem2/usc_ndctl.c
+@@ -5,7 +5,7 @@
+  * usc_ndctl.c -- pmem2 usc function for platforms using ndctl
+  */
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ #include <sys/types.h>
+ #include <sys/sysmacros.h>
+ #include <fcntl.h>
+diff --git a/src/tools/daxio/daxio.c b/src/tools/daxio/daxio.c
+index 66cd0b7ae..7f2c89d48 100644
+--- a/src/tools/daxio/daxio.c
++++ b/src/tools/daxio/daxio.c
+@@ -21,7 +21,7 @@
+ #include <string.h>
+ 
+ #include <ndctl/libndctl.h>
+-#include <ndctl/libdaxctl.h>
++#include <daxctl/libdaxctl.h>
+ #include <libpmem.h>
+ 
+ #include "util.h"
+-- 
+2.35.1
+
meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb +2 -1
index 4354c83371..33d04099c9 100644
@@ -11,7 +11,8 @@ DEPENDS:append:libc-musl = " fts"
 
 S = "${WORKDIR}/git"
 
-SRC_URI = "git://github.com/pmem/pmdk.git;branch=stable-1.11;protocol=https"
+SRC_URI = "git://github.com/pmem/pmdk.git;branch=stable-1.11;protocol=https \
+           file://0001-use-daxctl-libdaxctl.h-instead-of-ndctl-libdaxctl.h.patch"
 SRCREV = "5b21904a257eff47f2e87fcbf2de46111f03ddd8"
 
 inherit autotools-brokensep pkgconfig
Signature · 1 line
2.35.1