Description of problem: Package python-threadpoolctl fails to build from source in Fedora Rawhide. Version-Release number of selected component (if applicable): 3.1.0-2.fc37 Steps to Reproduce: koji build --scratch f37 python-threadpoolctl-3.1.0-2.fc37.src.rpm Additional info: This package is tracked by Koschei. See: https://koschei.fedoraproject.org/package/python-threadpoolctl The package is also failing when built with Python 3.11 in side tag[0]. It blocks quite a lot packages so I am setting severity to high. [0] https://koji.fedoraproject.org/koji/buildinfo?buildID=1984970
There are two problems here. ---- One is test_architecture, which has an explicit list of very specific microarchitectures, e.g. "SkylakeX", and this comment: > # XXX: add more as needed by CI or developer laptops There is a patch, threadpoolctl-koji-arches.patch, that adds "POWER9" and "Z14", but in my opinion this is still too brittle, and the test should be skipped: > %pytest -v -k 'not test_architecture' so that the package can be rebuilt on any machine without having to keep whitelisting every new architecture encountered on a Koji builder or Fedora packager machine. In the linked Koji scratch build, this test failed because "Nehalem" was not in the listed architectures. ---- The other problem is failures in test_command_line_command_flag and test_command_line_import_flag due to disagreement about what “num_threads” should be. In Koji, that looked like: > E AssertionError: assert {'filepath': '/usr/lib/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 6, 'prefix': 'libgomp', ...} in [{'architecture': 'Nehalem', 'filepath': '/usr/lib/libopenblaso-r0.3.20.so', 'internal_api': 'openblas', 'num_threads': 30, ...}, {'filepath': '/usr/lib/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 30, 'prefix': 'libgomp', ...}] On my workstation (16 physical cores, SMT disabled), that looks like: > E AssertionError: assert {'filepath': '/usr/lib64/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 16, 'prefix': 'libgomp', ...} in [{'architecture': 'Zen', 'filepath': '/usr/lib64/libopenblaso-r0.3.20.so', 'internal_api': 'openblas', 'num_threads': 32, ...}, {'filepath': '/usr/lib64/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 32, 'prefix': 'libgomp', ...}]
This is not a Python 3.11 problem. These same tests (and one more) fail—but with different “num_threads” values—when building the current Rawhide version for Fedora 36. On my workstation: > E AssertionError: assert {'architecture': 'Zen', 'filepath': '/usr/lib64/libopenblaso-r0.3.19.so', 'internal_api': 'openblas', 'num_threads': 0, ...} in [{'architecture': 'Zen', 'filepath': '/usr/lib64/libopenblaso-r0.3.19.so', 'internal_api': 'openblas', 'num_threads': .....}, {'filepath': '/usr/lib64/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 1, 'prefix': 'libgomp', ...}]
I agree about skipping test_architecture. About the num_threads thing, I have no idea why is this asserted, where is it coming from, or whether it is OK to skip :/ Let's ask upstream?
With %pytest -v -k 'not test_architecture' I got it passing on aarch64 in Koji. So if we want we at least know how to build this, but I am a bit afraid that this is masking an issue.
https://github.com/joblib/threadpoolctl/issues/128
Built on aarch64 to unblock Python 3.11 rebuilds. Leaving open for other architectures.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.