Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#74129 - [python-blosc] Python bytecode is missing and compilation is done with -O3
Attached to Project:
Community Packages
Opened by Pekka Ristola (pekkarr) - Tuesday, 15 March 2022, 17:23 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Friday, 18 March 2022, 21:34 GMT
Opened by Pekka Ristola (pekkarr) - Tuesday, 15 March 2022, 17:23 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Friday, 18 March 2022, 21:34 GMT
|
DetailsDescription:
1. python-blosc 1.10.6-3 is missing the compiled python bytecode due to a bug[0] in python-scikit-build. 2. python-blosc is compiled with cmake build type `Release` which adds `-O3 -DNDEBUG` arguments to compiler commands and this overrides the default -O2 flag. The commands can be inspected by appending `-DCMAKE_VERBOSE_MAKEFILE=ON` option to `setup.py build`. Solution: 1. Either wait for scikit-build upstream to release a fixed version or backport the fix[0], and rebuild the package. 2. Replace all `setup.py` commands in `build()` with ``` python setup.py build --build-type None -DCMAKE_C_FLAGS_INIT=-DNDEBUG ``` This specifies the None build type as recommended in CMake package guidelines. Adding `-DNDEBUG` option is necessary to avoid `__FILE__` macros as these would leave references to $srcdir. Also the `setup.py install` command in `package()` needs to be changed to ``` python setup.py --skip-cmake install --skip-build --root="$pkgdir" --optimize=1 ``` The `--skip-cmake` option prevents rebuilding in `install`, otherwise the build type and other build flags need to be specified again. See scikit-build documentation[1] for more details. Also two other minor things can be improved in the PKGBUILD: 1. Upstream provides a way to compile with system blosc by using `-DUSE_SYSTEM_BLOSC=ON`, there is no need to patch the sources in `prepare()`. 2. Build-time dependency on `ninja` can be dropped by giving `-G "Unix Makefiles"` option[1] to `setup.py build`. CMake uses then standard Makefiles instead of ninja. The patch provided as an attachment fixes these issues except the missing bytecode. Additional info: * package version(s) * python-blosc 1.10.6-3 * python-scikit-build 0.13.1-1 * link to upstream bug report, if any * [0] https://github.com/scikit-build/scikit-build/pull/678 * [1] https://scikit-build.readthedocs.io/en/latest/usage.html#command-line-options |
This task depends upon
Closed by Bruno Pagani (ArchangeGabriel)
Friday, 18 March 2022, 21:34 GMT
Reason for closing: Fixed
Additional comments about closing: Everything fixed (I kept ninja because I don’t see the point in removing it), as well as tests enabled.
Friday, 18 March 2022, 21:34 GMT
Reason for closing: Fixed
Additional comments about closing: Everything fixed (I kept ninja because I don’t see the point in removing it), as well as tests enabled.
python-blosc-PKGBUILD.patch
Thank you for filing it. :)
I’ll get onto this at some stage, but I do not mind if other packagers fix it.
So as a first step, I’ve “backported” the patch: https://github.com/archlinux/svntogit-community/commit/9041cf2418d160d397826fb05f713cff4a814d61
Now I’ll also apply the changes to python-blosc, because they are relevant too.