Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1873413

Summary: gcc-toolset-10-elfutils-devel doesn't have Requires and/or links against all supported compression libraries for libdw
Product: Red Hat Enterprise Linux 8 Reporter: Mark Wielaard <mjw>
Component: elfutilsAssignee: Mark Wielaard <mjw>
elfutils sub component: gcc-toolset-10 QA Contact: Martin Cermak <mcermak>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: dsmith, esyr, fche, jakub, mcermak, mjw, mnewsome, ohudlick
Version: 8.3Keywords: Bugfix, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-toolset-10-elfutils-0.182-3.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1872703 Environment:
Last Closed: 2021-05-18 15:40:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1872703    
Bug Blocks:    

Comment 9 Eugene Syromiatnikov 2020-11-10 17:52:28 UTC
Another issue popped up with 0.182-2:

configure:22226: checking for dwfl_linux_proc_attach in -ldw
configure:22252: gcc -o conftest -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs
=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/opt/rh/gcc-toolset-10/root/usr/lib64 -L
/opt/rh/gcc-toolset-10/root/usr/lib64/elfutils  -I/opt/rh/gcc-toolset-10/root/usr/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switc
hes -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/red
hat-hardened-ld -L/opt/rh/gcc-toolset-10/root/usr/lib64 -L/opt/rh/gcc-toolset-10/root/usr/lib64/elfutils conftest.c -ldw  
                                       >&5
/opt/rh/gcc-toolset-10/root/usr/lib64/libdw.ar(libdwfl_a-zstd.o): In function `__libdw_unzstd':
(.text+0x79): undefined reference to `ZSTD_createDCtx'
(.text+0xf4): undefined reference to `ZSTD_isError'
(.text+0x178): undefined reference to `ZSTD_decompressStream'
(.text+0x183): undefined reference to `ZSTD_isError'
(.text+0x1a0): undefined reference to `ZSTD_freeDCtx'
(.text+0x1a8): undefined reference to `ZSTD_isError'
(.text+0x33a): undefined reference to `ZSTD_freeDCtx'
collect2: error: ld returned 1 exit status

Seems that libzstd-devel is also required now.

Comment 10 Mark Wielaard 2020-11-10 18:00:50 UTC
After the update to 0.182, which added zstd support, actually trying to link with libdw.so produces:
/opt/rh/gcc-toolset-10/root/usr/lib64/libdw.ar(libdwfl_a-zstd.o): In function `__libdw_unzstd': (.text+0x79): undefined reference to `ZSTD_createDCtx'

The Requires: libzstd-devel was added, but the libdw.so linker script was not updated.

Comment 11 Mark Wielaard 2020-11-11 16:56:04 UTC
This testcase should check all compression libraries (z, bz2, lzma and zstd) are present:

$ cat t.c 
#include <elfutils/libdwelf.h>

int main () { dwelf_elf_begin (0); }

$ yum install gcc-toolset-10-gcc gcc-toolset-10-elfutils-devel

$ scl enable gcc-toolset-10 bash

$ gcc -o t t.c -ldw
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/s390x-redhat-linux/10/../../../../lib64/libdw.ar(libdwfl_a-zstd.o): In function `__libdw_unzstd':
(.text+0x84): undefined reference to `ZSTD_createDCtx'
(.text+0xfa): undefined reference to `ZSTD_isError'
(.text+0x170): undefined reference to `ZSTD_decompressStream'
(.text+0x17a): undefined reference to `ZSTD_isError'
(.text+0x194): undefined reference to `ZSTD_freeDCtx'
(.text+0x19e): undefined reference to `ZSTD_isError'
(.text+0x404): undefined reference to `ZSTD_freeDCtx'
collect2: error: ld returned 1 exit status

expected no error of course:

$ gcc -o t t.c -ldw
$ echo $?
0

Comment 15 errata-xmlrpc 2021-05-18 15:40:37 UTC
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 (gcc-toolset-10-elfutils bug fix and enhancement update), 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-2021:1805