Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not build test binaries statically in CI #575

Closed
wants to merge 2 commits into from

Conversation

matoro
Copy link
Contributor

@matoro matoro commented Nov 19, 2024

For the CI runs intended to be testing static binary, only build the main patchelf binary statically, and not the test binaries. This allows us to restore the correct behavior for toolchain builds with PIE enabled by default.

For the CI runs intended to be testing static binary, only build the
main patchelf binary statically, and not the test binaries.

See: NixOS#529
@matoro matoro marked this pull request as draft November 19, 2024 17:59
@Mic92
Copy link
Member

Mic92 commented Nov 22, 2024

Sounds ok to me in principle

@matoro
Copy link
Contributor Author

matoro commented Nov 22, 2024

This is clearly not the right solution, as evidenced by it still failing and also upon closer inspection I misread this - -static is not being passed to the test binaries.

Despite running on aarch64 musl I am unable to reliably reproduce this.

@matoro matoro closed this Nov 22, 2024
@Mic92
Copy link
Member

Mic92 commented Nov 23, 2024

You cannot reproduce this when pulling the same container locally?

@matoro
Copy link
Contributor Author

matoro commented Nov 23, 2024

You cannot reproduce this when pulling the same container locally?

I was running in a Gentoo aarch64 musl chroot, and yeah it doesn't reproduce there.

# uname -m
aarch64
# /lib/ld-musl-aarch64.so.1
musl libc (aarch64)
Version 1.2.4
Dynamic Program Loader
Usage: /lib/ld-musl-aarch64.so.1 [options] [--] pathname [args]
# git clone "https://github.com/nixos/patchelf"
...
# pushd patchelf
...
# git revert --no-edit d985189
...
# ./bootstrap.sh
...
# CXXFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wformat -Werror=format-security -O2 -static" ./confi
gure
...
# make check
...
============================================================================
Testsuite summary for patchelf 0.18.0
============================================================================
# TOTAL: 58
# PASS:  56
# SKIP:  2
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants