Closed dchirikov closed 3 years ago
Can you check if it's the same issue as we've seen for ppc64? Namely static PIE seems to be broken on rhel8
I removed -fPIE
and replaced -static-pie
with just -static
, as advised here but for some reason musl-gcc still builds binaries with -static-pie
:
/w/deps/dist/musl/bin/musl-gcc -std=c99 -O2 -fstack-protector -pedantic -Wall -Wextra -Wcast-align \
-Wpointer-arith -Wmissing-prototypes -Wnonnull -Wwrite-strings -Wlogical-op -Wformat=2 \
-Wmissing-format-attribute -Winit-self -Wshadow -Wstrict-prototypes -Wunreachable-code \
-Wconversion -Wsign-conversion -s -D_FORTIFY_SOURCE=2 -isystem /w/deps/dist/libbsd/include/bsd \
-DLIBBSD_OVERLAY -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--as-needed -Wl,--gc-sections -L/w/deps/dist/libbsd/lib \
-pie -static-pie bin/enroot-mount.c -lbsd -o bin/enroot-mount
So the issue still persists.
For some weird reason, binaries are being built in RHEL8 or Centos 8 are broken in a pretty bad way. This snippet will return
Segmentation fault (core dumped) ./bin/enroot-mount
as a last lineIf the image is
centos:7
then binaries in./bin
are pretty healthy