[Rpm-maint] [rpm-software-management/rpm] 4.15.1: issue with debug info stipping procedure (#1362)

Tomasz Kłoczko notifications at github.com
Sat Sep 19 20:10:50 UTC 2020


If it would true all my meson builds would be reporting the same issue.
```
$ rpm -E %meson

        export CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none}";
        export CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none}";
        export FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none}";
        export FCFLAGS="${FCFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none}";
        export LDFLAGS="${LDFLAGS:--Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin}";
        export AR="/usr/bin/gcc-ar" RANLIB="/usr/bin/gcc-ranlib" NM="/usr/bin/gcc-nm";
        export CC="gcc" CXX="g++"

        /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-redhat-linux-gnu
```
As you see `-g` is used.
As well I would point one more time on `file` and `ls -l` output at the end of the %install:
```
+ ls -l /home/tkloczko/rpmbuild/BUILDROOT/gnome-tour-3.38.0-2.fc34.x86_64/usr/bin/gnome-tour
-rwxr-xr-x. 1 tkloczko tkloczko 2379352 Sep 16 00:18 /home/tkloczko/rpmbuild/BUILDROOT/gnome-tour-3.38.0-2.fc34.x86_64/usr/bin/gnome-tour
+ file /home/tkloczko/rpmbuild/BUILDROOT/gnome-tour-3.38.0-2.fc34.x86_64/usr/bin/gnome-tour
/home/tkloczko/rpmbuild/BUILDROOT/gnome-tour-3.38.0-2.fc34.x86_64/usr/bin/gnome-tour: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=da2bb66637ef92012ace0c18de70d27a43275c04, for GNU/Linux 3.2.0, not stripped, too many notes (256)
```
As you see `file` says about that binary **not stripped, too many notes (256)**
After rpm fails fecause none of the debug info files foud ls shows:
```
$ ls -l /home/tkloczko/rpmbuild/BUILDROOT/gnome-tour-3.38.0-2.fc34.x86_64/usr/bin/gnome-tour
-rwxr-xr-x. 1 tkloczko tkloczko 1776784 Sep 19 21:00 /home/tkloczko/rpmbuild/BUILDROOT/gnome-tour-3.38.0-2.fc34.x86_64/usr/bin/gnome-tour
```
So something stripped that binart reducing its size from 2379352  to 1776784  bytes.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1362#issuecomment-695351364
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200919/6d6aa2cd/attachment.html>


More information about the Rpm-maint mailing list