Hello again @tomoaki0705 , thank you very much for your continued assistance.
[osboxes:/opencv/opencv] $ aarch64-linux-gnu-g++ cmake/checks/cpu_neon.cpp
In file included from cmake/checks/cpu_neon.cpp:8:0:
/usr/lib/gcc/aarch64-linux-gnu/4.9/include/arm_neon.h: In function 'uint8x8_t vqadd_u8(uint8x8_t, uint8x8_t)':
/usr/lib/gcc/aarch64-linux-gnu/4.9/include/arm_neon.h:2116:51: error: '__builtin_aarch64_uqaddv8qi_uuu' was not declared in this scope
return __builtin_aarch64_uqaddv8qi_uuu (__a, __b);
... similar errors
[osboxes:/opencv/opencv] 1 $ cat $CMAKE_TOOLCHAIN_FILE
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(cross_triple "aarch64-linux-gnu")
set(CMAKE_C_COMPILER /usr/bin/${cross_triple}-cc)
set(CMAKE_CXX_COMPILER /usr/bin/${cross_triple}-c++)
set(CMAKE_Fortran_COMPILER /usr/bin/${cross_triple}-gfortran)
# Discard path returned by pkg-config and associated with HINTS in module
# like FindOpenSSL.
set(CMAKE_IGNORE_PATH /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/lib/)
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64)
Just a quirk of me using the command inside the docker inside a directory installed by the Dockerfile's command that ran as root. I don't have access to the folder otherwise. It's not really important.
Digging inside the Dockcross project, I beleive the package is crossbuild-essential-arm64
I'm just following the instructions found here. The soft link is pretty worthless, I forgot it's even there. I removed it in the dockerfiles I've developed for other platforms already.
As for your last question, I'm building a large piece of software that relies on OpenCV. My project's build is fully automated using Jenkins and AWS, with all builds occurring on a single Linux slave, with a single unified script. I do own an ARM64 device, but using it as a compilation slave for my team is out of the question.
Answering your comment:
[osboxes:/opencv/opencv] $ ls -l /usr/bin/aarch64-linux-gnu-c++
lrwxrwxrwx 1 root root 39 Jan 29 19:11 /usr/bin/aarch64-linux-gnu-c++ -> /etc/alternatives/aarch64-linux-gnu-c++
Nice investigation.
So, where does /usr/bin/aarch64-linux-gnu-c++ goes finally ?
/etc/alternatives/aarch64-linux-gnu-c++ doesn't appear on my environment, and that makes me feel that compiler installation failed somehow.
Also, I'm curious about the
$CMAKE_TOOLCHAIN_FILE
too.This environment should contain a file name. You showed me the content of the file, but I'm curious where this content came from.
There's a similar file in OpenCV, but the content is totally different.
Where did this CMAKE_TOOLCHAIN_FILE came from ?
Probably you need to run
cmake -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/aartch64-gnu.toolchain.cmake