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

rpmbuild fails when no default value is available for %_smp_build_ncpus #2265

Closed
jordansissel opened this issue Nov 6, 2022 · 1 comment · Fixed by #2266
Closed

rpmbuild fails when no default value is available for %_smp_build_ncpus #2265

jordansissel opened this issue Nov 6, 2022 · 1 comment · Fixed by #2266
Assignees
Labels

Comments

@jordansissel
Copy link

I recently installed Fedora 36 which comes with rpm 4.17.1 and noticed that rpmbuild invocations that were working previously now no longer work. (I'll figure out the versions where it /does/ work soon)

A short example is this:

# This works
% rpmbuild --quiet --rebuild example-1.0-1.src.rpm

# This does not
% rpmbuild --quiet --rebuild --target whatever example-1.0-1.src.rpm
Building target platforms: whatever
Building for target whatever
xargs: invalid number "%{_smp_build_ncpus}" for -P option
Try 'xargs --help' for more information.
xargs: invalid number "%{_smp_build_ncpus}" for -P option
Try 'xargs --help' for more information.
error: Bad exit status from /var/tmp/rpm-tmp.VlUBaS (%install)

Now, the "whatever" target is made-up nonsense, of course, but this failure is new-ish and seems to be that this fails when an unknown platform is targeted.

I'm not an expert in the rpm codebase, but #665 might be related. The review comment[1] seems on point for this issue. [1] #665 (comment)

Related issues:

@pmatilai
Copy link
Member

pmatilai commented Nov 7, 2022

Right, thanks for reporting / reminding us about this.

Looking at it again, the simple and correct fix is to move these definitions from platform to the main macros file: there used to be a reason for it being in the platform macros as it dependend on external, platform dependent tooling, but for many years now it's all been backed up by rpm internal macros which are available on all platforms.

@pmatilai pmatilai added the bug label Nov 7, 2022
@pmatilai pmatilai added this to RPM Nov 7, 2022
@pmatilai pmatilai moved this to Backlog in RPM Nov 7, 2022
@pmatilai pmatilai moved this from Backlog to Todo in RPM Nov 7, 2022
@pmatilai pmatilai self-assigned this Nov 7, 2022
pmatilai added a commit to pmatilai/rpm that referenced this issue Nov 7, 2022
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
@pmatilai pmatilai moved this from Todo to In Review in RPM Nov 7, 2022
pmatilai added a commit that referenced this issue Nov 8, 2022
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: #2265
Repository owner moved this from In Review to Done in RPM Nov 8, 2022
JetXujing pushed a commit to JetXujing/rpm that referenced this issue Nov 24, 2022
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
bmwiedemann pushed a commit to bmwiedemann/rpm that referenced this issue Jan 11, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
bmwiedemann pushed a commit to bmwiedemann/rpm that referenced this issue Jan 11, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 24, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 27, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 27, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 27, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 28, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 28, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 28, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 28, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 28, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 28, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Feb 28, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Mar 9, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Mar 10, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Mar 13, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit to dmnks/rpm that referenced this issue Mar 13, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: rpm-software-management#2265
(cherry picked from commit 5049fc7)
dmnks pushed a commit that referenced this issue Mar 13, 2023
%_smp_mflags and the related macros that it grew around itself used to
be platform specific as they relied on external tooling (eg getconf for
getting processor count), but since rpm 4.15 this has been backed by the
built-in %{getncpus} macro which is available on all platforms, so
there's zero reason to duplicate this stuff on all platform files.

Fixes: #2265
(cherry picked from commit 5049fc7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants