deedy5/primp

Error related to boringssl? when building manylinux2014 compliant wheel [ppc64le]

Closed this issue · 2 comments

I'm trying to build a manylinux2014 compliant wheel for ppc64le arch but facing an issue. This is the setup:

docker run -ti --rm quay.io/pypa/manylinux2014_ppc64le

#Setup rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"

export rel=v0.6.2
export ver=cp311-cp311

pipx install maturin
git clone -b ${rel} --recursive https://github.com/deedy5/primp.git && cd primp
/opt/python/${ver}/bin/python3 -m build --wheel

At the end of the build I'm seeing this error which related to boringssl I guess?:

[...]
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h: In function ‘constant_time_select_8’:
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:462:20: warning: implicit declaration of function ‘constant_time_select_w’; did you mean ‘constant_time_select_8’? [-Wimplicit-function-declaration]
    462 |   return (uint8_t)(constant_time_select_w(mask, a, b));
        |                    ^~~~~~~~~~~~~~~~~~~~~~
        |                    constant_time_select_8
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h: At top level:
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:467:44: error: unknown type name ‘crypto_word_t’
    467 | static inline int constant_time_select_int(crypto_word_t mask, int a, int b) {
        |                                            ^~~~~~~~~~~~~
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:492:15: error: unknown type name ‘crypto_word_t’
    492 | static inline crypto_word_t constant_time_declassify_w(crypto_word_t v) {
        |               ^~~~~~~~~~~~~
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:492:56: error: unknown type name ‘crypto_word_t’
    492 | static inline crypto_word_t constant_time_declassify_w(crypto_word_t v) {
        |                                                        ^~~~~~~~~~~~~
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:943:15: error: unknown type name ‘crypto_word_t’
    943 | static inline crypto_word_t CRYPTO_load_word_le(const void *in) {
        |               ^~~~~~~~~~~~~
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h: In function ‘CRYPTO_load_word_le’:
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:944:3: error: unknown type name ‘crypto_word_t’
    944 |   crypto_word_t v;
        |   ^~~~~~~~~~~~~
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h: At top level:
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:949:52: error: unknown type name ‘crypto_word_t’
    949 | static inline void CRYPTO_store_word_le(void *out, crypto_word_t v) {
        |                                                    ^~~~~~~~~~~~~
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:953:15: error: unknown type name ‘crypto_word_t’
    953 | static inline crypto_word_t CRYPTO_load_word_be(const void *in) {
        |               ^~~~~~~~~~~~~
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h: In function ‘CRYPTO_load_word_be’:
  /primp/target/release/build/rboring-sys-05788d3fddd7b3c9/out/boringssl/src/crypto/asn1/../internal.h:954:3: error: unknown type name ‘crypto_word_t’
    954 |   crypto_word_t v;
        |   ^~~~~~~~~~~~~
  gmake[3]: *** [CMakeFiles/crypto.dir/src/crypto/asn1/tasn_utl.c.o] Error 1
  gmake[2]: *** [CMakeFiles/crypto.dir/all] Error 2
  gmake[1]: *** [CMakeFiles/ssl.dir/rule] Error 2
  gmake: *** [ssl] Error 2
  thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:1100:5:

  command did not execute successfully, got: exit status: 2

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.11-64bit" PYO3_PYTHON="/tmp/build-env-r755gak8/bin/python" PYTHON_SYS_EXECUTABLE="/tmp/build-env-r755gak8/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/primp/Cargo.toml" "--release" "--lib"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/build-env-r755gak8/bin/python', '--compatibility', 'off'] returned non-zero exit status 1

ERROR Backend subprocess exited when trying to invoke build_wheel

Hope to get some help on this one :)

You can ask in upstream package: https://github.com/penumbra-x/boring

You can refer to the following GitHub Actions to configure your build environment:

https://github.com/penumbra-x/rquest/blob/main/.github/compilation-guide/build.yml