Ask Your Question
0

crosscompile OpenCV 2.4.10

asked 2015-03-27 15:25:41 -0600

robstr gravatar image

Hey, i want to install the latest openCV 2.4.10 for an ARM Cortex. Ive installed the crosstool-ng and build the

arm-unknown-linux-gnueabi

toolchain with no problems. After this, i downloaded the latest openCV zip file and extract it. Then changed the following lines

platforms/linux/arm-gnueabi.toolchain.cmake

from :

set(GCC_COMPILER_VERSION "4.6" CACHE STRING "GCC Compiler version")

    set(FLOAT_ABI_SUFFIX "")

if (NOT SOFTFP)
  set(FLOAT_ABI_SUFFIX "hf")
endif()

set(CMAKE_C_COMPILER    arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-gcc-${GCC_COMPILER_VERSION})
set(CMAKE_CXX_COMPILER  arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-g++-${GCC_COMPILER_VERSION})
set(ARM_LINUX_SYSROOT /usr/arm-linux-gnueabi${FLOAT_ABI_SUFFIX} CACHE PATH "ARM cross compilation system root")

to

set(GCC_COMPILER_VERSION "4.9.1" CACHE STRING "GCC Compiler version")
    set(FLOAT_ABI_SUFFIX "")

    if (NOT SOFTFP)
      set(FLOAT_ABI_SUFFIX "hf")
endif()

set(CMAKE_C_COMPILER    /home/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc-4.9.1)
set(CMAKE_CXX_COMPILER  /home/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++)
set(ARM_LINUX_SYSROOT   /home/x-tools/arm-unknown-linux-gnueabi/ CACHE PATH "ARM cross compilation system root")



cmake -DCMAKE_TOOLCHAIN_FILE=~/workspace/cross/opencv/opencv-2.4.10/platforms/linux/arm-gnueabi.toolchain.cmake ~/workspace/cross/opencv/opencv-2.4.10/

all works fine, but now, after the

make

[ 80%] Building CXX object modules/ocl/CMakeFiles/opencv_perf_ocl.dir/perf/perf_hog.cpp.o

he still hangs at 80% for over one hour.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-28 02:50:34 -0600

judu29hbc gravatar image

You don't need to build perf anyway to make it on you platform so just disable it or go #if 0 in the opencv source code. Good luck but it should compile

edit flag offensive delete link more

Comments

thanks for the comment, for me it is not clear on which position i should disable it ?

robstr gravatar imagerobstr ( 2015-03-28 03:03:49 -0600 )edit

When you cmake. You can easily do it with cMakegui and just check the modules that you need. Configure generate and run make install and enjoy

judu29hbc gravatar imagejudu29hbc ( 2015-03-28 18:11:08 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-27 15:25:41 -0600

Seen: 661 times

Last updated: Mar 28 '15