You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is more of a reminder to go back and possibly do a more in-depth analysis of why UI tests do not work in musl environments.
In particular, the UI tests seem to be failing with attempting to dynamically loaded libraries:
running 1 test
Compiling pgrx-pg-sys v0.10.0-beta.1 (/checkout/pgrx-pg-sys)
error: failed to run custom build command for `pgrx-pg-sys v0.10.0-beta.1 (/checkout/pgrx-pg-sys)`
Caused by:
process didn't exit successfully: `/checkout/target/tests/trybuild/debug/build/pgrx-pg-sys-6668251dbe05f204/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=PGRX_BUILD_VERBOSE
cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE
cargo:rerun-if-env-changed=PGRX_PG_CONFIG_PATH
cargo:rerun-if-env-changed=PGRX_PG_CONFIG_AS_ENV
cargo:rerun-if-env-changed=LLVM_CONFIG_PATH
cargo:rerun-if-env-changed=LIBCLANG_PATH
cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_musl
cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE
cargo:rerun-if-changed=include
cargo:rerun-if-changed=cshim
cargo:rerun-if-changed=/home/rust/.pgrx/config.toml
cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE
cargo:rerun-if-env-changed=PGRX_TARGET_INFO_PATH_PG14_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=PGRX_TARGET_INFO_PATH_PG14
cargo:rerun-if-env-changed=PGRX_INCLUDEDIR_SERVER_PG14_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=PGRX_INCLUDEDIR_SERVER_PG14
cargo:rerun-if-env-changed=PGRX_INCLUDEDIR_SERVER_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=PGRX_INCLUDEDIR_SERVER
cargo:rerun-if-env-changed=PGRX_BINDGEN_NO_DETECT_INCLUDES_x86_64-unknown-linux-musl
cargo:rerun-if-env-changed=PGRX_BINDGEN_NO_DETECT_INCLUDES
--- stderr
build_paths=BuildPaths { manifest_dir: "/checkout/pgrx-pg-sys", out_dir: "/checkout/target/tests/trybuild/x86_64-unknown-linux-musl/debug/build/pgrx-pg-sys-976c22b7f866ebfb/out", src_dir: "/checkout/pgrx-pg-sys/src", shim_src: "/checkout/pgrx-pg-sys/cshim", shim_dst: "/checkout/target/tests/trybuild/x86_64-unknown-linux-musl/debug/build/pgrx-pg-sys-976c22b7f866ebfb/out/cshim" }
Generating bindings for pg14
thread '<unnamed>' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib/llvm16/lib/libclang.so.16.0.6 could not be opened: Dynamic loading not supported"', /home/rust/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.66.1/lib.rs:604:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'thread panicked while generating bindings: Any { .. }', /checkout/pgrx-pg-sys/build.rs:196:41
test ui ... FAILED
Current theory is that the "-Ctarget-feature=-crt-static" rustflags are somehow ignored/replaced when running the UI tests themselves. This was observed in the "Will It Blend" nighty runs when running pgrx tests in a postgresql-alpine container.
The text was updated successfully, but these errors were encountered:
Also to clarify for anyone who comes back and rereads this:
The main reason waiving these tests on a musl target is fine is because they don't add anything to rerun in different envs if they cause trouble for us in CI. The tests are fundamentally tests to guarantee attempts to invoke functions in certain ways fail, because we designed our API to prohibit it. We know the Rust toolchain isn't going to have so much platform-specific variance that these work on some targets and not others.
In a certain sense, if the tests themselves fail to compile at all on a specific target environment, uhm... mission accomplished???
We should reenable them someday when musl distros work as smoothly for Rust as glibc distros do, which is a process mostly happening upstream in Rust's compiler/std/libc bindings.
See: #1235
This issue is more of a reminder to go back and possibly do a more in-depth analysis of why UI tests do not work in musl environments.
In particular, the UI tests seem to be failing with attempting to dynamically loaded libraries:
Current theory is that the
"-Ctarget-feature=-crt-static"
rustflags are somehow ignored/replaced when running the UI tests themselves. This was observed in the "Will It Blend" nighty runs when running pgrx tests in a postgresql-alpine container.The text was updated successfully, but these errors were encountered: