Page MenuHomePhabricator

builds broken on aarch64 after adding SVE support
Open, Incoming QueuePublic

Description

Our CI shows the aarch64 build broken after commit 168fec6995d526764126080d46e7890aff2a6e7b, the build system is Fedora 28 for aarch64

  CC       lib/evas/common/lib_evas_libevas_la-evas_cpu.lo
lib/evas/common/evas_cpu.c: In function ‘evas_common_cpu_init’:
lib/evas/common/evas_cpu.c:283:11: warning: implicit declaration of function ‘evas_common_cpu_feature_test’; did you mean ‘evas_common_cpu_end_opt’? [-Wimplicit-function-declaration]
           evas_common_cpu_feature_test(evas_common_cpu_sve_test);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
           evas_common_cpu_end_opt
lib/evas/common/evas_cpu.c:283:40: error: ‘evas_common_cpu_sve_test’ undeclared (first use in this function); did you mean ‘evas_common_cpu_end_opt’?
           evas_common_cpu_feature_test(evas_common_cpu_sve_test);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~
                                        evas_common_cpu_end_opt
lib/evas/common/evas_cpu.c:283:40: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [Makefile:39120: lib/evas/common/lib_evas_libevas_la-evas_cpu.lo] Error 1
sharkcz created this task.Tue, Dec 4, 8:36 AM

- full build log

bu5hm4n assigned this task to raster.Tue, Dec 4, 8:55 AM
bu5hm4n added a project: Restricted Project.
raster added a comment.Thu, Dec 6, 6:41 AM

eh? i am building on aarch64 all the time... my main office desktop is aarch64...

raster added a comment.Thu, Dec 6, 6:44 AM

oh wait.. autotools build. not meson.... let me check.

raster added a comment.Thu, Dec 6, 6:54 AM

hmm no - autofoo build works.... for me on aarch64.

 2:43pm ~ > cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 400.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics cpuid asimdrdm
CPU implementer : 0x43
CPU architecture: 8
CPU variant     : 0x1
CPU part        : 0x0af
CPU revision    : 1
...

I'm building on APM Mustang X-Gene

[sharkcz@apm-mustang-ev3-05 ~]$ cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 100.00
Features	: fp asimd evtstrm cpuid
CPU implementer	: 0x50
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x000
CPU revision	: 0

Let me check, if it's not an issue with the CI setup that builds EFL daily.

raster added a comment.Thu, Dec 6, 7:20 AM

hmm i think you have a specific ifdef path different to all my machines.NEED_FEATURE_TEST is not defined for you i am guessing. did you disable neon explicitly?

#if defined(__aarch64__)
# ifdef BUILD_NEON
#  define NEED_FEATURE_TEST
# endif
#endif

?

aha, yes, I did with --disable-neon, it's inherited option from from our 32-bit arm build

raster added a comment.Thu, Dec 6, 7:31 AM

why disable neon even on 32bit? it's runtime detected and enabled if the cpu supports it at runtime... :)

why disable neon even on 32bit? it's runtime detected and enabled if the cpu supports it at runtime... :)

it has been copied from our Fedora package build config, wasn't the use of neon hard-coded in the past? Anyway, I can fix that for the future builds.

raster added a comment.Thu, Dec 6, 7:36 AM

neon use was never hard-coded. it used the same detection infra we had for x86 and altivec - runtime detection and then enabling of the calls to the neon (or mmx/sse3 etc.) asm functions instead of the plain C ones

raster added a comment.Thu, Dec 6, 7:57 AM

neon is enabled on aarch64... has been for a long time... :/ aarch64 technically doesn't even need the neon checks. neon is default on aarch64... everywhere. :) sve is new... but not available in silicon yet. i was about to do some sve work but realized i had no silicon to test it on (and i didn't have the patience to do it in a sw virtual cpu system...), but i had done the detect work so thought i'd push it anyway.

still get a warning during compile and then failure in the linking with the fix applied

lib/evas/common/evas_cpu.c: In function ‘evas_common_cpu_init’:
lib/evas/common/evas_cpu.c:282:11: warning: implicit declaration of function ‘evas_common_cpu_feature_test’; did you mean ‘evas_common_cpu_sve_test’? [-Wimplicit-function-declaration]
           evas_common_cpu_feature_test(evas_common_cpu_sve_test);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
           evas_common_cpu_sve_test

still there?