Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946821 - dev-libs/botan-3.6.1 - src/lib/block/sm4/sm4_gfni/sm4_gfni.cpp:9:10: fatal error: botan/internal/simd_avx2.h: No such file or directory
Summary: dev-libs/botan-3.6.1 - src/lib/block/sm4/sm4_gfni/sm4_gfni.cpp:9:10: fatal er...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sam James
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-22 13:17 UTC by jospezial
Modified: 2024-12-27 13:38 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,35.50 KB, text/x-log)
2024-12-22 13:17 UTC, jospezial
Details
emerge --info (emerge--info.txt,9.97 KB, text/plain)
2024-12-22 13:19 UTC, jospezial
Details
emerge --info (emerge.info,6.57 KB, text/plain)
2024-12-22 17:21 UTC, Mark Locascio
Details
build log (build.log,38.00 KB, text/x-log)
2024-12-22 17:22 UTC, Mark Locascio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2024-12-22 13:17:39 UTC
Created attachment 914708 [details]
build.log

[ebuild  r  U  ] dev-libs/botan-3.6.1:3/3.6::gentoo [3.2.0-r2:3/3.2::gentoo] USE="boost bzip2 lzma python sqlite zlib -doc -static-libs -test -tools -verify-sig" CPU_FLAGS_X86="popcnt sse2 -aes -avx2 -rdrand -sha -sse4_1 -sse4_2 -ssse3" PYTHON_TARGETS="python3_11 python3_12 -python3_10 -python3_13" 0 KiB

[37/491] x86_64-pc-linux-gnu-g++ -fPIC -fvisibility=hidden -fstack-protector -m64 -pthread -std=c++20 -D_REENTRANT  -march=native -O2 -pipe -DBOTAN_IS_BEING_BUILT -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor -Wold-style-cast -Wsuggest-override -Wshadow -Wextra-semi -mgfni -mavx2 -I build/include/public -I build/include/internal  -isystem build/include/external -MD -MF build/obj/lib/block_sm4_gfni.o.d -c src/lib/block/sm4/sm4_gfni/sm4_gfni.cpp -o build/obj/lib/block_sm4_gfni.o
FAILED: build/obj/lib/block_sm4_gfni.o 
x86_64-pc-linux-gnu-g++ -fPIC -fvisibility=hidden -fstack-protector -m64 -pthread -std=c++20 -D_REENTRANT  -march=native -O2 -pipe -DBOTAN_IS_BEING_BUILT -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor -Wold-style-cast -Wsuggest-override -Wshadow -Wextra-semi -mgfni -mavx2 -I build/include/public -I build/include/internal  -isystem build/include/external -MD -MF build/obj/lib/block_sm4_gfni.o.d -c src/lib/block/sm4/sm4_gfni/sm4_gfni.cpp -o build/obj/lib/block_sm4_gfni.o
src/lib/block/sm4/sm4_gfni/sm4_gfni.cpp:9:10: fatal error: botan/internal/simd_avx2.h: No such file or directory
    9 | #include <botan/internal/simd_avx2.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[38/491] x86_64-pc-linux-gnu-g++ -fPIC -fvisibility=hidden -fstack-protector -m64 -pthread -std=c++20 -D_REENTRANT  -march=native -O2 -pipe -DBOTAN_IS_BEING_BUILT -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor -Wold-style-cast -Wsuggest-override -Wshadow -Wextra-semi  -I build/include/public -I build/include/internal  -isystem build/include/external -MD -MF build/obj/lib/block_sm4.o.d -c src/lib/block/sm4/sm4.cpp -o build/obj/lib/block_sm4.o
ninja: build stopped: subcommand failed.
 * ERROR: dev-libs/botan-3.6.1::gentoo failed (compile phase):
 *   ninja -v -j2 -l0 failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 2621:  Called eninja
 *   environment, line 1200:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"



find /var/tmp/portage/dev-libs/botan-3.6.1/ -name simd_avx2.h
/var/tmp/portage/dev-libs/botan-3.6.1/work/Botan-3.6.1/src/lib/utils/simd/simd_avx2/simd_avx2.h

find /var/tmp/portage/dev-libs/botan-3.6.1/ -name *simd*.h
/var/tmp/portage/dev-libs/botan-3.6.1/work/Botan-3.6.1/build/include/internal/botan/internal/simd_32.h
/var/tmp/portage/dev-libs/botan-3.6.1/work/Botan-3.6.1/build/include/internal/botan/internal/simd_avx512.h
/var/tmp/portage/dev-libs/botan-3.6.1/work/Botan-3.6.1/src/lib/utils/simd/simd_avx2/simd_avx2_gfni.h
/var/tmp/portage/dev-libs/botan-3.6.1/work/Botan-3.6.1/src/lib/utils/simd/simd_avx2/simd_avx2.h
/var/tmp/portage/dev-libs/botan-3.6.1/work/Botan-3.6.1/src/lib/utils/simd/simd_avx512/simd_avx512.h
/var/tmp/portage/dev-libs/botan-3.6.1/work/Botan-3.6.1/src/lib/utils/simd/simd_32.h
Comment 1 jospezial 2024-12-22 13:19:13 UTC
Created attachment 914709 [details]
emerge --info
Comment 2 Mark Locascio 2024-12-22 17:21:42 UTC
Created attachment 914739 [details]
emerge --info
Comment 3 Mark Locascio 2024-12-22 17:22:14 UTC
Created attachment 914740 [details]
build log
Comment 4 Mark Locascio 2024-12-22 17:22:43 UTC
Same issue, added build log and emerge info for comparison.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-22 19:48:49 UTC
Does it work with -j1?
Comment 6 Mark Locascio 2024-12-22 21:16:33 UTC
No, same error when running with -j1.
Comment 7 stealth 2024-12-23 00:05:25 UTC
i discovered that i had not configured cpu_flags_x86 and had the same issue so i configured that globally with cpuidtocpuflags and it builds so there is something wrong with -avx2 and that file depending on it
Comment 8 stealth 2024-12-23 00:33:15 UTC
i don't know how to edit my last comment but this is the commit which seems to have caused the problem: 

https://github.com/randombit/botan/commit/0af586f301a8ded81da5c0b926f83f5b3c34030b
Comment 9 email200202 2024-12-23 03:29:51 UTC
I got the same error
Comment 10 Larry the Git Cow gentoo-dev 2024-12-23 08:57:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7121988c8b10886d2793f83550cfb05ceb24720

commit c7121988c8b10886d2793f83550cfb05ceb24720
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-12-23 08:57:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-23 08:57:16 +0000

    dev-libs/botan: fix build w/o avx2
    
    Closes: https://bugs.gentoo.org/946821
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/botan/botan-3.6.1.ebuild              |  1 +
 dev-libs/botan/files/botan-3.6.1-no-avx2.patch | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
Comment 11 Larry the Git Cow gentoo-dev 2024-12-27 13:38:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24a328ad4d5035ffc5e751fbab71631faa8c24e8

commit 24a328ad4d5035ffc5e751fbab71631faa8c24e8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-12-27 13:23:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-27 13:23:06 +0000

    dev-libs/botan: refresh no-avx2 patch to upstream variant
    
    It got tweaked upstream before merging.
    
    Bug: https://bugs.gentoo.org/946821
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/botan/files/botan-3.6.1-no-avx2.patch | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)