Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 929249

Summary: media-libs/opencv-4.9.0 fails to build without CPU_FLAGS_ARM: neon
Product: Gentoo Linux Reporter: James Calligeros <jcalligeros99>
Component: Current packagesAssignee: Paul Zander <negril.nx+gentoo>
Status: IN_PROGRESS ---    
Severity: normal CC: jcalligeros99, leio, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: ARM64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log

Description James Calligeros 2024-04-13 06:16:45 UTC
Attempting to build media-libs/opencv-4.9.0 without unmasking cpu_flags_arm_neon causes the linker to find undefined references to NEON functions. Tested with GCC+bfd and Clang+lld. Manually unmasking cpu_flags_arm_neon and building resolves the issue using both toolchains, but this of course then introduces issues with other packages.
Comment 1 Mike Gilbert gentoo-dev 2024-04-14 03:09:31 UTC
Please provide emerge --info and attach a build log demonstrating the link failure.
Comment 2 James Calligeros 2024-04-14 04:33:49 UTC
Created attachment 890747 [details]
emerge --info
Comment 3 James Calligeros 2024-04-14 04:34:56 UTC
Created attachment 890748 [details]
build.log
Comment 4 Mart Raudsepp gentoo-dev 2024-04-20 17:36:48 UTC
cpu_flags_arm_neon shouldn't be used on arm64 - it's really for 32-bit NEON.
The problem is that this is undocumented, not even widely agreed on in more public mediums and not all packages actually unconditionally enable 64-bit NEON on arm64 arch.
Comment 5 James Calligeros 2024-04-21 01:34:24 UTC
I am well aware of what the behaviour *should* be, hence the bug.
Comment 6 Mart Raudsepp gentoo-dev 2024-04-21 08:42:44 UTC
I was discussing this with Paul on IRC and thus "documented" it here for his justification purposes to proxy maintainers or otherwise :)
Comment 7 Paul Zander 2024-04-21 18:02:26 UTC
cpu_flags_arm_neon has been unmasked in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cebb6e2fdce12a8c5f81f1b19bd494469ace2786

I'll leave this bug open until the situation is cleared up so I have a reminder.