Created attachment 263802 [details] files/patch-src_knot_modules_rrl_kru-avx2.c There is an issue with the Knot3 build that is not optimized properly on SandyBridge and later CPUs. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - In file included from knot/modules/rrl/kru-avx2.c:43: knot/modules/rrl/./kru.inc.c:250:7: error: always_inline function '_mm_load_si128' requires target feature 'pclmul', but would be inlined into function 'kru_limited_prefetch' that is compiled without support for 'pclmul' 250 | h = _mm_load_si128((__m128i *)key); | ^ : fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. *** [knot/modules/rrl/libknotd_la-kru-avx2.lo] Error code 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If you are targeting IceLake and/or later CPUs, there is a problem with the following code: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #pragma clang attribute push (__attribute__((target("arch=x86-64-v3,aes"))), - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The pragma is missing, so you need to add it as follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #pragma clang attribute push (__attribute__((target("arch=x86-64-v4,aes,pclmul,adx,rdseed,rdrnd,prfchw,xsaveopt,xsaves,avx512vnni,pku,clwb,fsgsbase,clflushopt,invpcid,xsavec"))), apply_to = function) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OR simplefully, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #pragma clang attribute push (__attribute__((target("arch=icelake-client"))), apply_to = function) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I think that it just seems like unnecessary code, at least on FreeBSD.
FYI: You can reproduce this issue using the following method: cd /usr/ports/dns/knot3 make CPUTYPE= : OK (default) make CPUTYPE=nehalem : OK make CPUTYPE=sandybridge : NG make CPUTYPE=haswell : NG make CPUTYPE=skylake : NG make CPUTYPE=cascadelake : NG make CPUTYPE=icelake-client : NG
I comprehend the problem, not the code. What's wisedom? Simply apply this patch and report upstream?
Reported upstream: https://gitlab.nic.cz/knot/knot-dns/-/merge_requests/1815
Created attachment 265442 [details] files/patch-src_knot_modules_rrl_kru-avx2.c ^Triage: rename the patch so that it will apply correctly.
(In reply to Norikatsu Shigemura from comment #0) Issue was reported, and addressed upstream. PR 291264 absoletes this PR.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=be60b49d5a9bcfd93dcc3a39a3d68f0aef7a9a06 commit be60b49d5a9bcfd93dcc3a39a3d68f0aef7a9a06 Author: Einar Bjarni Halldórsson <einar@isnic.is> AuthorDate: 2025-12-02 19:22:27 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-12-02 19:25:12 +0000 dns/{knot3,py-libknot}: Update 3.5.0 => 3.5.2 Changelog: https://gitlab.nic.cz/knot/knot-dns/raw/v3.5.2/NEWS PR: 291264 289611 Approved by: Leo Vandewoestijne <freebsd@dns.company> (maintainer) MFH: 2025Q4 dns/knot3/distinfo | 6 +++--- dns/knot3/distinfo.py-libknot | 6 +++--- dns/knot3/knotdns.mk | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-)
A commit in branch 2025Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9f15b6057785567ea4537cebce88dd52810c9ed4 commit 9f15b6057785567ea4537cebce88dd52810c9ed4 Author: Einar Bjarni Halldórsson <einar@isnic.is> AuthorDate: 2025-12-02 19:22:27 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-12-02 19:27:23 +0000 dns/{knot3,py-libknot}: Update 3.5.0 => 3.5.2 Changelog: https://gitlab.nic.cz/knot/knot-dns/raw/v3.5.2/NEWS PR: 291264 289611 Approved by: Leo Vandewoestijne <freebsd@dns.company> (maintainer) MFH: 2025Q4 (cherry picked from commit be60b49d5a9bcfd93dcc3a39a3d68f0aef7a9a06) dns/knot3/distinfo | 6 +++--- dns/knot3/distinfo.py-libknot | 6 +++--- dns/knot3/knotdns.mk | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-)