2017-10-26 03:09:38 -0600 | received badge | ● Famous Question (source) |
2015-10-19 21:40:58 -0600 | received badge | ● Notable Question (source) |
2015-10-19 02:36:12 -0600 | received badge | ● Teacher (source) |
2015-10-19 02:36:04 -0600 | received badge | ● Nice Question (source) |
2015-01-18 20:29:40 -0600 | received badge | ● Popular Question (source) |
2014-06-27 07:12:36 -0600 | received badge | ● Self-Learner (source) |
2014-06-25 19:19:47 -0600 | received badge | ● Student (source) |
2013-02-10 16:26:30 -0600 | received badge | ● Editor (source) |
2013-02-10 16:25:43 -0600 | answered a question | Cross compile OpenCV but failed to find 3rd party library To be more specific, I'm using linaro toolchain. I used NFS to mount target machine /usr and /lib to my host machine /opt/Hackberryfs/usr and /opt/Hackberry/lib. Progress I made so far: I can run cmake to find out all 3rd party library installed in my target machine except python. Here is steps I did:
export SYSROOT=/opt/Hackberryfs export PKG_CONFIG_SYSROOT_DIR=${SYSROOT} export PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/local/lib/pkgconfig:${SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig:${SYSROOT}/usr/share/pkgconfig
Conclusion:
It is a pain in the ass to do cross compile. It already wasted me two days to figure out how cmake. For now, I'd live with arm board to do native compiling. I'm done with it. |
2013-02-08 22:52:17 -0600 | commented answer | Cross compile OpenCV but failed to find 3rd party library I read your toolchain.make. How can you resolve pkg-config between host and target machine? For example, when it runs zlib: pkg-config zlib --cflags --libs It returns absolute path of target machine. But in fact it should point to NFS path in host machine. I used tricks below override the root directory in pkg-config: Export export SYSROOT=/opt/Hackberryfs export PKG_CONFIG_SYSROOT_DIR=${SYSROOT} export PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/local/lib/pkgconfig:${SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig:${SYSROOT}/usr/share/pkgconfig |
2013-02-08 12:02:42 -0600 | commented question | Cross compile OpenCV but failed to find 3rd party library I chased the macro CHECK_MODULE. It used pkg-config to look up library. It turns out that it ran target machine pkg-config binary in host machine. I came up a quick solution:
export PKG_CONFIG_PATH=/opt/Hackberryfs/usr/lib/pkgconfig:/opt/Hackberryfs/usr/local/lib/pkgconfig:/opt/Hackberryfs/usr/lib/arm-linux-gnueabihf/pkgconfig However, I ran pkg-config. It is not smart enough to deal with cross compile env. I tried pkg-config gstreamer-0.10 in host machine. It return absolute path in target machine. Anyway, the problem is not resolved. |
2013-02-08 07:58:42 -0600 | asked a question | Cross compile OpenCV but failed to find 3rd party library Hi, I want to cross compile customized OpenCV for arm board in my Linux x86 host machine. I followed tutorial here http://processors.wiki.ti.com/index.php/Building_OpenCV_for_ARM_Cortex-A8 But set( CMAKE_FIND_ROOT_PATH "YOUR_LIB_PATH_LIST" ) can't find all my library listed in "YOUR_LIB_PATH_LIST". I googled CMAKE about CMAKE_FIND_ROOT_PATH in (http://www.vtk.org/Wiki/CMake_Cross_Compiling). It says it will find "YOUR_LIB_PATH_LIST"/lib, "YOUR_LIB_PATH_LIST"/usr/lib, /lib and /usr/lib. The statement in cmake doc also implies that you can add additional path. But I tried. The additional path doesn't work. I use NFS to mount library folder to my host machine. I can managed to make target machine /lib and /usr/lib accessible in CMAKE_FIND_ROOT_PATH by some tricks. But I can't make /usr/local/lib works. Any comments will be appreciated. |