[Rpm-maint] [rpm-software-management/rpm] --build-in-place and --noprep cannot be used at the same time (Issue #3216)
pastalian
notifications at github.com
Sat Jul 27 03:53:38 UTC 2024
**Describe the bug**
rpm 4.20 fails to build linux kernel with `make rpm-pkg`, which uses both `--build-in-place` and `--noprep`.
**To Reproduce**
Steps to reproduce the behavior:
```
git clone --depth 1 https://github.com/torvalds/linux.git
cd linux
make tinyconfig
make binrpm-pkg
```
https://github.com/torvalds/linux/blob/master/scripts/package/kernel.spec
**Expected behavior**
`--build-in-place` and `--noprep` can be used at the same time.
**Output**
<details>
<summary>make binrpm-pkg</summary>
```
SYNC include/config/auto.conf
UPD include/config/kernel.release
GEN rpmbuild/SPECS/kernel.spec
rpmbuild -bb rpmbuild/SPECS/kernel.spec --define='_topdir /linux/rpmbuild' --target i386-linux --build-in-place --noprep --define='_smp_mflags %{nil}' $(rpm -q rpm >/dev/null 2>&1 || echo --nodeps)
Building target platforms: i386-linux
Building for target i386-linux
setting SOURCE_DATE_EPOCH=1722038400
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.6527Jo
+ umask 022
+ cd /linux/rpmbuild/BUILD/kernel-6.10.0+-build
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection '
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection '
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn'
+ export RUSTFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ cd kernel-6.10.0+
/var/tmp/rpm-tmp.6527Jo: line 46: cd: kernel-6.10.0+: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.6527Jo (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.6527Jo (%build)
make[2]: *** [scripts/Makefile.package:71: binrpm-pkg] Error 1
make[1]: *** [/linux/Makefile:1547: binrpm-pkg] Error 2
make: *** [Makefile:224: __sub-make] Error 2
```
</details>
**Environment**
- OS / Distribution: Fedora 41
- Version rpm-4.19.92-5.fc41.x86_64
**Additional context**
`--build-in-place` expects %{buildsubdir} to exist, but `--noprep` skips %mkbuilddir and does not create this directory.
I know there have been many issues related to build-in-place reported recently. Please let me know if this is a duplicate.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3216
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3216 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240726/195119e7/attachment.html>
More information about the Rpm-maint
mailing list