Created attachment 228163 [details] py-tables-fix-automatic-avx2-support.patch Hi Wen, if devel/py-tables is built on amd64 hosts that have a CPU with AVX2 support, optimizations for that CPU are automatically compiled in. This then causes problems for amd64 hosts that have no AVX2, because the generated .so files then contains unknown instructions for those hosts and they crash with SIGILL. It was discovered by dvl@, where devel/py-tables was built on a host with AVX2 and then used in a VM without AVX2. QA: ~~~ - poudriere -> OK [*] (11.4-, 12.2-, 13.0-RELEASE, 14.0-CURRENT@9f7a81b133 amd64/i386 for py36, py37, py38, py39) [*] I myself only have a host without AVX2, but dvl@ has already confirmed (via IRC) that the original patch fixed the issue. Attached you can find a patch for the above issue. In contrast to the original patch, which was tested by dvl@, only one detail has changed: The option AVX2 is only displayed for amd64 hosts, because AVX2 is an amd64 CPU feature. At last but not least: This also needs to be MFH'ed.
Approved. Thank you ! wen
Would you commit it ?
Comment on attachment 228163 [details] py-tables-fix-automatic-avx2-support.patch ^ Triage: Set maintainer-approval to '+' as given via comment #2.
(In reply to Wen Heping from comment #2) Thank you for your quick review and approval. I'll commit and MFH it in the next few days.
Note even if one creates issues/reviews as a heads-up to maintainers, that build/run fixes are: Approved by: portmgr (blanket: build fix)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f31b25e7dc91402729ecc19c1fca66e9ebe5ddc8 commit f31b25e7dc91402729ecc19c1fca66e9ebe5ddc8 Author: Kai Knoblich <kai@FreeBSD.org> AuthorDate: 2021-09-28 07:43:34 +0000 Commit: Kai Knoblich <kai@FreeBSD.org> CommitDate: 2021-09-28 07:43:34 +0000 devel/py-tables: Disable AVX2 CPU optimizations On amd64 platforms that have a CPU with Haswell New Instructions (AVX2), related optimizations are automatically compiled in, unless this is explicitly prevented. If the package is then used on other amd64 platforms, that have no AVX2 support, this causes problems, because the generated .so files are incompatible and lead to crashes with SIGILL upon invocation. Remedy the issue by turning off AVX2 support by default which is also upstream's default and bump PORTREVISION to force a rebuild. PR: 258714 Reported by: dvl (on IRC) Reviewed by: wen (maintainer) Approved by: portmgr (blanket: build fix) MFH: 2021Q3 devel/py-tables/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
A commit in branch 2021Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=70843a665d45e14e5b45a87b4c6205555040c555 commit 70843a665d45e14e5b45a87b4c6205555040c555 Author: Kai Knoblich <kai@FreeBSD.org> AuthorDate: 2021-09-28 07:43:34 +0000 Commit: Kai Knoblich <kai@FreeBSD.org> CommitDate: 2021-09-28 08:04:57 +0000 devel/py-tables: Disable AVX2 CPU optimizations On amd64 platforms that have a CPU with Haswell New Instructions (AVX2), related optimizations are automatically compiled in, unless this is explicitly prevented. If the package is then used on other amd64 platforms, that have no AVX2 support, this causes problems, because the generated .so files are incompatible and lead to crashes with SIGILL upon invocation. Remedy the issue by turning off AVX2 support by default which is also upstream's default and bump PORTREVISION to force a rebuild. PR: 258714 Reported by: dvl (on IRC) Reviewed by: wen (maintainer) Approved by: portmgr (blanket: build fix) MFH: 2021Q3 (cherry picked from commit f31b25e7dc91402729ecc19c1fca66e9ebe5ddc8) devel/py-tables/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
(In reply to Wen Heping from comment #1) Committed to main and merged to 2021Q1 as well. Once again thank you for the quick review!