Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example rpm build cello fails with request for debugsourcefiles.list #47

Closed
huitema opened this issue May 28, 2018 · 3 comments
Closed

Comments

@huitema
Copy link

huitema commented May 28, 2018

I am trying to learn how to produce RPM packages. I am following the steps in the guide, but I am getting an error when trying

rpmbuild --rebuild ~/rpmbuild/SRPMS/cello-1.0-1.fc28.src.rpm

The error is:

RPM build errors:
    Empty %files file /home/christian/rpmbuild/BUILD/cello-1.0/debugsourcefiles.list

I assume I something did wrong, but I am getting the cello "tar*.gz" package from the URL in the documentation, and I have verified that the cello.spec file matches the doc as well. So either there is something unsaid in the doc, or there is another issue.

The full output of the --rebuild command is:

[christian@localhost ~]$ rpmbuild --rebuild ~/rpmbuild/SRPMS/cello-1.0-1.fc28.src.rpm
Installing /home/christian/rpmbuild/SRPMS/cello-1.0-1.fc28.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.2bGior
+ umask 022
+ cd /home/christian/rpmbuild/BUILD
+ cd /home/christian/rpmbuild/BUILD
+ rm -rf cello-1.0
+ /usr/bin/tar -xof -
+ /usr/bin/gzip -dc /home/christian/rpmbuild/SOURCES/cello-1.0.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd cello-1.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.DugVcd
+ umask 022
+ cd /home/christian/rpmbuild/BUILD
+ cd cello-1.0
+ make
gcc -o cello cello.c
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.NshckZ
+ umask 022
+ cd /home/christian/rpmbuild/BUILD
+ '[' /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64 '!=' / ']'
+ rm -rf /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64
++ dirname /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64
+ mkdir -p /home/christian/rpmbuild/BUILDROOT
+ mkdir /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64
+ cd cello-1.0
+ /usr/bin/make install DESTDIR=/home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64 'INSTALL=/usr/bin/install -p'
mkdir -p /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64/usr/bin
install -m 0755 cello /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64/usr/bin/cello
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m -i --build-id-seed 1.0-1.fc28 --unique-debug-suffix -1.0-1.fc28.x86_64 --unique-debug-src-base cello-1.0-1.fc28.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /home/christian/rpmbuild/BUILD/cello-1.0
extracting debug info from /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64/usr/bin/cello
gdb-add-index: No index was created for /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64/usr/bin/cello
gdb-add-index: [Was there no debuginfo? Was there already an index?]
/usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 1 CRC32s did match.
+ '[' '%{buildarch}' = noarch ']'
+ QA_CHECK_RPATHS=1
+ case "${QA_CHECK_RPATHS:-}" in
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
+ /usr/lib/rpm/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-mangle-shebangs '' ''
Processing files: cello-1.0-1.fc28.x86_64
Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.aJe71M
+ umask 022
+ cd /home/christian/rpmbuild/BUILD
+ cd cello-1.0
+ LICENSEDIR=/home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64/usr/share/licenses/cello
+ export LC_ALL=C
+ LC_ALL=C
+ export LICENSEDIR
+ /usr/bin/mkdir -p /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64/usr/share/licenses/cello
+ cp -pr LICENSE /home/christian/rpmbuild/BUILDROOT/cello-1.0-1.fc28.x86_64/usr/share/licenses/cello
+ exit 0
Provides: cello = 1.0-1.fc28 cello(x86-64) = 1.0-1.fc28
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) rtld(GNU_HASH)
Processing files: cello-debugsource-1.0-1.fc28.x86_64
error: Empty %files file /home/christian/rpmbuild/BUILD/cello-1.0/debugsourcefiles.list


RPM build errors:
    Empty %files file /home/christian/rpmbuild/BUILD/cello-1.0/debugsourcefiles.list
[christian@localhost ~]$ ls
Desktop    Downloads  Pictures  rpmbuild  Templates
Documents  Music      Public    rpmtrial  Videos
[christian@localhost ~]$ tree rpmbuild
rpmbuild
├── BUILD
│   └── cello-1.0
│       ├── cello
│       ├── cello.c
│       ├── cello.c.orig
│       ├── debugfiles.list
│       ├── debuglinks.list
│       ├── debugsourcefiles.list
│       ├── debugsources.list
│       ├── elfbins.list
│       ├── LICENSE
│       └── Makefile
├── BUILDROOT
│   └── cello-1.0-1.fc28.x86_64
│       └── usr
│           ├── bin
│           │   └── cello
│           ├── lib
│           │   └── debug
│           │       └── usr
│           │           └── bin
│           │               └── cello-1.0-1.fc28.x86_64.debug
│           └── share
│               └── licenses
│                   └── cello
│                       └── LICENSE
├── RPMS
├── SOURCES
│   ├── bello-0.1.tar.gz
│   └── cello-1.0.tar.gz
├── SPECS
│   └── cello.spec
└── SRPMS
    └── cello-1.0-1.fc28.src.rpm

17 directories, 17 files
[christian@localhost ~]$ 
@xsuchy
Copy link
Collaborator

xsuchy commented May 28, 2018

This seems to me as rpm issue. It used to work. And it does not work on Fedora 28 now. I reported this as https://bugzilla.redhat.com/show_bug.cgi?id=1583329

@xsuchy xsuchy closed this as completed May 28, 2018
xsuchy added a commit to xsuchy/rpm-packaging-guide that referenced this issue May 30, 2018
xsuchy added a commit to xsuchy/rpm-packaging-guide that referenced this issue May 30, 2018
xsuchy added a commit that referenced this issue May 30, 2018
@xsuchy
Copy link
Collaborator

xsuchy commented May 30, 2018

I updated both documentation and the tar ball. So the Makefile now generate debug information and rpmbuild proceed without errors.

@huitema
Copy link
Author

huitema commented Jun 13, 2018

I confirm that this works, thanks. I had to read a little between the lines in the documentation. It seems that the key is to use the "-g" option in gcc/g++. Is that correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants