Bug 235656 - Warning: cpio: .../<built-in>: No such file or directory
Warning: cpio: .../<built-in>: No such file or directory
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
x86_64 Linux
medium Severity low
: ---
: ---
Assigned To: Panu Matilainen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-09 05:45 EDT by Jan Kratochvil
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-08 09:08:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
rpmbuild --rebuild built-in-1.0-0.src.rpm (1.76 KB, application/octet-stream)
2007-04-09 05:47 EDT, Jan Kratochvil
no flags Details
rpm -qa (26.66 KB, text/plain)
2007-04-11 09:53 EDT, Jan Kratochvil
no flags Details

  None (edit)
Description Jan Kratochvil 2007-04-09 05:45:53 EDT
Description of problem:
While building packages I get the %{summary} message.

Version-Release number of selected component (if applicable):
FC6 (updated).
rpm-build-4.4.2-32.x86_64
gcc-4.1.1-51.fc6.x86_64
cpio-2.6-21.fc6.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Build a package using `va_list', such as `bind' or `gdb'.
   Provided a testcase package here but it may be misleading as it is very
   minimal one, still the same problem occurs there.
2. rpmbuild --rebuild /tmp/built-in-1.0-0.src.rpm

Actual results:
extracting debug info from /var/tmp/built-in-root/built-in
cpio: built-in-1.0/<built-in>: No such file or directory
1 block
+ exit 0

Expected results:
extracting debug info from /var/tmp/built-in-root/built-in
1 block
+ exit 0

Additional info:
It is a bug in `/usr/lib/rpm/debugedit' which should not list `<built-in>' files
(listed by GCC at least for the `va_list' symbol).
It is mostly harmless, though.
Comment 1 Jan Kratochvil 2007-04-09 05:47:02 EDT
Created attachment 151951 [details]
rpmbuild --rebuild built-in-1.0-0.src.rpm
Comment 2 Jeff Johnson 2007-04-10 20:21:40 EDT
This problem appears to be fixed in rpm-4.4.9:

+ cp -p built-in /var/tmp/built-in-root/
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/rpm/BUILD/
extracting debug info from /var/tmp/built-in-root/built-in
1 block
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip

# rpm -q rpm-build gcc cpio
rpm-build-4.4.9-0.3.i386.rpm
gcc-4.1.2-7.i386.rpm
cpio-2.6-27.fc7.i386.rpm

I'll be happy to try any other reproducers you have if the problem is still present.

UPSTREAM
Comment 3 Jan Kratochvil 2007-04-11 08:45:01 EDT
For proper check (if your GCC builds it the same way etc.) please verify that:
readelf -a --debug-dump
built-in-debuginfo-1.0-0.x86_64/usr/lib/debug/built-in.debug|grep -5 built-in
prints the content with '<built-in>':
 The File Name Table:
  Entry Dir     Time    Size    Name
  1     0       0       0       built-in.c
  2     1       0       0       stdarg.h
  3     0       0       0       <built-in>

Anyway still the Bug should be open as the latest Red Hat rawhide RPM is 4.4.2.
Comment 4 Jeff Johnson 2007-04-11 08:59:19 EDT
Hmmm, very different results. What am I missing? Likely FC CFLAGS are different ...

$ rpm2cpio ../built-in-debug-1.0-0.i386.rpm | cpio -dim
15 blocks
$ readelf -a --debug-dump ./usr/lib/debug/built-in.debug|grep -5 built-in
...
 The File Name Table:
  Entry Dir     Time    Size    Name
  1     0       0       0       built-in.c
  2     1       0       0       stdarg.h
...

Comment 5 Jeff Johnson 2007-04-11 09:02:37 EDT
Here is my build:

...
Executing(%build): /bin/sh -e /X/tmp/rpm-tmp.4476
+ umask 022
+ cd /X/built-in
+ rm -rf built-in-1.0
+ mkdir built-in-1.0
+ cd built-in-1.0
+ rm -f built-in.c
+ echo '#include <stdarg.h>'
+ echo 'va_list ap;'
+ echo 'int main (void) { return 0; }'
+ gcc -o built-in built-in.c -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-
tables -ggdb3
+ exit 0
Executing(%install): /bin/sh -e /X/tmp/rpm-tmp.4476
+ umask 022
+ cd /X/built-in
+ /bin/rm -rf /X/tmp/built-in-root
+ /bin/rm -rf /X/tmp/built-in-root
+ cd built-in-1.0
+ mkdir /X/tmp/built-in-root
+ cp -p built-in /X/tmp/built-in-root/
+ /usr/lib/rpm/find-debuginfo.sh /X/built-in/
extracting debug info from /X/tmp/built-in-root/built-in
Only dest dir longer than base dir not supported
0 blocks
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
+ /usr/lib/rpm/brp-nobuildrootpath
Comment 6 Jeff Johnson 2007-04-11 09:04:08 EDT
Ah yes, there is the problem, the silly rewrite of file names without reallocating
a larger elf section:
    Only dest dir longer than base dir not supported

Hang on ...
Comment 7 Jeff Johnson 2007-04-11 09:09:50 EDT
Not *the* problem, just one of many problems with -debuginfo

Here's the results when built on a longer path so that debugedit can change file names without 
reallocating the elf section:

 The File Name Table:
  Entry Dir     Time    Size    Name
  1     0       0       0       built-in.c
  2     1       0       0       stdarg.h

What CFLAGS do I miss:

+ gcc -o built-in built-in.c -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-
tables -ggdb3
Comment 8 Jan Kratochvil 2007-04-11 09:53:14 EDT
Created attachment 152269 [details]
rpm -qa

Is it easy enough for you to reproduce it on x86_64?

The build looks different depending on whether `redhat-rpm-config' is
installed, still in both cases it produced the same error.  The log below is on
a system without `redhat-rpm-config'.
This log is from FC6 but the bug is apparently present even in Fedora Rawhide
as the warnings are produces even in the build system (mock/brew).
What distro do you run on? It may be really GCC dependent, this `<built-in>'
name may be a subject for discussion whether it is not a GCC bug at all.

$ rpmbuild --rebuild /tmp/built-in-1.0-0.src.rpm 
Installing /tmp/built-in-1.0-0.src.rpm
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.25573
+ umask 022
+ cd /home/jkratoch/src/rpm/BUILD
+ rm -rf built-in-1.0
+ mkdir built-in-1.0
+ cd built-in-1.0
+ rm -f built-in.c
+ echo '#include <stdarg.h>'
+ echo 'va_list ap;'
+ echo 'int main (void) { return 0; }'
+ gcc -o built-in built-in.c -O2 -g -ggdb3
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.73432
+ umask 022
+ cd /home/jkratoch/src/rpm/BUILD
+ cd built-in-1.0
+ mkdir /var/tmp/built-in-root
+ cp -p built-in /var/tmp/built-in-root/
+ /usr/lib/rpm/find-debuginfo.sh /home/jkratoch/src/rpm/BUILD/
extracting debug info from /var/tmp/built-in-root/built-in
cpio: built-in-1.0/<built-in>: No such file or directory
1 block
+ exit 0
Processing files: built-in-1.0-0
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) rtld(GNU_HASH)
Processing files: built-in-debug-1.0-0
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/built-in-root
Wrote: /home/jkratoch/src/rpm/RPMS/x86_64/built-in-1.0-0.x86_64.rpm
Wrote: /home/jkratoch/src/rpm/RPMS/x86_64/built-in-debug-1.0-0.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.73432
+ umask 022
+ cd /home/jkratoch/src/rpm/BUILD
+ rm -rf /var/tmp/built-in-root
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.73432
+ umask 022
+ cd /home/jkratoch/src/rpm/BUILD
+ exit 0
Comment 9 Jeff Johnson 2007-04-13 22:21:41 EDT
You're in luck, I just got access to CentOS5/x86_64. I'll try to reproduce this weekend.

Thanks for the help.
Comment 10 Jeff Johnson 2007-04-29 08:41:28 EDT
Adding a comment so I can find this bug in spite of Bugzilla normal -> medium changes.
Comment 11 Panu Matilainen 2007-08-08 09:08:40 EDT
Seems to have been fixed by Roland McGrath's new fancy find-debuginfo.sh, will
be in next rawhide push.

Note You need to log in before you can comment on or make changes to this bug.