From 231b33ecd9777039ea9c74b0a42fd7d909707799 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 20 Nov 2024 11:20:49 +0100 Subject: [PATCH 1/5] Fix krb5 transitive dependency cross build --- .github/actions/cross-build-binary/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/cross-build-binary/action.yml b/.github/actions/cross-build-binary/action.yml index 30b68da1023..d8c3bc50a02 100644 --- a/.github/actions/cross-build-binary/action.yml +++ b/.github/actions/cross-build-binary/action.yml @@ -43,7 +43,10 @@ runs: QW_COMMIT_DATE: ${{ env.QW_COMMIT_DATE }} QW_COMMIT_HASH: ${{ env.QW_COMMIT_HASH }} QW_COMMIT_TAGS: ${{ env.QW_COMMIT_TAGS }} - + # Fix build for transitive dependency rdkafka -> rdkafka-sys -> sasl2-sys -> krb5-src + KRB5_CV_ATTR_CONSTRUCTOR_DESTRUCTOR: yes + AC_CV_FUNC_REGCOMP: yes + AC_CV_PRINTF_POSITIONAL: yes working-directory: ./quickwit - name: Bundle archive run: | From e1537fe9d261fc9e65bcc9672d350b2ea8da3a67 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 20 Nov 2024 11:39:55 +0100 Subject: [PATCH 2/5] Specify env flags in Cross.toml --- .github/actions/cross-build-binary/action.yml | 4 ---- quickwit/Cross.toml | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/cross-build-binary/action.yml b/.github/actions/cross-build-binary/action.yml index d8c3bc50a02..d1916325d78 100644 --- a/.github/actions/cross-build-binary/action.yml +++ b/.github/actions/cross-build-binary/action.yml @@ -43,10 +43,6 @@ runs: QW_COMMIT_DATE: ${{ env.QW_COMMIT_DATE }} QW_COMMIT_HASH: ${{ env.QW_COMMIT_HASH }} QW_COMMIT_TAGS: ${{ env.QW_COMMIT_TAGS }} - # Fix build for transitive dependency rdkafka -> rdkafka-sys -> sasl2-sys -> krb5-src - KRB5_CV_ATTR_CONSTRUCTOR_DESTRUCTOR: yes - AC_CV_FUNC_REGCOMP: yes - AC_CV_PRINTF_POSITIONAL: yes working-directory: ./quickwit - name: Bundle archive run: | diff --git a/quickwit/Cross.toml b/quickwit/Cross.toml index d0392c714e0..00f858be4b4 100644 --- a/quickwit/Cross.toml +++ b/quickwit/Cross.toml @@ -18,3 +18,7 @@ image = "quickwit/cross:aarch64-unknown-linux-gnu" [target.aarch64-unknown-linux-musl] image = "quickwit/cross:aarch64-unknown-linux-musl" linker = "aarch64-linux-musl-gcc" + +[target.aarch64-unknown-linux-musl.env] +# Fix build for transitive dependency rdkafka -> rdkafka-sys -> sasl2-sys -> krb5-src +passthrough = ["KRB5_CV_ATTR_CONSTRUCTOR_DESTRUCTOR=yes", "AC_CV_FUNC_REGCOMP=yes", "AC_CV_PRINTF_POSITIONAL=yes"] From 0e8c5f5f456e7a8b401e2d7d1f23c950f13b0038 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 20 Nov 2024 11:57:25 +0100 Subject: [PATCH 3/5] Change fix target to gnu instead of musl --- quickwit/Cross.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/quickwit/Cross.toml b/quickwit/Cross.toml index 00f858be4b4..98c16aa66ad 100644 --- a/quickwit/Cross.toml +++ b/quickwit/Cross.toml @@ -15,10 +15,11 @@ RUSTFLAGS="LIB_LDFLAGS=-L/usr/lib/x86_64-linux-gnu CFLAGS=-I/usr/local/musl/incl [target.aarch64-unknown-linux-gnu] image = "quickwit/cross:aarch64-unknown-linux-gnu" +[target.aarch64-unknown-linux-gnu.env] +# Fix build for transitive dependency rdkafka -> rdkafka-sys -> sasl2-sys -> krb5-src +# Introduced by https://github.com/MaterializeInc/rust-krb5-src/pull/27 +passthrough = ["KRB5_CV_ATTR_CONSTRUCTOR_DESTRUCTOR=yes", "AC_CV_FUNC_REGCOMP=yes", "AC_CV_PRINTF_POSITIONAL=yes"] + [target.aarch64-unknown-linux-musl] image = "quickwit/cross:aarch64-unknown-linux-musl" linker = "aarch64-linux-musl-gcc" - -[target.aarch64-unknown-linux-musl.env] -# Fix build for transitive dependency rdkafka -> rdkafka-sys -> sasl2-sys -> krb5-src -passthrough = ["KRB5_CV_ATTR_CONSTRUCTOR_DESTRUCTOR=yes", "AC_CV_FUNC_REGCOMP=yes", "AC_CV_PRINTF_POSITIONAL=yes"] From a79ea73dcb0f2133dd7d91c1bb320eb88d67d504 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 20 Nov 2024 12:10:16 +0100 Subject: [PATCH 4/5] Remove deprecated Cross configurations --- quickwit/Cross.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/quickwit/Cross.toml b/quickwit/Cross.toml index 98c16aa66ad..e75490a206e 100644 --- a/quickwit/Cross.toml +++ b/quickwit/Cross.toml @@ -10,7 +10,6 @@ image = "quickwit/cross:x86_64-unknown-linux-gnu" [target.x86_64-unknown-linux-musl] image = "quickwit/cross:x86_64-unknown-linux-musl" -RUSTFLAGS="LIB_LDFLAGS=-L/usr/lib/x86_64-linux-gnu CFLAGS=-I/usr/local/musl/include CC=musl-gcc" [target.aarch64-unknown-linux-gnu] image = "quickwit/cross:aarch64-unknown-linux-gnu" @@ -22,4 +21,3 @@ passthrough = ["KRB5_CV_ATTR_CONSTRUCTOR_DESTRUCTOR=yes", "AC_CV_FUNC_REGCOMP=ye [target.aarch64-unknown-linux-musl] image = "quickwit/cross:aarch64-unknown-linux-musl" -linker = "aarch64-linux-musl-gcc" From 18880ec71621ee87aa52e90e9f6f61eff67b9237 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 20 Nov 2024 12:27:14 +0100 Subject: [PATCH 5/5] Fix variable case --- quickwit/Cross.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickwit/Cross.toml b/quickwit/Cross.toml index e75490a206e..89139a76aa4 100644 --- a/quickwit/Cross.toml +++ b/quickwit/Cross.toml @@ -17,7 +17,11 @@ image = "quickwit/cross:aarch64-unknown-linux-gnu" [target.aarch64-unknown-linux-gnu.env] # Fix build for transitive dependency rdkafka -> rdkafka-sys -> sasl2-sys -> krb5-src # Introduced by https://github.com/MaterializeInc/rust-krb5-src/pull/27 -passthrough = ["KRB5_CV_ATTR_CONSTRUCTOR_DESTRUCTOR=yes", "AC_CV_FUNC_REGCOMP=yes", "AC_CV_PRINTF_POSITIONAL=yes"] +passthrough = [ + "krb5_cv_attr_constructor_destructor=yes", + "ac_cv_func_regcomp=yes", + "ac_cv_printf_positional=yes", +] [target.aarch64-unknown-linux-musl] image = "quickwit/cross:aarch64-unknown-linux-musl"