ひでみのアイデア帳

くだらないことなんだけど、忘れないために・・・

linaro for ZedBoard用にOpenCVを構築

よくよく考えてみれば、今時、ハードウェアでVRAMを転送してるなんて無いよなぁ〜(^-^;ずっと、VRAMの転送はハードウェアと思ってのでフレームバッファってどこなんだろう?と探してたんだけど、今はDRMだよね。

そりゃそうだ。

メインメモリにウィンドウバッファがあって、それを1枚絵に見せかけるマネージャーがいればいいだけだもんなぁ。

そしたら、なかなかフレームバッファの割り当てメモリが見つからないわけだ。

それはそれとして・・・

今日はKernel 3.8のインスコとlinaro for ZedBoard用にlibSDLとOpenCVを構築する。

OpenCVの構築手順は以前通りで、libSDLはKernelが無いとNGなようなので今日は断念する。

% cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_TOOLCHAIN_FILE:PATH=./zedboard.cmake ..

-- The CXX compiler identification is GNU 4.7.3

-- The C compiler identification is GNU 4.7.3

-- Check for working CXX compiler: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-g++

-- Check for working CXX compiler: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-g++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working C compiler: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-gcc

-- Check for working C compiler: /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-gcc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detected version of GNU GCC: 113 (113)

-- Performing Test HAVE_CXX_W

-- Performing Test HAVE_CXX_W - Success

-- Performing Test HAVE_C_W

-- Performing Test HAVE_C_W - Success

-- Performing Test HAVE_CXX_WALL

-- Performing Test HAVE_CXX_WALL - Success

-- Performing Test HAVE_C_WALL

-- Performing Test HAVE_C_WALL - Success

-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE

-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success

-- Performing Test HAVE_C_WERROR_RETURN_TYPE

-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success

-- Performing Test HAVE_CXX_WERROR_ADDRESS

-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success

-- Performing Test HAVE_C_WERROR_ADDRESS

-- Performing Test HAVE_C_WERROR_ADDRESS - Success

-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT

-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success

-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT

-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success

-- Performing Test HAVE_CXX_WFORMAT

-- Performing Test HAVE_CXX_WFORMAT - Success

-- Performing Test HAVE_C_WFORMAT

-- Performing Test HAVE_C_WFORMAT - Success

-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY

-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success

-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY

-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success

-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS

-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success

-- Performing Test HAVE_C_WMISSING_DECLARATIONS

-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success

-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES

-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed

-- Performing Test HAVE_C_WMISSING_PROTOTYPES

-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success

-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES

-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed

-- Performing Test HAVE_C_WSTRICT_PROTOTYPES

-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success

-- Performing Test HAVE_CXX_WUNDEF

-- Performing Test HAVE_CXX_WUNDEF - Success

-- Performing Test HAVE_C_WUNDEF

-- Performing Test HAVE_C_WUNDEF - Success

-- Performing Test HAVE_CXX_WINIT_SELF

-- Performing Test HAVE_CXX_WINIT_SELF - Success

-- Performing Test HAVE_C_WINIT_SELF

-- Performing Test HAVE_C_WINIT_SELF - Success

-- Performing Test HAVE_CXX_WPOINTER_ARITH

-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success

-- Performing Test HAVE_C_WPOINTER_ARITH

-- Performing Test HAVE_C_WPOINTER_ARITH - Success

-- Performing Test HAVE_CXX_WSHADOW

-- Performing Test HAVE_CXX_WSHADOW - Success

-- Performing Test HAVE_C_WSHADOW

-- Performing Test HAVE_C_WSHADOW - Success

-- Performing Test HAVE_CXX_WSIGN_PROMO

-- Performing Test HAVE_CXX_WSIGN_PROMO - Success

-- Performing Test HAVE_C_WSIGN_PROMO

-- Performing Test HAVE_C_WSIGN_PROMO - Failed

-- Performing Test HAVE_CXX_WNO_NARROWING

-- Performing Test HAVE_CXX_WNO_NARROWING - Success

-- Performing Test HAVE_C_WNO_NARROWING

-- Performing Test HAVE_C_WNO_NARROWING - Success

-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR

-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success

-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR

-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed

-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS

-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed

-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS

-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed

-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION

-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success

-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION

-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success

-- Performing Test HAVE_CXX_PTHREAD

-- Performing Test HAVE_CXX_PTHREAD - Success

-- Performing Test HAVE_C_PTHREAD

-- Performing Test HAVE_C_PTHREAD - Success

-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER

-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success

-- Performing Test HAVE_C_FOMIT_FRAME_POINTER

-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success

-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS

-- Performing Test HAVE_CXX_FFUNCTION_SECTIONS - Success

-- Performing Test HAVE_C_FFUNCTION_SECTIONS

-- Performing Test HAVE_C_FFUNCTION_SECTIONS - Success

-- Looking for alloca.h

-- Looking for alloca.h - found

-- Looking for alloca

-- Looking for alloca - not found

-- Looking for unistd.h

-- Looking for unistd.h - found

-- Looking for pthread.h

-- Looking for pthread.h - found

-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 

-- Looking for fseeko

-- Looking for fseeko - found

-- Looking for unistd.h

-- Looking for unistd.h - found

-- Looking for sys/types.h

-- Looking for sys/types.h - found

-- Looking for stdint.h

-- Looking for stdint.h - found

-- Looking for stddef.h

-- Looking for stddef.h - found

-- Check size of off64_t

-- Check size of off64_t - failed

-- Performing Test HAVE_C_WNO_ATTRIBUTES

-- Performing Test HAVE_C_WNO_ATTRIBUTES - Success

-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES

-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success

-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES

-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success

-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS

-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success

-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 

-- Looking for assert.h

-- Looking for assert.h - found

-- Looking for fcntl.h

-- Looking for fcntl.h - found

-- Looking for io.h

-- Looking for io.h - not found

-- Looking for jbg_newlen

-- Looking for jbg_newlen - not found

-- Looking for mmap

-- Looking for mmap - found

-- Looking for search.h

-- Looking for search.h - found

-- Looking for string.h

-- Looking for string.h - found

-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE

-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Success

-- Performing Test HAVE_C_WNO_UNDEF

-- Performing Test HAVE_C_WNO_UNDEF - Success

-- Performing Test HAVE_C_WNO_UNUSED

-- Performing Test HAVE_C_WNO_UNUSED - Success

-- Performing Test HAVE_C_WNO_SIGN_COMPARE

-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success

-- Performing Test HAVE_C_WNO_CAST_ALIGN

-- Performing Test HAVE_C_WNO_CAST_ALIGN - Success

-- Performing Test HAVE_C_WNO_SHADOW

-- Performing Test HAVE_C_WNO_SHADOW - Success

-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED

-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Success

-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST

-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST - Success

-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST

-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST - Success

-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS

-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success

-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER

-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success

-- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR) 

-- Found JPEG: libjpeg  

-- Could NOT find Jasper (missing:  JASPER_LIBRARIES JASPER_INCLUDE_DIR) 

-- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION

-- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION - Success

-- Performing Test HAVE_C_WNO_UNINITIALIZED

-- Performing Test HAVE_C_WNO_UNINITIALIZED - Success

-- Found ZLIB: zlib (found version "1.2.7") 

-- Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR) 

-- Looking for semaphore.h

-- Looking for semaphore.h - found

-- Performing Test HAVE_CXX_WNO_SHADOW

-- Performing Test HAVE_CXX_WNO_SHADOW - Success

-- Performing Test HAVE_CXX_WNO_UNUSED

-- Performing Test HAVE_CXX_WNO_UNUSED - Success

-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE

-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success

-- Performing Test HAVE_CXX_WNO_UNDEF

-- Performing Test HAVE_CXX_WNO_UNDEF - Success

-- Performing Test HAVE_CXX_WNO_UNINITIALIZED

-- Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success

-- Performing Test HAVE_CXX_WNO_SWITCH

-- Performing Test HAVE_CXX_WNO_SWITCH - Success

-- Performing Test HAVE_CXX_WNO_PARENTHESES

-- Performing Test HAVE_CXX_WNO_PARENTHESES - Success

-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS

-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success

-- Performing Test HAVE_CXX_WNO_EXTRA

-- Performing Test HAVE_CXX_WNO_EXTRA - Success

-- checking for module ''gtk+-2.0''

--   package ''gtk+-2.0'' not found

-- checking for module ''gthread-2.0''

--   package ''gthread-2.0'' not found

-- checking for module ''gstreamer-base-0.10''

--   package ''gstreamer-base-0.10'' not found

-- checking for module ''libdc1394-2''

--   package ''libdc1394-2'' not found

-- checking for module ''libdc1394''

--   package ''libdc1394'' not found

-- checking for module ''libv4l1''

--   package ''libv4l1'' not found

-- Looking for linux/videodev.h

-- Looking for linux/videodev.h - not found

-- Looking for linux/videodev2.h

-- Looking for linux/videodev2.h - found

-- checking for module ''libavcodec''

--   package ''libavcodec'' not found

-- checking for module ''libavformat''

--   package ''libavformat'' not found

-- checking for module ''libavutil''

--   package ''libavutil'' not found

-- checking for module ''libswscale''

--   package ''libswscale'' not found

-- Looking for libavformat/avformat.h

-- Looking for libavformat/avformat.h - not found

-- Looking for ffmpeg/avformat.h

-- Looking for ffmpeg/avformat.h - not found

CUDA_TOOLKIT_ROOT_DIR not found or specified

-- Could NOT find CUDA (missing:  CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "4.1")

-- Found PythonInterp: /bin/python2 (found suitable version "2.7.3", minimum required is "2.0") 

-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "2.7.3")

-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS

-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success

-- 

-- General configuration for OpenCV 2.4.3 =====================================

--   Version control:               exported

-- 

--   Platform:

--     Host:                        Linux 3.7.8-202.fc18.x86_64 x86_64

--     Target:                      Linux armel

--     CMake:                       2.8.10.2

--     CMake generator:             Unix Makefiles

--     CMake build tool:            /bin/gmake

--     Configuration:               RELEASE

-- 

--   C/C++:

--     Built as dynamic libs?:      YES

--     C++ Compiler:                /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-g++  (ver 1.13.1)

--     C++ flags (Release):         -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -O3 -DNDEBUG  -DNDEBUG

--     C++ flags (Debug):           -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3

--     C Compiler:                  /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-gcc

--     C flags (Release):           -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -O3 -DNDEBUG  -DNDEBUG

--     C flags (Debug):             -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3

--     Linker flags (Release):      

--     Linker flags (Debug):        

--     Precompiled headers:         YES

-- 

--   OpenCV modules:

--     To be built:                 core imgproc flann highgui features2d calib3d ml video objdetect contrib nonfree photo legacy gpu stitching ts videostab

--     Disabled:                    world

--     Disabled by dependency:      -

--     Unavailable:                 androidcamera java ocl python

-- 

--   GUI: 

--     QT 4.x:                      NO

--     GTK+ 2.x:                    NO

--     GThread :                    NO

--     GtkGlExt:                    NO

--     OpenGL support:              NO

-- 

--   Media I/O: 

--     ZLib:                        zlib (ver 1.2.7)

--     JPEG:                        libjpeg (ver 62)

--     PNG:                         build (ver 1.5.12)

--     TIFF:                        build (ver 42 - 4.0.2)

--     JPEG 2000:                   build (ver 1.900.1)

--     OpenEXR:                     build (ver 1.7.1)

-- 

--   Video I/O:

--     DC1394 1.x:                  NO

--     DC1394 2.x:                  NO

--     FFMPEG:                      NO

--       codec:                     NO

--       format:                    NO

--       util:                      NO

--       swscale:                   NO

--       gentoo-style:              NO

--     GStreamer:                   NO

--     OpenNI:                      NO

--     OpenNI PrimeSensor Modules:  NO

--     PvAPI:                       NO

--     GigEVisionSDK:               NO

--     UniCap:                      NO

--     UniCap ucil:                 NO

--     V4L/V4L2:                    NO/YES

--     XIMEA:                       NO

--     Xine:                        NO

-- 

--   Other third-party libraries:

--     Use TBB:                     NO

--     Use Cuda:                    NO

--     Use OpenCL:                  NO

--     Use Eigen:                   NO

-- 

--   Python:

--     Interpreter:                 /bin/python2 (ver 2.7.3)

-- 

--   Documentation:

--     Build Documentation:         NO

--     Sphinx:                      NO

--     PdfLaTeX compiler:           /bin/pdflatex

-- 

--   Tests and samples:

--     Tests:                       YES

--     Performance tests:           YES

--     Examples:                    NO

-- 

--   Install path:                  /opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/

-- 

--   cvconfig.h is in:              /hogehoge/OpenCV-2.4.3/zedboard_linaro


-- 

-- Configuring done

-- Generating done

-- Build files have been written to: /hogehoge/OpenCV-2.4.3/zedboard_linaro

% cd ..

% make

% make install