Skip to content

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