I'm trying to cross compile opencv from source (git tag 3.0.0-rc1 or 2.4 branch, doesn't matter) on Ubuntu trusty (PC 64Bit).
I always get errors at the very beginning, when the 3rd party stuff is built.
I've created a "build" folder in platform/linux and this is my cmake command line:
cmake -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake -DCMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabihf-g++ ../../..
While configuring, CMAKE tells about missing libs (zlib, jpeg ...) but nevertheless does not throw errors. "make" then tries to build the libraries itself, but fails when linking them. The error message is
"Linking C static library ../lib/libzlib.a Error running link command: No such file or directory".
I tried to avoid building these libraries by adding "-DZLIB_LIBRARY=..." and the like, but this does just let the build fail elsewhere with the same error message.
Building the same stuff on a native machine seems to work (I used an Odroid XU for that).