0

I want to try the kernel-gallery, but can not successfully compile the examples on a fresh install of an debian10 system. I always the get the following error, when applying the steps in the readme:

error: failed to build archive: unexpected metadata version: 1 (Expected: 2)

The following warnings were emitted during compilation:

warning: In file included from /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/server.c:19: warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/bulk_addition.c:168:1: warning: suggest braces around initialization of subobject [-Wmissing-braces] warning: ADDITION_BTREE(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2) warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/bulk_addition.c:113:57: note: expanded from macro 'ADDITION_BTREE' warning: #define ADDITION_BTREE(prefix, ptype, bits, field, one) \ warning:
^ warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/bulk_addition.c:57:37: note: expanded from macro '\ warning: HEAD' warning: static const vec##bits zero = { 0 }; \ warning:
^ warning: In file included from /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/server.c:20: warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/multi_scalar.c:254:1: warning: suggest braces around initialization of subobject [-Wmissing-braces] warning: POINTS_MULT_WBITS_IMPL(blst_p1, POINTonE1, 384, fp, BLS12_381_Rx.p) warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/multi_scalar.c:170:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL' warning: static const ptype##_affine infinity = { 0 }; \ warning:
^ warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/multi_scalar.c:257:1: warning: suggest braces around initialization of subobject [-Wmissing-braces] warning: POINTS_MULT_WBITS_IMPL(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2) warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/multi_scalar.c:170:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL' warning: static const ptype##_affine infinity = { 0 }; \ warning:
^ warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/multi_scalar.c:257:1: warning: suggest braces around initialization of subobject [-Wmissing-braces] warning: POINTS_MULT_WBITS_IMPL(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2) warning: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/blst-0.3.10/blst/src/multi_scalar.c:170:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL' warning: static const ptype##_affine infinity = { 0 }; \ warning:
^ warning: 4 warnings generated.

error: could not compile blst due to previous error warning: build failed, waiting for other jobs to finish...

The Rust version I am using:

user@tezos-soru:~/kernel-gallery/00_debug_kernel$ rustc --version rustc 1.66.0 (69f9c33d7 2022-12-12) user@tezos-soru:~/kernel-gallery/00_debug_kernel$ rustup toolchain list 1.66.0-x86_64-unknown-linux-gnu (default) (override) user@tezos-soru:~/kernel-gallery/00_debug_kernel$

The clang version and output of clang -print-targets:

user@tezos-soru:~/kernel-gallery/00_debug_kernel$ clang --version clang version 7.0.1-8+deb10u2 (tags/RELEASE_701/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin

This version does not support "-print-targets". I also could not find a similar flag.

1 Answer 1

0

gcc is usually the default c-compiler on a lot of linux systems - you need to ensure that clang is used instead, either though export CC=clang or passing it directly when calling cargo: CC=clang cargo build ...

Clang needs to be at least v11 (minimum version we have tested with) to be able to pick up the wasm32 target

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.