Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1839372 - python-rpmfluff fails to build on armv7hl
Summary: python-rpmfluff fails to build on armv7hl
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: koji
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mike McLean
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2020-05-23 19:17 UTC by Miro Hrončok
Modified: 2020-08-22 19:21 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-05-23 19:17:15 UTC
Description of problem:
python-rpmfluff fails to build on armv7hl.

Version-Release number of selected component (if applicable): 0.5.7.1-6.fc33


How reproducible: always


Steps to Reproduce:
1. $ fedpkg build --nowait --scratch --arches armv7hl

Actual results:
Build fails.

Expected results:
Build succeeds.

Additional info:
Traceback (most recent call last):
  File "rpmfluff.py", line 342, in do_make
    log = subprocess.check_output(command, stderr=subprocess.STDOUT).splitlines(True)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['rpmbuild', '--define', '_topdir /builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1', '--define', '_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm', '-ba', '--target', 'arm', 'test-rpmbuild-test-add-commiter-0.1-1/test-add-commiter.spec']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "rpmfluff.py", line 1607, in test_add_commiter
    self.rpmbuild.make()
  File "rpmfluff.py", line 276, in make
    self.do_make()
  File "rpmfluff.py", line 344, in do_make
    raise RuntimeError('rpmbuild command failed with exit status %s: %s\n%s'
RuntimeError: rpmbuild command failed with exit status 1: ['rpmbuild', '--define', '_topdir /builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1', '--define', '_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm', '-ba', '--target', 'arm', 'test-rpmbuild-test-add-commiter-0.1-1/test-add-commiter.spec']
b'warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.\nBuilding target platforms: arm\nBuilding for target arm\nExecuting(%prep): /bin/sh -e /var/tmp/rpm-tmp.q9ZOtU\n+ umask 022\n+ cd /builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILD\n+ RPM_EC=0\n++ jobs -p\n+ exit 0\nExecuting(%build): /bin/sh -e /var/tmp/rpm-tmp.BKGDYS\n+ umask 022\n+ cd /builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILD\n+ RPM_EC=0\n++ jobs -p\n+ exit 0\nExecuting(%install): /bin/sh -e /var/tmp/rpm-tmp.YTu3IW\n+ umask 022\n+ cd /builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILD\n+ \'[\' \'/builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILDROOT/test-add-commiter-0.1-1.%{_arch}\' \'!=\' / \']\'\n+ rm -rf \'/builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILDROOT/test-add-commiter-0.1-1.%{_arch}\'\n++ dirname \'/builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILDROOT/test-add-commiter-0.1-1.%{_arch}\'\n+ mkdir -p /builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILDROOT\n+ mkdir \'/builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILDROOT/test-add-commiter-0.1-1.%{_arch}\'\n+ rm -rf \'/builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILDROOT/test-add-commiter-0.1-1.%{_arch}\'\n+ mkdir \'/builddir/build/BUILD/rpmfluff-0.5.7.1/test-rpmbuild-test-add-commiter-0.1-1/BUILDROOT/test-add-commiter-0.1-1.%{_arch}\'\n+ /usr/lib/rpm/check-buildroot\nxargs: invalid number "%{_smp_build_ncpus}" for -P option\nTry \'xargs --help\' for more information.\n+ /usr/lib/rpm/redhat/brp-ldconfig\n+ /usr/lib/rpm/brp-compress\n+ /usr/lib/rpm/brp-strip /usr/bin/strip\nxargs: invalid number "%{_smp_build_ncpus}" for -P option\nTry \'xargs --help\' for more information.\nerror: Bad exit status from /var/tmp/rpm-tmp.YTu3IW (%install)\n\n\nRPM build errors:\n    Found bdb Packages database while attempting sqlite backend: using bdb backend.\n    Bad exit status from /var/tmp/rpm-tmp.YTu3IW (%install)\n'

https://koji.fedoraproject.org/koji/taskinfo?taskID=44872219

Comment 1 Jan Hutař 2020-08-07 19:57:14 UTC
Hello Mirek. Could you please take a look into this issue (I have seen you commenting in possibly relevant bug 1836108)? Looks like I'm not able to build on ARM:

https://koji.fedoraproject.org/koji/buildinfo?buildID=1586790

while it works otherwise:

https://koji.fedoraproject.org/koji/buildinfo?buildID=1586770

Please do you have any idea on what does this error mean?

Comment 2 Miro Hrončok 2020-08-07 20:25:42 UTC
Mirek as in Mirek Suchý? He's not CCed here.

Comment 3 Jan Hutař 2020-08-07 20:49:22 UTC
(In reply to Jan Hutař from comment #1)
> Hello Mirek. Could you please take a look into this issue (I have seen you
> commenting in possibly relevant bug 1836108)? Looks like I'm not able to
> build on ARM:
> 
> https://koji.fedoraproject.org/koji/buildinfo?buildID=1586790
> 
> while it works otherwise:
> 
> https://koji.fedoraproject.org/koji/buildinfo?buildID=1586770
> 
> Please do you have any idea on what does this error mean?

Oops, forgot to needinfo Mirek.

Comment 4 Miroslav Suchý 2020-08-08 07:19:35 UTC
The culprit is:

 /usr/lib/rpm/check-buildroot\nxargs: invalid number "%{_smp_build_ncpus}" for -P option

So during it seems that %{_smp_build_ncpus} expands to something else than number.

Comment 5 Jan Hutař 2020-08-08 21:02:17 UTC
Hello Panu! Could you please take a look at the failed build? Looks like this %{_smp_build_ncpus} macro is defined in file provided by rpm package (although I only checked on my laptop and not on ARM host).

Failed build (reproducible): https://koji.fedoraproject.org/koji/buildinfo?buildID=1586790

Comment 6 Panu Matilainen 2020-08-10 09:07:59 UTC
> "invalid number "%{_smp_build_ncpus}" for -P option"

That means "%{_smp_build_ncpus}" is the literal value passed to -P, which means it's not defined at all. Which means the platform macro definitions are not being loaded.

Uh-oh. This rings a bell, koji sets --target explicitly by some logic of its own, and on arm that value is wrong. At least sometimes. Note this:
> '--target', 'arm'

So it's calling "rpmbuild -ba --target arm [...]" but there is no such platform as "arm" (or "arm-linux", which that gets expanded to) defined on Fedora, just these:

armv3l-linux
armv4b-linux
armv4l-linux
armv5tejl-linux
armv5tel-linux
armv5tl-linux
armv6hl-linux
armv6l-linux
armv7hl-linux
armv7hnl-linux
armv7l-linux
armv8hl-linux
armv8l-linux

Basically this is a dupe of bug 1096480 but as that one is EPEL and I don't know if this is a code, configuration (or both) thing, leaving it up to koji maintainers...

Comment 7 Ben Cotton 2020-08-11 13:34:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 8 Kevin Fenzi 2020-08-22 17:37:15 UTC
So, I see there is a successfull build in f34? Is this solved, or is there other conditions under which it would fail?

I do see that this is a noarch package...

Comment 9 Jan Hutař 2020-08-22 19:21:48 UTC
(In reply to Kevin Fenzi from comment #8)
> So, I see there is a successful build in f34? Is this solved, or is there
> other conditions under which it would fail?
> 
> I do see that this is a noarch package...

Hello Kevin. Are you talking about this build:

https://koji.fedoraproject.org/koji/buildinfo?buildID=1589928

? According to log below, it was not running on ARM:

https://kojipkgs.fedoraproject.org//packages/python-rpmfluff/0.6.1/1.fc34/data/logs/noarch/hw_info.log


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