Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926959 - x11-terms/kitty-0.33.0: ~amd64 build failure with /usr/include/simde/arm/neon/paddl.h:289:9: error: ‘simde_uint32x4_private’ has no member named ‘ sse_m128i’
Summary: x11-terms/kitty-0.33.0: ~amd64 build failure with /usr/include/simde/arm/neon...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ionen Wolkens
URL: https://github.com/kovidgoyal/kitty/i...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-13 23:30 UTC by B. Gazotti
Modified: 2024-03-25 13:00 UTC (History)
4 users (show)

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


Attachments
build log (build.log,89.99 KB, text/x-log)
2024-03-13 23:30 UTC, B. Gazotti
Details
emerge --info output (emerge-info.log,9.38 KB, text/x-log)
2024-03-13 23:34 UTC, B. Gazotti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description B. Gazotti 2024-03-13 23:30:35 UTC
Created attachment 887560 [details]
build log

0.33.0 build fails with the following:


Compiling kitty/simd-string-256.c ...
x86_64-pc-linux-gnu-gcc -MMD -DNDEBUG -DHAS_COPY_FILE_RANGE -march=bdver2 -pipe -O2 -ftree-vectorize -fsched-pressure -DPRIMARY_VE
RSION=4000 -DSECONDARY_VERSION=33 -DXT_VERSION="0.33.0" -Wextra -Wfloat-conversion -Wno-missing-field-initializers -Wall -Wstrict-
prototypes -std=c11 -fwrapv -fstack-protector-strong -pipe -fvisibility=hidden -D_FORTIFY_SOURCE=2 -fno-plt -fPIC -march=bdver2 -p
ipe -O2 -ftree-vectorize -fsched-pressure -fcf-protection=full -pthread -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/in
clude/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/inclu
de/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/python3.12 -mavx2 -mno-vzeroupper -c kitty/simd-string-256.c -o build/fas
t_data_types-kitty-simd-string-256.c.o
In file included from /usr/include/simde/arm/neon/dot.h:38,
                 from /usr/include/simde/arm/neon.h:71,
                 from kitty/simd-string-impl.h:36,
                 from kitty/simd-string-256.c:9:
/usr/include/simde/arm/neon/paddl.h: In function ‘simde_vpaddlq_u16’:
/usr/include/simde/arm/neon/paddl.h:289:9: error: ‘simde_uint32x4_private’ has no member named ‘
sse_m128i’
  289 |       r_.sse_m128i = _mm_haddd_epu16(a_.sse_m128i);
      |         ^
/usr/include/simde/arm/neon/paddl.h:289:40: error: ‘simde_uint16x8_private’ has no member named ‘
sse_m128i’
  289 |       r_.sse_m128i = _mm_haddd_epu16(a_.sse_m128i);

I'm on a x86_64 arch (AMD FX-6300) as you may have guessed from the CFLAGS. Not sure why -mavx2 was also there, as my CPU does not support it.
Comment 1 B. Gazotti 2024-03-13 23:34:52 UTC
Created attachment 887562 [details]
emerge --info output
Comment 2 B. Gazotti 2024-03-14 00:27:35 UTC
Comes down to upstream's assumption of AVX2 support on all amd64 arches and good ol' Bulldozer quirks. Closed.
Comment 3 Ionen Wolkens gentoo-dev 2024-03-14 03:51:45 UTC
The -mavx2 shouldn't be harmful, simde is is there to provide runtime support for missing instructions.

But I believe simde is misdetecting something, e.g. -march=x86-64-v2 (or -v2 with -mavx which leaves it still missing avx2) is fine, but -march=bdver2 is not.

Still need to look closer at this but issue is "probably" in simde rather than kitty. Meanwhile you can use -march=x86-64-v2 as a workaround.
Comment 4 Ionen Wolkens gentoo-dev 2024-03-14 04:09:39 UTC
I noted that on the upstream bug too, but actually seems to be because -march=bdver2 enables -mxop or something related (I was wondering what it enabled that my -march=native didn't, and xop came up).

I'll check for another workaround, albeit issue is likely in simde rather than kitty.
Comment 5 Larry the Git Cow gentoo-dev 2024-03-14 04:35:50 UTC
The bug has been closed via the following commit(s):

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

commit 21d67dd1f21db33bb7d1611baa3727b378e47c96
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-03-14 04:31:29 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-03-14 04:35:13 +0000

    x11-terms/kitty: workaround simde issue with -mxop
    
    Haven't actually tried bdver2 that bug #926959 used given hit
    illegal instructions mid-build, but should work in theory given
    it does with -mxop.
    
    Thankfully simde gives a lot of defines to control what it does,
    but ideally it should be looked at in simde itself upstream.
    
    Closes: https://bugs.gentoo.org/926959
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 x11-terms/kitty/kitty-0.33.0.ebuild | 3 +++
 x11-terms/kitty/kitty-9999.ebuild   | 3 +++
 2 files changed, 6 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2024-03-25 13:00:06 UTC
The bug has been referenced in the following commit(s):

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

commit 3cea96e7e03776c37b7840687efae41981afe2c7
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-03-25 12:53:37 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-03-25 12:55:38 +0000

    x11-terms/kitty: tentatively drop -mxop workaround
    
    Patched in simde instead, if was affected may want to report on
    the upstream bug for whether the fix works as expected or not.
    
    Bug: https://bugs.gentoo.org/926959
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 x11-terms/kitty/kitty-0.33.1.ebuild | 5 +----
 x11-terms/kitty/kitty-9999.ebuild   | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

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

commit 46b9fab4b1cd9982b40d61da7b44dc42fb444252
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-03-25 12:50:45 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-03-25 12:51:05 +0000

    dev-libs/simde: fix usage with -mxop
    
    Bug: https://bugs.gentoo.org/926959
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-libs/simde/files/simde-0.8.0-xop.patch         | 28 ++++++++++++++++++++++
 .../{simde-0.8.0.ebuild => simde-0.8.0-r1.ebuild}  |  1 +
 2 files changed, 29 insertions(+)