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