1

I wanted to run an OpenCV project on ARDrone (which is powered by arm7l).

So I cross compiled OpenCV for arm processor, moved the .so files to the drone and updated the LD_LIBRARY_PATH.

Now running the cross compiled OpenCV project throws the following error:

/lib/libc.so.6: version `GLIBC_2.15' not found (required by /data/video/opencvlib/libopencv_highgui.so.2.4)

Where do I get this libc.so

Hassan
  • 870
  • 13
  • 25
  • You appear to have cross compiled with a different version of the libraries than available on the target. You may be able to trick it into ignoring the difference, but your best bet is to use the same version on both the target device and build machine's cross compilation setup. "Cross compiling" is as much about targeting the runtime environment (available libraries, kernel interfaces, processor modes, etc) as it is about the hardware architecture. – Chris Stratton Apr 08 '15 at 17:12
  • @ChrisStratton You mean the OpenCV? How do I know which version of libraries to use? – Hassan Apr 08 '15 at 17:20
  • You should be compiling opencv and anything else you use with whatever versions are on your target board. Probably that means you need to get your cross compilation environment from the same source as your board's linux installation - or at least get one offered as compatible for use with it. You can't just grab some other random arm toolchain and library set. – Chris Stratton Apr 08 '15 at 17:23
  • Alternatively (assuming a complete Linux-targeted cross-toolchain), poke around in the subdirectories of your cross-toolchain installation to find the relevant lib/ subdirectory where the stuff you linked against lives, and put those copies of the libraries on the device where your cross-compiled code can find them (probably not a good idea to just replace the system libraries). – Notlikethat Apr 08 '15 at 17:56

1 Answers1

1

As @Notlikethat suggested I tried copying my cros-toolchain's shared libraries to ARM, it solved the above issue but caused other problems.

For a more permanent solution I followed @Chris 's suggestions and recompiled opencv with board's cross compiler.

Hassan
  • 870
  • 13
  • 25