Hello,
I am currently trying to determine how much I can optimize OpenCV using the ARM's VFP and the Linaro nano image. I have downloaded the arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ compilers, successfully cross-compiled OpenCV using those compilers (with -O3 -mfloat-abi=hard -ftree-vectorize -funroll-loops), and compiled an example OpenCV program with the arm-linux-gnueabihf-g++ compiler (with the same flags). However, when I try and run my executable within Linaro (running on a gumstix overo) I get "/lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.15' not found (required by /usr/lib/libopencv_core.so.2.2).
I assume that this is because on my build machine (x86 Ubuntu 10.04) where I cross compiled the OpenCV libraries I am using libc-2.15, and on the target (gumstix) the loader can't find libc-2.15. However, within the gcc-linaro-arm-linux-gnueabihf-4.7 tar ball I downloaded today, there is a libc-2.15.so file in there that I copied into /lib/ on the gumstix. Still no success though when I try running my executable.
Any recommendations on things to try? I am hesitant to just put a newer version of glibc in Linaro as it seems like that could screw a lot of things up. Should I attempt to re-build OpenCV somehow with an older version of glibc (namely libc-2.13)?
Also, please let me know if this is the wrong forum for this question and where I should post it instead.
Thanks, Derek
On 2 February 2013 00:13, Derek Rollend derek.rollend@gmail.com wrote:
Hello,
I am currently trying to determine how much I can optimize OpenCV using the ARM's VFP and the Linaro nano image. I have downloaded the arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ compilers, successfully cross-compiled OpenCV using those compilers (with -O3 -mfloat-abi=hard -ftree-vectorize -funroll-loops), and compiled an example OpenCV program with the arm-linux-gnueabihf-g++ compiler (with the same flags). However, when I try and run my executable within Linaro (running on a gumstix overo) I get "/lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.15' not found (required by /usr/lib/libopencv_core.so.2.2).
I assume that this is because on my build machine (x86 Ubuntu 10.04) where I cross compiled the OpenCV libraries I am using libc-2.15, and on the target (gumstix) the loader can't find libc-2.15. However, within the gcc-linaro-arm-linux-gnueabihf-4.7 tar ball I downloaded today, there is a libc-2.15.so file in there that I copied into /lib/ on the gumstix. Still no success though when I try running my executable.
Any recommendations on things to try? I am hesitant to just put a newer version of glibc in Linaro as it seems like that could screw a lot of things up. Should I attempt to re-build OpenCV somehow with an older version of glibc (namely libc-2.13)?
Expand the entire sysroot tarball you have onto your ARM board into some location (say /opt/gcc-linaro - but anywhere will do). Then do: LD_LIBRARY_PATH=/opt/gcc-linaro/lib/arm-linux-gnueabihf program-to-execute args
Thanks,
Matt
-- Matthew Gretton-Dann Linaro Toolchain Working Group matthew.gretton-dann@linaro.org
On 4 February 2013 02:08, Matthew Gretton-Dann matthew.gretton-dann@linaro.org wrote:
On 2 February 2013 00:13, Derek Rollend derek.rollend@gmail.com wrote:
Hello,
I am currently trying to determine how much I can optimize OpenCV using the ARM's VFP and the Linaro nano image. I have downloaded the arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ compilers, successfully cross-compiled OpenCV using those compilers (with -O3 -mfloat-abi=hard -ftree-vectorize -funroll-loops), and compiled an example OpenCV program with the arm-linux-gnueabihf-g++ compiler (with the same flags). However, when I try and run my executable within Linaro (running on a gumstix overo) I get "/lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.15' not found (required by /usr/lib/libopencv_core.so.2.2).
I assume that this is because on my build machine (x86 Ubuntu 10.04) where I cross compiled the OpenCV libraries I am using libc-2.15, and on the target (gumstix) the loader can't find libc-2.15. However, within the gcc-linaro-arm-linux-gnueabihf-4.7 tar ball I downloaded today, there is a libc-2.15.so file in there that I copied into /lib/ on the gumstix. Still no success though when I try running my executable.
Any recommendations on things to try? I am hesitant to just put a newer version of glibc in Linaro as it seems like that could screw a lot of things up. Should I attempt to re-build OpenCV somehow with an older version of glibc (namely libc-2.13)?
Expand the entire sysroot tarball you have onto your ARM board into some location (say /opt/gcc-linaro - but anywhere will do). Then do: LD_LIBRARY_PATH=/opt/gcc-linaro/lib/arm-linux-gnueabihf program-to-execute args
Please try to use --sysroot option. copy the entire sysroot directories (/lib, /usr/lib, /usr/include) you have onto your ARM board into some location (say /opt/gcc-linaro) on your host machine and keep the dir layout, i.e. After copy, you will have:
/opt/gcc-linaro/lib/... /opt/gcc-linaro/usr/lib/... /opt/gcc-linaro/usr/inlcude...
Then compile your project with additional gcc option: --sysroot=/opt/gcc-linaro/
-Zhenqiang
Derek Rollend <derek.rollend@...> writes:
Hello, I am currently trying to determine how much I can optimize OpenCV using the ARM's VFP and the Linaro nano image. I have downloaded the arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ compilers, successfully cross-compiled OpenCV using those compilers (with -O3 -mfloat-abi=hard -ftree-vectorize -funroll-loops), and compiled an example OpenCV program with the arm-linux-gnueabihf-g++ compiler (with the same flags).
Hello Derek, I'm trying to cross compile OpenCV (2.4.0) for ARM. I'm using Linaro toolchain and CMake (http://processors.wiki.ti.com/index.php/Building_OpenCV_for_ARM_Cortex-A8), but I get the following error: .../ffmpeg_codecs.hpp:78:36:fatal error: libavformat/avformat.h: No such file or directory compilation terminated. I have installed libavformat-dev and configured CMake again, but I get the same error. Which version of CMake you are using? How you write de toolchain.cmake? How do you set the (-O3 -mfloat-abi=hard -ftree-vectorize -funroll-loops) C/CXX flags? I'm using CMake2.8.7. Thanks in advance.
Fernan,
I'm using CMake 2.8.0. I have not tried to compile OpenCV with FFMPEG support yet, although I will be trying to do this soon. I have only successfully compiled OpenCV 2.2 using the Linaro hard float compiler. Here is my toolchain.cmake file:
set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_SYSTEM_PROCESSOR arm ) set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc ) set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ ) set( CMAKE_CXX_FLAGS_RELEASE "-L /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-L /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" )
where the Linaro hard float toolchain tarball was extracted to my /opt directory. The verbose flag will tell you when the compiler was able to vectorize a loop, or why it couldn't. I need to test some of the newer feature extraction algorithms in more recent versions of OpenCV, so I'll try and update you when/if I successfully compile a newer version of OpenCV with FFMPEG support.
Good luck.
-Derek
On Mon, Feb 11, 2013 at 3:07 PM, Fernan fhledesma@gmail.com wrote:
Derek Rollend <derek.rollend@...> writes:
Hello, I am currently trying to determine how much I can optimize OpenCV using
the
ARM's VFP and the Linaro nano image. I have downloaded the arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ compilers, successfully cross-compiled OpenCV using those compilers (with -O3 -mfloat-abi=hard -ftree-vectorize -funroll-loops), and compiled an example OpenCV program
with
the arm-linux-gnueabihf-g++ compiler (with the same flags).
Hello Derek, I'm trying to cross compile OpenCV (2.4.0) for ARM. I'm using Linaro toolchain and CMake (http://processors.wiki.ti.com/index.php/Building_OpenCV_for_ARM_Cortex-A8), but I get the following error: .../ffmpeg_codecs.hpp:78:36:fatal error: libavformat/avformat.h: No such file or directory compilation terminated. I have installed libavformat-dev and configured CMake again, but I get the same error. Which version of CMake you are using? How you write de toolchain.cmake? How do you set the (-O3 -mfloat-abi=hard -ftree-vectorize -funroll-loops) C/CXX flags? I'm using CMake2.8.7. Thanks in advance.
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
Derek Rollend <derek.rollend@...> writes:
Fernan, I'm using CMake 2.8.0. I have not tried to compile OpenCV with FFMPEG support
yet, although I will be trying to do this soon. I have only successfully compiled OpenCV 2.2 using the Linaro hard float compiler. Here is my toolchain.cmake file:
set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_SYSTEM_PROCESSOR arm ) set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc ) set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ ) set( CMAKE_CXX_FLAGS_RELEASE "-L /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/ arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-L /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" )
Thank you very much Derek, some questions arises reading your response, e.g. How Cmake knows the PATH of arm-linux-gnueabihf-g++?
But now I will try to cross-compile again using your toolchain.cmake.
Add the Linaro toolchain bin directory to your PATH environment variable:
export PATH="/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/bin:$PATH"
or whichever directory you have extracted the Linaro HF tarball to.
-Derek
On Mon, Feb 11, 2013 at 4:04 PM, Fernan fhledesma@gmail.com wrote:
Derek Rollend <derek.rollend@...> writes:
Fernan, I'm using CMake 2.8.0. I have not tried to compile OpenCV with FFMPEG
support yet, although I will be trying to do this soon. I have only successfully compiled OpenCV 2.2 using the Linaro hard float compiler. Here is my toolchain.cmake file:
set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_SYSTEM_PROCESSOR arm ) set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc ) set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ ) set( CMAKE_CXX_FLAGS_RELEASE "-L /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/ arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-L /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" )
Thank you very much Derek, some questions arises reading your response, e.g. How Cmake knows the PATH of arm-linux-gnueabihf-g++?
But now I will try to cross-compile again using your toolchain.cmake.
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
Hi Derek,
Derek Rollend <derek.rollend@...> writes:
Add the Linaro toolchain bin directory to your PATH environment variable: export PATH="/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux
/bin:$PATH"
ok. I thought there was a CMake variable like CMAKE_C_COMPILER_PATH. I use this http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F (method3).
On Mon, Feb 11, 2013 at 4:04 PM, Fernan
fhledesma@gmail.com wrote:
Derek Rollend <derek.rollend <at> ...> writes:
Fernan, I'm using CMake 2.8.0. I have not tried to compile OpenCV with FFMPEG support
yet, although I will be trying to do this soon. I have only successfully compiled OpenCV 2.2 using the Linaro hard float compiler. Here is my toolchain.cmake file:
set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_SYSTEM_PROCESSOR arm ) set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc ) set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ ) set( CMAKE_CXX_FLAGS_RELEASE "-L /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/
arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-L /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" )
I have just successfully compiled but without FFMPEG too, that is the problem.
but first, I will ask you some question:
Why you need to add the link path /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib?
Why you use OpenCV2.2? The lastest stable release is OpenCV2.4.3.
You see, I'm a newbie about cross compiling, I'll have to study concepts of cross-compilation, I thought it was easy.
I added the lib path explicitly so I knew that arm-linux-gnueabihf-g++ was definitely linking against the correct hard float libraries. Perhaps this is unnecessary, but I just wanted to be sure. I've been using OpenCV 2.2 because that was the version that was known to compile successfully from that TI wiki page you sent earlier. I am now trying with 2.4.0, I'll let you know if I succeed.
It's definitely not easy. All the tools seem to be there, it's piecing everything together correctly that is the tough part. Push on!
On Tue, Feb 12, 2013 at 1:35 PM, Fernan fhledesma@gmail.com wrote:
Hi Derek,
Derek Rollend <derek.rollend@...> writes:
Add the Linaro toolchain bin directory to your PATH environment variable: export
PATH="/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux
/bin:$PATH"
ok. I thought there was a CMake variable like CMAKE_C_COMPILER_PATH. I use this http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F (method3).
On Mon, Feb 11, 2013 at 4:04 PM, Fernan
fhledesma@gmail.com wrote:
Derek Rollend <derek.rollend <at> ...> writes:
Fernan, I'm using CMake 2.8.0. I have not tried to compile OpenCV with FFMPEG support
yet, although I will be trying to do this soon. I have only successfully compiled OpenCV 2.2 using the Linaro hard float compiler. Here is my toolchain.cmake file:
set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_SYSTEM_PROCESSOR arm ) set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc ) set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ ) set( CMAKE_CXX_FLAGS_RELEASE "-L /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/
arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-L /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" )
I have just successfully compiled but without FFMPEG too, that is the problem.
but first, I will ask you some question:
Why you need to add the link path /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib?
Why you use OpenCV2.2? The lastest stable release is OpenCV2.4.3.
You see, I'm a newbie about cross compiling, I'll have to study concepts of cross-compilation, I thought it was easy.
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
I'd say that adding -L/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib is unnecessary as gcc's driver should be able to find its own libraries.
Regarding your problems with ffmpeg, I'm sorry that I don't know how cmake works, but after spending some time trying to understand why cross-building fails, here are my remarks:
- using 'make VERBOSE=1' will show you the exact commands used - from what I can see, cmake manages to find the full path to the compiler and calls it using this path - installing packages such as libavcodec-dev installs the version for your host, not for your ARM target - therefore, you should add ffmpeg to OpenCV, maybe using the 3rdparty directory, but I don't know how it is supposed to be used - on my system, I have noticed that cmake says 'Could NOT find JPEG), then "Media I/O: JPEG: libjpeg (ver 62)" and I can see that g++ is called with -I<path-to-OpenCV>/3rdparty/libjpeg, which is confusing - similarly, it looks like cmake is calling pkg-config which most probably queries the host, not the target FS - you have to make sure that the build process will find or build all the dependencies for ARM, which probably means it has to build ffmpeg - I don't know if all these are peculiarities of cmake or OpenCV, but it makes me wonder whether OpenCV is really supporting cross-compilation? - did you ask OpenCV community?
Sorry to ask more questions :-)
Christophe.
On 12 February 2013 20:11, Derek Rollend derek.rollend@gmail.com wrote:
I added the lib path explicitly so I knew that arm-linux-gnueabihf-g++ was definitely linking against the correct hard float libraries. Perhaps this is unnecessary, but I just wanted to be sure. I've been using OpenCV 2.2 because that was the version that was known to compile successfully from that TI wiki page you sent earlier. I am now trying with 2.4.0, I'll let you know if I succeed.
It's definitely not easy. All the tools seem to be there, it's piecing everything together correctly that is the tough part. Push on!
On Tue, Feb 12, 2013 at 1:35 PM, Fernan fhledesma@gmail.com wrote:
Hi Derek,
Derek Rollend <derek.rollend@...> writes:
Add the Linaro toolchain bin directory to your PATH environment variable: export PATH="/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux
/bin:$PATH"
ok. I thought there was a CMake variable like CMAKE_C_COMPILER_PATH. I use this http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F (method3).
On Mon, Feb 11, 2013 at 4:04 PM, Fernan
fhledesma@gmail.com wrote:
Derek Rollend <derek.rollend <at> ...> writes:
Fernan, I'm using CMake 2.8.0. I have not tried to compile OpenCV with FFMPEG support
yet, although I will be trying to do this soon. I have only successfully compiled OpenCV 2.2 using the Linaro hard float compiler. Here is my toolchain.cmake file:
set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_SYSTEM_PROCESSOR arm ) set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc ) set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ ) set( CMAKE_CXX_FLAGS_RELEASE "-L /opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/
arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" ) set( CMAKE_CXX_FLAGS_DEBUG "-L /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" )
I have just successfully compiled but without FFMPEG too, that is the problem.
but first, I will ask you some question:
Why you need to add the link path /opt/gcc-linaro-arm-linux-gnueabihf- 4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib?
Why you use OpenCV2.2? The lastest stable release is OpenCV2.4.3.
You see, I'm a newbie about cross compiling, I'll have to study concepts of cross-compilation, I thought it was easy.
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
Christophe Lyon <christophe.lyon@...> writes:
Regarding your problems with ffmpeg, I'm sorry that I don't know how cmake works, but after spending some time trying to understand why cross-building fails, here are my remarks:
- installing packages such as libavcodec-dev installs the version for
your host, not for your ARM target
Hi Christophe,
thanks for replay.
ok I will take it into account.
- therefore, you should add ffmpeg to OpenCV, maybe using the 3rdparty
directory, but I don't know how it is supposed to be used
I too don't know. Then Cross compiling is not so simple like this:
http://processors.wiki.ti.com/index.php/Building_OpenCV_for_ARM_Cortex-A8
- on my system, I have noticed that cmake says 'Could NOT find JPEG),
then "Media I/O: JPEG: libjpeg (ver 62)" and I can see that g++ is called with -I<path-to-OpenCV>/3rdparty/libjpeg, which is confusing
Same thing happens to me with FFMPEG
- similarly, it looks like cmake is calling pkg-config which most
probably queries the host, not the target FS
- you have to make sure that the build process will find or build all
the dependencies for ARM, which probably means it has to build ffmpeg
- I don't know if all these are peculiarities of cmake or OpenCV, but
it makes me wonder whether OpenCV is really supporting cross-compilation?
- did you ask OpenCV community?
I could see OpenCV community recomend other ways to do what I want.
Sorry to ask more questions
:)
Christophe.
Best regards.
- therefore, you should add ffmpeg to OpenCV, maybe using the 3rdparty
directory, but I don't know how it is supposed to be used
I too don't know. Then Cross compiling is not so simple like this:
http://processors.wiki.ti.com/index.php/Building_OpenCV_for_ARM_Cortex-A8
this does not cover cross-building ffmpeg.
What I mean is that you have to build ffmpeg for your target, such that the OpenCV build system finds it; maybe you can just untar ffmpeg inside OpenCV sources (maybe in 3rdparty) and it could work, but you have to check how the build system works.
- similarly, it looks like cmake is calling pkg-config which most
probably queries the host, not the target FS
- you have to make sure that the build process will find or build all
the dependencies for ARM, which probably means it has to build ffmpeg
- I don't know if all these are peculiarities of cmake or OpenCV, but
it makes me wonder whether OpenCV is really supporting cross-compilation?
- did you ask OpenCV community?
I could see OpenCV community recomend other ways to do what I want.
So maybe you should follow their recommendations
linaro-toolchain@lists.linaro.org