Building on ARMv7l

Issue #256 resolved
Colin Wee created an issue

x265 team,

Hi, I'm having the same issue as #167 when building on my Raspberry Pi 2 (running Debian-jessie). Here's the end of my make output:

[ 98%] Building CXX object CMakeFiles/cli.dir/x265.cpp.o
[100%] Building CXX object CMakeFiles/cli.dir/x265-extras.cpp.o
Linking CXX executable x265
libx265.a(cpu.cpp.o): In function `x265::cpu_detect()':
cpu.cpp:(.text+0x94): undefined reference to `x265_cpu_neon_test'
cpu.cpp:(.text+0xa8): undefined reference to `x265_cpu_fast_neon_mrc_test'
collect2: error: ld returned 1 exit status
CMakeFiles/cli.dir/build.make:311: recipe for target 'x265' failed
make[2]: *** [x265] Error 1
CMakeFiles/Makefile2:91: recipe for target 'CMakeFiles/cli.dir/all' failed
make[1]: *** [CMakeFiles/cli.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

I'm following the steps described here. I've tried makeing from both build/linux and build/arm-linux, but they both produce the same result.

I can provide further information about my setup if needed. Thanks!

Comments (5)

  1. Former user Account Deleted

    Hi Colin, Pls ensure that the ARM processor was detected by x265. If it had, the cmake output would contain a "Detected ARM target processor" in the console. Also, we use a cortex-a15 for our development, which also implements the armv7 architecture and we are able to build with no issues. Note that our ARM support is rudimentary as of now.

  2. Colin Wee reporter

    Yep, cmake did output that it had detected an ARM processor. By now, I've managed to debug the problem. I saw that cmake wasn't passing the conditional if(ENABLE_ASSEMBLY AND (ARM OR CROSS_COMPILE_ARM)) on line 88 in source/common/CMakeLists.txt, so I set the flag ENABLE_ASSEMBLY manually via the command line like this:

    PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off -DENABLE_ASSEMBLY:bool=on ../../source
    

    Does this sound like the right solution, or do you think it could cause issues on an ARMv7l? Also, since the default option seems to be to keep the asm primitives off, is there another solution for those who don't want to turn them on?

  3. Pradeep Ramachandran Account Deactivated

    Colin, We have been running x265 on a Jetson TK1 board with an ARM Cortex A-15 and don't have any problems so far with turning on assembly optimizations. If you see any problems, please ping back here and we can help root-cause it.

    Pradeep.

  4. Colin Wee reporter

    Thanks for the help! No problems here yet, just wanted to make sure you didn't see anything wrong with that solution.

  5. Log in to comment