Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Building systemtap against 0.165-2, I get these errors: > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `deflate_cleanup.6800': > (.text+0x11): undefined reference to `deflateEnd' > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `__libelf_compress': > (.text+0x16a): undefined reference to `deflateInit_' > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `__libelf_compress': > (.text+0x27d): undefined reference to `deflate' > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `__libelf_compress': > (.text+0x2f6): undefined reference to `deflateEnd' > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `__libelf_decompress': > (.text+0x47d): undefined reference to `inflateInit_' > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `__libelf_decompress': > (.text+0x4b3): undefined reference to `inflate' > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `__libelf_decompress': > (.text+0x4c0): undefined reference to `inflateReset' > /opt/rh/devtoolset-4/root/usr/lib64/libelf.ar(libelf_a-elf_compress.o): In function `__libelf_decompress': > (.text+0x4d4): undefined reference to `inflateEnd' > collect2: error: ld returned 1 exit status Adding "-lz" to systemtap's LDFLAGS solves it. Is this expected behavior?
DTS's libelf.so is a linker script with "INPUT(libelf.ar)". Adding "INPUT(-lz)" to this solves the problem. In fact, libdw.so includes several libraries this way.
(In reply to Josh Stone from comment #3) > DTS's libelf.so is a linker script with "INPUT(libelf.ar)". Adding > "INPUT(-lz)" to this solves the problem. In fact, libdw.so includes several > libraries this way. Thanks for testing. That is the way I solved it. New build attached to errata.
Rebase testing passed against devtoolset-4-elfutils-0.165-7.el[67].
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1142