Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722552 - dev-libs/efl-1.23.3: does not compile with -cpu_flags_arm_neon
Summary: dev-libs/efl-1.23.3: does not compile with -cpu_flags_arm_neon
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-11 21:05 UTC by Kyle Evans
Modified: 2020-06-10 05:17 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge.info,5.43 KB, text/plain)
2020-05-11 21:06 UTC, Kyle Evans
Details
native-arch-optimization=false (wip.patch,915 bytes, patch)
2020-05-11 21:15 UTC, Kyle Evans
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans 2020-05-11 21:05:23 UTC
The upstream meson build system makes the assumption that all arm CPU's have the neon instruction set. Not all do, e.g. tegra20.

Reproducible: Always




Editing the ebuild with '-D native-arch-optimization=false' fixes the build. But, that turns off optimizations for everyone. I started modifying the ebuild further to use CPU_FLAGS as a proper selection method, but got stuck trying to find a way to propagate those wishes to the meson build system. It appears that upstream does not currently support this.

This is being built in a qemu-arm container with a distcc cross compiler. 
I suspect that '-D native-arch-optimization=true' breaks normal cross compiling, but that is unverified.
Comment 1 Kyle Evans 2020-05-11 21:06:42 UTC
Created attachment 638252 [details]
emerge --info
Comment 2 Kyle Evans 2020-05-11 21:15:56 UTC
Created attachment 638254 [details, diff]
native-arch-optimization=false
Comment 3 Kyle Evans 2020-05-11 22:15:47 UTC
The native-arch-optimization does three things:

1: set cpu_arch = true, used during evas build
2: use config_h.set10() to define 'BUILD_FLAG'
3: force global CFLAGS

Reference, 
https://git.enlightenment.org/core/efl.git/tree/meson.build?h=v1.24.1#n165
Comment 4 Joonas Niilola gentoo-dev 2020-05-12 06:00:54 UTC
(In reply to Kyle Evans from comment #0)
> The upstream meson build system makes the assumption that all arm CPU's have
> the neon instruction set. Not all do, e.g. tegra20.
> 

I guess a fast fix would be to disable native-arch-optimization on all arm boards for now. But I'll open an upstream issue and see what they do.

> 
> I suspect that '-D native-arch-optimization=true' breaks normal cross
> compiling, but that is unverified.
>

Good point.
Comment 5 Joonas Niilola gentoo-dev 2020-05-25 17:38:20 UTC
So upstream said this problem only hits a minor userbase of arm sockets, and due to nature of Gentoo is only being visible here, so we should deal with it. 

I wonder if there's an "easy" way to detect non-neon supporting arm chips? I see you have USE="arm armv5te armv6 armv6t2", would some of these be any help? I'd rather not query info from native CFLAGS, or live /proc.
Comment 6 Kyle Evans 2020-05-29 01:20:07 UTC
(In reply to Joonas Niilola from comment #5)
> So upstream said this problem only hits a minor userbase of arm sockets, and
> due to nature of Gentoo is only being visible here, so we should deal with
> it. 

That is cool if there is a better way to deal with this than what I had in mind. What are your thoughts?

> I wonder if there's an "easy" way to detect non-neon supporting arm chips? I
> see you have USE="arm armv5te armv6 armv6t2", would some of these be any
> help? I'd rather not query info from native CFLAGS, or live /proc.

I would say -cpu_flags_neon, but gentoo gets this wrong too in the armv7 profile. I have it masked in my local profile. There is also USE=-neon. I think relying on the user having these set correctly is not unreasonable.
Comment 7 Larry the Git Cow gentoo-dev 2020-06-10 05:17:03 UTC
The bug has been closed via the following commit(s):

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

commit 46b1048c257e1074ddaaaaa6ee88ffbac431a6d7
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2020-06-10 05:16:11 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-06-10 05:16:49 +0000

    dev-libs/efl: fix arm[-neon] CPU builds, #722552
    
    Closes: https://bugs.gentoo.org/722552
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-libs/efl/efl-1.24.2.ebuild | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)