Hi All,
I need to cross compile opencv for my application. It's compiling properly with arm-fsl-linux-gnueabi, arm-linux but i need for "arm-poky-linux-gnueabi" need to use with yocto setup.
But i am getting following errors even with yocto setup or individual if i am using arm-poky-linux-gnueabi , If any one knows please help me to sort it out.
Log attached below:
divya@FSETBLR1LX038:~/opencv/OPENCV/new/bui_lav$ cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake ../opencv-2.4.9
-- The CXX compiler identification is GNU 4.9.1
-- The C compiler identification is GNU 4.9.1
-- Check for working CXX compiler: /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
-- Check for working CXX compiler: /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (message):
The C++ compiler
"/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/divya/opencv/OPENCV/new/bui_lav/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec192489027/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec192489027.dir/build.make
CMakeFiles/cmTryCompileExec192489027.dir/build
make[1]: Entering directory
`/home/divya/opencv/OPENCV/new/bui_lav/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/divya/opencv/OPENCV/new/bui_lav/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object
CMakeFiles/cmTryCompileExec192489027.dir/testCXXCompiler.cxx.o
/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
-o CMakeFiles/cmTryCompileExec192489027.dir/testCXXCompiler.cxx.o -c
/home/divya/opencv/OPENCV/new/bui_lav/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTryCompileExec192489027
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec192489027.dir/link.txt --verbose=1
/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
CMakeFiles/cmTryCompileExec192489027.dir/testCXXCompiler.cxx.o -o
cmTryCompileExec192489027 -rdynamic
/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld:
error: cmTryCompileExec192489027 uses VFP register arguments,
CMakeFiles/cmTryCompileExec192489027.dir/testCXXCompiler.cxx.o does not
/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld:
failed to merge target specific data of file
CMakeFiles/cmTryCompileExec192489027.dir/testCXXCompiler.cxx.o
collect2: error: ld returned 1 exit status
make[1]: *** [cmTryCompileExec192489027] Error 1
make[1]: Leaving directory
`/home/divya/opencv/OPENCV/new/bui_lav/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec192489027/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:56 (project)
-- Configuring incomplete, errors occurred!
See also "/home/divya/opencv/OPENCV/new/bui_lav/CMakeFiles/CMakeOutput.log".
See also "/home/divya/opencv/OPENCV/new/bui_lav/CMakeFiles/CMakeError.log".
divya@FSETBLR1LX038:~/opencv/OPENCV/new/bui_lav$
NOTE:
the command for configure:
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake ../opencv-2.4.9
toochain.cmake contains:
----------------------------------------------------
set( CMAKE_SYSTEM_NAME Linux )
set( CMAKE_SYSTEM_PROCESSOR arm )
set( CMAKE_C_COMPILER arm-poky-linux-gnueabi-gcc )
set( CMAKE_CXX_COMPILER arm-poky-linux-gnueabi-g++ )
Thanks & Regards,
Lavanya