Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 869077 - >=dev-cpp/highway-1.0.1 fails to compile on armv7a with: inlining failed in call to ‘always_inline’ ‘void vst1q_u64(uint64_t*, uint64x2_t)’: target specific option mismatch 11002 | vst1q_u64 (uint64_t * __a, uint64x2_t __b)
Summary: >=dev-cpp/highway-1.0.1 fails to compile on armv7a with: inlining failed in c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Novomeský
URL: https://github.com/google/highway/iss...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-09-07 10:09 UTC by tt_1
Modified: 2023-03-07 11:44 UTC (History)
1 user (show)

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


Attachments
compressed build log with gcc-10.4.0 (highway-9999-with-cross-gcc-10.4.0.log.gz,4.05 KB, application/gzip)
2022-09-07 10:09 UTC, tt_1
Details
compressed build log with gcc-11.3.0 (highway-9999-with-native-gcc-11.3.0.log.gz,3.35 KB, application/gzip)
2022-09-07 10:12 UTC, tt_1
Details
output of emerge --info (emerge-info,5.82 KB, text/plain)
2022-09-07 10:18 UTC, tt_1
Details
patch for the ebuilds (highway-9999.patch,515 bytes, patch)
2022-09-07 12:37 UTC, tt_1
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-09-07 10:09:53 UTC
Created attachment 803806 [details]
compressed build log with gcc-10.4.0

hey everyone, 

there is a compile error for dev-cpp/highway-1.0.1 and newer on armv7a: 


$ cat highway-9999-with-cross-gcc-10.4.0.log | grep error:

/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:11002:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_u64(uint64_t*, uint64x2_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:11002:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_u64(uint64_t*, uint64x2_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10944:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s16(int16_t*, int16x8_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10944:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s16(int16_t*, int16x8_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10951:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s32(int32_t*, int32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10951:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s32(int32_t*, int32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10958:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s64(int64_t*, int64x2_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10958:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_s64(int64_t*, int64x2_t)’: target specific option mismatch
Comment 1 tt_1 2022-09-07 10:12:36 UTC
Created attachment 803809 [details]
compressed build log with gcc-11.3.0

reproduced with native gcc-11.3.0
Comment 2 tt_1 2022-09-07 10:15:58 UTC
I've opened an issue with upstream a few weeks ago, and it seems there is nothing the devs can do to help with the issue. 

Therefore, can please someone from the toolchain team have a look at this? 

easy reproducer: 

emerge -av =dev-cpp/highway-9999

[ebuild     U *] dev-cpp/highway-9999::gentoo [0.17.0::gentoo] to /usr/armv7a-unknown-linux-gnueabihf/ USE="-test" 0 KiB
Comment 3 tt_1 2022-09-07 10:18:20 UTC
Created attachment 803812 [details]
output of emerge --info
Comment 4 Tee KOBAYASHI 2022-09-07 11:56:14 UTC
Try adding -mfpu=neon to *FLAGS.
Comment 5 Stephan Hartmann (RETIRED) gentoo-dev 2022-09-07 12:14:24 UTC
There is a HWY_CMAKE_ARM7 cmake flag, which enables NEON (default off). Maybe enable it with arm neon USE expand.
Comment 6 tt_1 2022-09-07 12:37:21 UTC
Created attachment 803824 [details, diff]
patch for the ebuilds

alas, you're right with passing neon flags. 

the attached patch fixes the issue, I think it will force neon to all ARCH=arm and ignore all other ARCH. please commit if you feel its correct, but really no need to post my private email in the public commit msg. Thank you.
Comment 7 Larry the Git Cow gentoo-dev 2022-10-10 12:20:14 UTC
The bug has been referenced in the following commit(s):

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

commit 2873436957fb527e0fd84838c3d8e09f6b1171d8
Author:     Daniel Novomesky <dnovomesky@gmail.com>
AuthorDate: 2022-09-15 06:44:45 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-10-10 12:20:07 +0000

    dev-cpp/highway: fix buiding on ARM Neon
    
    Bug: https://bugs.gentoo.org/869077
    
    Signed-off-by: Daniel Novomesky <dnovomesky@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/27263
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-cpp/highway/{highway-1.0.1.ebuild => highway-1.0.1-r1.ebuild} | 3 ++-
 dev-cpp/highway/highway-9999.ebuild                               | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2023-03-07 11:44:31 UTC
The bug has been closed via the following commit(s):

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

commit 1f2eceb5dfcce9899649870caac59d62055e7b82
Author:     stefson <herrtimson@yahoo.de>
AuthorDate: 2023-03-07 11:01:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-07 11:44:19 +0000

    dev-cpp/highway: fix compile without neon optimization on armv7
    
    Closes: https://bugs.gentoo.org/869077
    Signed-off-by: Steffen Kuhn <nielson2@yandex.com>
    Closes: https://github.com/gentoo/gentoo/pull/29964
    Signed-off-by: Sam James <sam@gentoo.org>

 ...ile-for-armv7-targets-with-vfp4-and-lower.patch | 123 +++++++++++++++++++++
 dev-cpp/highway/highway-1.0.1-r1.ebuild            |   6 +-
 dev-cpp/highway/highway-1.0.3.ebuild               |   4 +
 3 files changed, 132 insertions(+), 1 deletion(-)