====================================================================== ERROR: test_multiarch_compilation (__main__.TestSimpleRpmBuild) Ensure that building on multiple archs works as expected ---------------------------------------------------------------------- Traceback (most recent call last): File "rpmfluff.py", line 1691, in test_multiarch_compilation self.rpmbuild.make() File "rpmfluff.py", line 229, in make self.do_make() File "rpmfluff.py", line 298, in do_make log = check_output(command).splitlines(True) File "/usr/lib64/python3.5/subprocess.py", line 629, in check_output **kwargs).stdout File "/usr/lib64/python3.5/subprocess.py", line 711, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['rpmbuild', '--define', '_topdir /home/ignatenk/rpmfluff/test-rpmbuild-test-multiarch-compilation-0.1-1', '--define', '_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm', '-ba', '--target', 'i386', 'test-rpmbuild-test-multiarch-compilation-0.1-1/test-multiarch-compilation.spec']' returned non-zero exit status 1 ---------------------------------------------------------------------- Ran 56 tests in 9.602s FAILED (errors=1)
Is this on your machine, or in Koji/Mock? On x86_64?
So this test should be skipped on all arches except x86_64. It's trying to build with gcc -m32 which needs the 32-bit version of glibc-devel and libgcc.
gcc -m32
I think the problem is just that I forgot to add those to BuildRequires in the spec...
Hmm I thought I could do
%ifarch x86_64 BuildRequires: glibc-devel(x86-32) BuildRequires: libgcc(x86-32) %endif
but I forgot that doesn't work for noarch packages... might have to just skip that test if gcc -m32 doesn't work (which means, it'll just always skip in Koji/Mock).
Oooh I found this post which points out that %if %{_arch} works as expected for noarch packages, even though %ifarch doesn't.
%if %{_arch}
%ifarch
... But it still doesn't work in Koji, because i686 builds aren't included in the buildroot for x86_64, so it fails like:
DEBUG util.py:421: No matching package to install: 'glibc-devel(x86-32)' DEBUG util.py:421: No matching package to install: 'libgcc(x86-32)'
So I guess we better just skip the test.
Fixed in #11.
Dan fixed this
@jhutar changed the status to Fixed
Fixed
Log in to comment on this ticket.