From cb7be88a531a12e782e1e13c47f53ab7d5517433 Mon Sep 17 00:00:00 2001 From: Mikhail Iudin Date: Tue, 24 Sep 2024 14:20:08 +0200 Subject: [PATCH] GO-3980 Fix SIGSEGV in musl version --- rust/Cargo.toml | 6 +++--- rust/Makefile | 3 ++- typedef_unix32.go | 1 - typedef_unix64.go | 1 - typedef_win64.go | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index b7b909e..504f365 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tantivy-go" -version = "0.1.0" +version = "0.2.0" edition = "2021" build = "src/build.rs" @@ -8,11 +8,11 @@ build = "src/build.rs" crate-type = ["staticlib"] [build-dependencies] -cbindgen = "0.26.0" +cbindgen = "0.27.0" [dependencies] tantivy = "0.22.0" -cbindgen = "0.26.0" +cbindgen = "0.27.0" log = "0.4.21" base64 = "0.22.1" env_logger = "0.11.3" diff --git a/rust/Makefile b/rust/Makefile index 801be38..2100707 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -14,8 +14,9 @@ setup: @rustup target add x86_64-apple-darwin @rustup target add x86_64-pc-windows-gnu +# strange SIGSEGV at higher levels of optimization build-linux-amd64-musl: - env TARGET_CC=x86_64-linux-musl-gcc cargo build --release --target x86_64-unknown-linux-musl + env TARGET_CC=x86_64-linux-musl-gcc RUSTFLAGS='-C opt-level=1' cargo build --release --target x86_64-unknown-linux-musl install-linux-amd64-musl: build-linux-amd64-musl @mkdir -p ../libs/linux-amd64-musl diff --git a/typedef_unix32.go b/typedef_unix32.go index b392a9f..697518e 100644 --- a/typedef_unix32.go +++ b/typedef_unix32.go @@ -5,4 +5,3 @@ package tantivy_go import "C" type pointerCType = C.uint -type pointerGoType = uint64 diff --git a/typedef_unix64.go b/typedef_unix64.go index 980ed4f..0769d86 100644 --- a/typedef_unix64.go +++ b/typedef_unix64.go @@ -5,4 +5,3 @@ package tantivy_go import "C" type pointerCType = C.ulong -type pointerGoType = uint64 diff --git a/typedef_win64.go b/typedef_win64.go index cf61d5a..f5c7031 100644 --- a/typedef_win64.go +++ b/typedef_win64.go @@ -5,4 +5,3 @@ package tantivy_go import "C" type pointerCType = C.ulonglong -type pointerGoType = uint64