Package Details: synapse-compress-state 0.1.4-1

Git Clone URL: https://aur.archlinux.org/synapse-compress-state.git (read-only, click to copy)
Package Base: synapse-compress-state
Description: A tool to compress some state in a Synapse instance's database
Upstream URL: https://github.com/matrix-org/rust-synapse-compress-state
Licenses: Apache
Submitter: BrainDamage
Maintainer: BrainDamage
Last Packager: BrainDamage
Votes: 2
Popularity: 0.000000
First Submitted: 2020-12-30 00:00 (UTC)
Last Updated: 2024-04-18 15:08 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

nachfuellbar commented on 2024-05-10 09:36 (UTC)

Since 0.1.4 i can't build this anymore - are the dependencies complete? Here are some of my errors but there are many more of the _rjem_XXX undefined reference errors

          /usr/bin/ld: /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tikv-jemallocator-0.5.4/src/lib.rs:138:(.text.__rust_realloc+0x35): undefined reference to `_rjem_realloc'
          /usr/bin/ld: /tmp/tmp.ThilvNZKqO/src/rust-synapse-compress-state-0.1.4/target/release/deps/synapse_compress_state-9405a9994b72b62e.synapse_compress_state.60a1a765f1310484-cgu.3.rcgu.o: in function `<tikv_jemallocator::Jemalloc as core::alloc::global::GlobalAlloc>::alloc_zeroed':
          /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tikv-jemallocator-0.5.4/src/lib.rs:119:(.text.__rust_alloc_zeroed+0x29): undefined reference to `_rjem_mallocx'
          /usr/bin/ld: /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tikv-jemallocator-0.5.4/src/lib.rs:117:(.text.__rust_alloc_zeroed+0x3d): undefined reference to `_rjem_calloc'
          collect2: error: ld returned 1 exit status

marcool04 commented on 2024-05-09 12:47 (UTC)

I think when implementing the advice from @xiretza this line: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=synapse-compress-state#n24 may have been left behind inadvertently. Currently this is building twice...

xiretza commented on 2022-04-25 12:20 (UTC)

There are a couple problems with this package, see the Rust Package Guidelines: https://wiki.archlinux.org/title/Rust_package_guidelines

Here's a patch which also installs the new synapse_auto_compressor binary in 0.1.2:

diff --git a/PKGBUILD b/PKGBUILD
index 663ece2..7150e03 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,41 @@
 # Maintainer: BrainDamage

 pkgname=synapse-compress-state
-pkgver=0.1.0
-pkgrel=2
+pkgver=0.1.2
+pkgrel=1
 pkgdesc="A tool to compress some state in a Synapse instance's database "
 arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
 url="https://github.com/matrix-org/rust-synapse-compress-state"
-makedepends=('rust')
+makedepends=('rust' 'python')
+depends=('gcc-libs' 'openssl')
 license=('Apache')
 source=("${pkgname}-${pkgver}::https://github.com/matrix-org/rust-synapse-compress-state/archive/v${pkgver}.tar.gz")
-sha256sums=('ac57d264a99157174cfb6564cb12ef9453229ec5771e57cd990f3eb78efdb1b1')
+sha256sums=('e8cd1933545fc4d97e5f68d7da242fba53ab642869937e4fb65f4ba39ddc8fab')
+
+prepare() {
+       cd "${srcdir}/rust-${pkgname}-${pkgver}"
+
+       cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}

 build() {
        cd "${srcdir}/rust-${pkgname}-${pkgver}"
-       cargo build --release --locked
+
+       export RUSTUP_TOOLCHAIN=stable
+       export CARGO_TARGET_DIR=target
+       cargo build --workspace --frozen --release --all-features
+}
+
+check() {
+       cd "${srcdir}/rust-${pkgname}-${pkgver}"
+
+       export RUSTUP_TOOLCHAIN=stable
+       cargo test --workspace --exclude compressor_integration_tests --frozen --all-features
 }

 package() {
-  cargo install --locked --path "${srcdir}/rust-${pkgname}-${pkgver}" --root "${pkgdir}/usr"
-  # delete the leftover crates file
-  rm -f "${pkgdir}/usr/.crates.toml" "${pkgdir}/usr/.crates2.toml"
+       cd "${srcdir}/rust-${pkgname}-${pkgver}"
+
+       install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/synapse_compress_state"
+       install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/synapse_auto_compressor"
 }

BrainDamage commented on 2022-04-23 11:28 (UTC)

I don't have much insight to offer, especially since here it works (tested right now with an empty cache).

Perhaps try deleting the ~/.cargo cache and let it recreate.

luntik2012 commented on 2022-04-23 08:11 (UTC)

  ar: `u' modifier ignored since `D' is the default (see `U')
  ar: unable to copy file 'lib/libjemalloc_pic.a'; reason: Success
  make: *** [Makefile:395: lib/libjemalloc_pic.a] Error 1
  make: *** Waiting for unfinished jobs....
  thread 'main' panicked at 'command did not execute successfully: "make" "srcroot=../jemalloc/" "-j" "2"
  expected success, got: exit status: 2', /home/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2/build.rs:392:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
==> ERROR: A failure occurred in build().