Ask Your Question
0

crosscompile OpenCV 2.4.10

asked Mar 27 '15

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.

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Mar 28 '15

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

Preview: (hide)

Comments

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

robstr gravatar imagerobstr (Mar 28 '15)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 (Mar 29 '15)edit

Question Tools

1 follower

Stats

Asked: Mar 27 '15

Seen: 693 times

Last updated: Mar 28 '15