undefined reference to `x265_cpu_neon_test' & `x265_cpu_fast_neon_mrc_test'
I am trying to build the cross compiler for arm and this is the error which I get for the make command. It seems similar to this issue here: Issue #155 https://bitbucket.org/multicoreware/x265/issues/155/undefined-reference-to-x265_cpu_neon_test , but it seems to be an old thread. Any fix for this one?
Here's the output of the make command:
[ 30%] Built target encoder
[ 80%] Built target common
[ 81%] Built target x265-static
[ 83%] Built target x265-shared
[ 85%] Linking CXX executable x265
libx265.so.173: undefined reference to x265_cpu_neon_test'
libx265.so.173: undefined reference to
x265_cpu_fast_neon_mrc_test'
collect2: error: ld returned 1 exit status
CMakeFiles/cli.dir/build.make:303: recipe for target 'x265' failed
make[2]: [x265] Error 1
CMakeFiles/Makefile2:207: recipe for target 'CMakeFiles/cli.dir/all' failed
make[1]: [CMakeFiles/cli.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Hi, I have just run into the same issue. When compiling for ARM64, then ARM assembly code does not work. When I disable assembly code, then this error comes.
The problem is with this code in primitives.cpp:
The two functions cpu_neon_test and cpu_fast_neon_mrc_test are only implemented in assembly code (cpu-a.S). When assembly code is disabled, then we need those two dummy implementations. The code works when change it like this:
Now the dummy implementation is available on ARM when assembly code is disabled. When no assembly code is used, we do not need any NEON checks, so things should be fine.