ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
62 stars 58 forks source link

zgetdump relinked in install phase #144

Closed sharkcz closed 1 year ago

sharkcz commented 1 year ago

With the recent changes to the zgetdump tool (reading PV dumps) the zgetdump binary is being relinked in the make install phase. I suppose it's because the dependency checks (fuse, glib2, openssl, zlib) say so. As a result it's not linked with the proper (system-wide) linker flags and the resulting binary doesn't pass our post-build checks.

The relinking happens in both Fedora and RHEL, but in Fedora due recent changes the system-wide compiler/linker flags are passed also to the "install" phase, thus the binary doesn't the problem.

BTW make install in zipl directory refreshes the source dep files in zipl/boot (gcc -MM is called)

...
make -C zdump TOPDIR= ARCH=s390x install ;
make[1]: Entering directory '/builddir/build/BUILD/s390-tools-2.24.0/zdump'
for dir in /usr/sbin /usr/bin /usr/sbin /lib /usr/share/man /etc /etc/sysconfig /lib/s390-tools /usr/share/s390-tools /lib/s390-tools/zfcpdump /usr/lib/systemd/system /usr/lib64 /usr/include /usr/lib64/zkey /usr/lib64 /usr/lib; do \
        test -d /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x$dir || install -g mock -o mockbuild -d /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x$dir; \
done
for i in 1 2 3 4 5 6 7 8; do \
        test -d /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x/usr/share/man/man$i || install -g mock -o mockbuild \
        -d /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x/usr/share/man/man$i; \
done
printf "#include <%s>\n int main(void) {return 0;}\n"  "fuse.h" | ( gcc -DS390_TOOLS_RELEASE=2.24.0-1.el9 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/usr/sbin -g -fstack-protector-all -W -Wall -Wformat-security -O3 -Wno-address-of-packed-member -DHAVE_FUSE=1 -I/usr/include/fuse3 -DOPENSSL_API_COMPAT=0x10100000L -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I ../include -D_GNU_SOURCE  "-DFUSE_USE_VERSION=30" -o /dev/null -x c - ) > /dev/null 2>&1; if [ $? != 0 ]; then printf "  REQCHK  %s (%s)\n"  "zgetdump mount support"  "fuse.h"; printf "********************************************************************************\n" >&2; printf "* Missing build requirement for: %-45s *\n"  "zgetdump mount support" >&2; printf "* Install package..............: %-45s *\n"  "fuse3-devel or libfuse3-dev" >&2; printf "* You can skip build with......: make %-40s *\n"  "HAVE_FUSE=0" >&2; printf "********************************************************************************\n" >&2; exit 1; fi
printf "#include <%s>\n int main(void) {return 0;}\n"  "zlib.h" | ( gcc -DS390_TOOLS_RELEASE=2.24.0-1.el9 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/usr/sbin -g -fstack-protector-all -W -Wall -Wformat-security -O3 -Wno-address-of-packed-member -DHAVE_FUSE=1 -I/usr/include/fuse3 -DOPENSSL_API_COMPAT=0x10100000L -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I ../include -D_GNU_SOURCE  -o /dev/null -x c - ) > /dev/null 2>&1; if [ $? != 0 ]; then printf "  REQCHK  %s (%s)\n"  "zgetdump"  "zlib.h"; printf "********************************************************************************\n" >&2; printf "* Missing build requirement for: %-45s *\n"  "zgetdump" >&2; printf "* Install package..............: %-45s *\n"  "zlib-devel or libz-dev" >&2; printf "* You can skip build with......: make %-40s *\n"  "HAVE_ZLIB=0" >&2; printf "********************************************************************************\n" >&2; exit 1; fi
printf "#include <%s>\n int main(void) {return 0;}\n"  "glib.h" | ( gcc -DS390_TOOLS_RELEASE=2.24.0-1.el9 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/usr/sbin -g -fstack-protector-all -W -Wall -Wformat-security -O3 -Wno-address-of-packed-member -DHAVE_FUSE=1 -I/usr/include/fuse3 -DOPENSSL_API_COMPAT=0x10100000L -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I ../include -D_GNU_SOURCE  -o /dev/null -x c - ) > /dev/null 2>&1; if [ $? != 0 ]; then printf "  REQCHK  %s (%s)\n"  "zgetdump"  "glib.h"; printf "********************************************************************************\n" >&2; printf "* Missing build requirement for: %-45s *\n"  "zgetdump" >&2; printf "* Install package..............: %-45s *\n"  "glib2-devel / libglib2.0-dev" >&2; printf "* You can skip build with......: make %-40s *\n"  "HAVE_GLIB2=0" >&2; printf "********************************************************************************\n" >&2; exit 1; fi
printf "#include <%s>\n int main(void) {return 0;}\n"  .detect_openssl.dep.c | ( gcc -DS390_TOOLS_RELEASE=2.24.0-1.el9 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/usr/sbin -g -fstack-protector-all -W -Wall -Wformat-security -O3 -Wno-address-of-packed-member -DHAVE_FUSE=1 -I/usr/include/fuse3 -DOPENSSL_API_COMPAT=0x10100000L -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I ../include -D_GNU_SOURCE  "-I." -o /dev/null -x c - ) > /dev/null 2>&1; if [ $? != 0 ]; then printf "  REQCHK  %s (%s)\n"  "zgetdump"  .detect_openssl.dep.c; printf "********************************************************************************\n" >&2; printf "* Missing build requirement for: %-45s *\n"  "zgetdump" >&2; printf "* Install package..............: %-45s *\n"  "openssl-devel / libssl-dev version >= 1.1.0" >&2; printf "* You can skip build with......: make %-40s *\n"  "HAVE_OPENSSL=0" >&2; printf "********************************************************************************\n" >&2; exit 1; fi
touch .check_dep_zgetdump
make -C ..//libutil/ libutil.a
make[2]: Entering directory '/builddir/build/BUILD/s390-tools-2.24.0/libutil'
make[2]: 'libutil.a' is up to date.
make[2]: Leaving directory '/builddir/build/BUILD/s390-tools-2.24.0/libutil'
make -C ..//libpv libpv.a
make[2]: Entering directory '/builddir/build/BUILD/s390-tools-2.24.0/libpv'
make[2]: 'libpv.a' is up to date.
make[2]: Leaving directory '/builddir/build/BUILD/s390-tools-2.24.0/libpv'
gcc -rdynamic zgetdump.o .check_dep_zgetdump opts.o zg.o zg_error.o zg_print.o dfi.o dfi_mem_chunk.o dfi_vmcoreinfo.o dfi_lkcd.o dfi_elf.o dfi_elf_common.o dfi_pv_elf.o dfi_s390.o dfi_s390_ext.o dfi_s390mv.o dfi_s390mv_ext.o dfi_s390tape.o dfi_kdump.o dfi_devmem.o dfo.o dfo_mem_chunk.o dfo_elf.o dfo_s390.o df_elf.o df_s390.o dt.o dt_s390sv.o dt_s390sv_ext.o dt_s390mv.o dt_s390mv_ext.o dt_scsi.o output.o ngdump.o dt_ngdump.o dfi_ngdump.o pv_utils.o zfuse.o ..//libutil/libutil.a ..//libpv/libpv.a -lz -lfuse3 -lpthread  -lglib-2.0  -lcrypto  -o zgetdump
install -d -m 755 /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x/usr/share/man/man8 /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x/usr/sbin
install -m 755 zgetdump /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x/usr/sbin
install -m 644 zgetdump.8 /builddir/build/BUILDROOT/s390utils-2.24.0-1.el9.s390x/usr/share/man/man8
make[1]: Leaving directory '/builddir/build/BUILD/s390-tools-2.24.0/zdump'
...
sharkcz commented 1 year ago

cc @mhartmay

mhartmay commented 1 year ago

@sharkcz Thanks for reporting - there will be a fix either today or tomorrow.

sharkcz commented 1 year ago

I can confirm it looks good now.

mhartmay commented 1 year ago

I can confirm it looks good now.

Thanks for confirmation!