Disable jmalloc when building rocksdb
Description:
rocksdb using jemalloc was surprising to me, as it's not used by any other C++-libraries on arch that I have otherwise used, and it's not a decision that makes much sense to make at build time for a shared-library.
It causes trouble with python-extension modules that use it (see https://github.com/jemalloc/jemalloc/issues/955), and it's not the default on other distros. Fedora builds rocksdb with cmake and there jemalloc is off by default (https://src.fedoraproject.org/rpms/rocksdb/blob/rawhide/f/rocksdb.spec#_72 and https://github.com/facebook/rocksdb/blob/main/CMakeLists.txt#L67) for what it's worth.
Suggested patch:
From 5ca1a4825f5d1ed8490e3130b1281883ba989a73 Mon Sep 17 00:00:00 2001
From: John Eivind Helset <private@jehelset.no>
Date: Wed, 6 Mar 2024 17:41:46 +0100
Subject: [PATCH] Disable jemalloc.
---
PKGBUILD | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
index c557660..472b0ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,14 +8,14 @@ pkgdesc='Embedded key-value store for fast storage'
arch=(x86_64)
url="https://rocksdb.org/"
license=(GPL2 Apache)
-depends=(bzip2 jemalloc lz4 snappy zlib zstd tbb liburing)
+depends=(bzip2 lz4 snappy zlib zstd tbb liburing)
makedepends=(python)
source=(rocksdb-$pkgver.tar.gz::https://github.com/facebook/rocksdb/archive/v$pkgver.tar.gz)
sha256sums=('cdb2fc3c6a556f20591f564cb8e023e56828469aa3f76e1d9535c443ba1f0c1a')
build() {
cd rocksdb-$pkgver
- PORTABLE=1 USE_RTTI=1 make shared_lib
+ DISABLE_JEMALLOC=1 PORTABLE=1 USE_RTTI=1 make shared_lib
}
check() {
--
2.44.0