c++ - Cannot find -lgtk-x11-2.0. Also, some modules are not found by cmake, though they are installed -
i trying run opencv on fedora 21 64-bit arm-compilers. tried configuring cmake 3.0.2 gui , got this:
the cxx compiler identification gnu 4.5.1 c compiler identification gnu 4.5.1 check working cxx compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-g++ check working cxx compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-g++ -- works detecting cxx compiler abi info detecting cxx compiler abi info - done check working c compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-gcc check working c compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-gcc -- works detecting c compiler abi info detecting c compiler abi info - done detected version of gnu gcc: 45 (405) performing test have_cxx_fsigned_char performing test have_cxx_fsigned_char - success performing test have_c_fsigned_char performing test have_c_fsigned_char - success 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 - failed performing test have_c_wno_narrowing performing test have_c_wno_narrowing - failed performing test have_cxx_wno_delete_non_virtual_dtor performing test have_cxx_wno_delete_non_virtual_dtor - failed 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 pthread.h looking pthread.h - found check if system big endian searching 16 bit integer looking sys/types.h looking sys/types.h - found looking stdint.h looking stdint.h - found looking stddef.h looking stddef.h - found check size of unsigned short check size of unsigned short - done using unsigned short check if system big endian - little endian not find zlib (missing: zlib_library) (found version "1.2.8") looking fseeko looking fseeko - found looking unistd.h looking unistd.h - found check size of off64_t check size of off64_t - failed performing test have_c_wno_shorten_64_to_32 performing test have_c_wno_shorten_64_to_32 - 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 not find tiff (missing: tiff_library tiff_include_dir) looking assert.h looking assert.h - found looking fcntl.h looking fcntl.h - found looking io.h looking io.h - not found looking jbg_newlen looking jbg_newlen - not found looking mmap looking mmap - found looking search.h looking search.h - found looking string.h looking string.h - found looking unistd.h looking unistd.h - found performing test have_c_wno_unused_but_set_variable performing test have_c_wno_unused_but_set_variable - failed 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 - failed 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_c_wno_unused_parameter performing test have_c_wno_unused_parameter - 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 not find jpeg (missing: jpeg_library jpeg_include_dir) found jpeg: libjpeg 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 performing test have_c_wno_unused_but_set_parameter performing test have_c_wno_unused_but_set_parameter - failed found zlib: zlib (found version "1.2.7") not find png (missing: png_library) (found version "1.6.10") looking semaphore.h looking 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 module 'gtk+-2.0' found gtk+-2.0, version 2.24.28 checking module 'gthread-2.0' found gthread-2.0, version 2.42.2 checking module 'gstreamer-base-1.0' package 'gstreamer-base-1.0' not found checking module 'gstreamer-video-1.0' package 'gstreamer-video-1.0' not found checking module 'gstreamer-app-1.0' package 'gstreamer-app-1.0' not found checking module 'gstreamer-riff-1.0' package 'gstreamer-riff-1.0' not found checking module 'gstreamer-pbutils-1.0' package 'gstreamer-pbutils-1.0' not found checking module 'gstreamer-base-0.10' package 'gstreamer-base-0.10' not found checking module 'gstreamer-video-0.10' package 'gstreamer-video-0.10' not found checking module 'gstreamer-app-0.10' package 'gstreamer-app-0.10' not found checking module 'gstreamer-riff-0.10' package 'gstreamer-riff-0.10' not found checking module 'gstreamer-pbutils-0.10' package 'gstreamer-pbutils-0.10' not found checking module 'libdc1394-2' package 'libdc1394-2' not found checking module 'libdc1394' package 'libdc1394' not found checking module 'libv4l1' package 'libv4l1' not found checking module 'libv4l2' package 'libv4l2' not found looking linux/videodev.h looking linux/videodev.h - found looking linux/videodev2.h looking linux/videodev2.h - found looking sys/videoio.h looking sys/videoio.h - not found checking module 'libavcodec' package 'libavcodec' not found checking module 'libavformat' package 'libavformat' not found checking module 'libavutil' package 'libavutil' not found checking module 'libswscale' package 'libswscale' not found looking libavformat/avformat.h looking libavformat/avformat.h - not found looking ffmpeg/avformat.h looking ffmpeg/avformat.h - not found found pythoninterp: /usr/bin/python2 (found suitable version "2.7.8", minimum required "2.0") not find pythonlibs (missing: python_libraries python_include_dirs) (required @ least version "2.7") cannot probe python/numpy support (because cross-compiling opencv) if want enable python/numpy support, set following variables: python_include_path python_libraries python_numpy_include_dir not find jni (missing: java_awt_library java_include_path java_include_path2 java_awt_include_path) performing test have_cxx_wno_deprecated_declarations performing test have_cxx_wno_deprecated_declarations - success general configuration opencv 2.4.11 ===================================== version control: unknown platform: host: linux 3.17.4-301.fc21.x86_64 x86_64 target: linux cmake: 3.0.2 cmake generator: unix makefiles cmake build tool: /usr/bin/gmake configuration: release c/c++: built dynamic libs?: yes c++ compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-g++ (ver 4.5.1) c++ flags (release): -fsigned-char -w -wall -werror=return-type -werror=address -werror=sequence-point -wformat -werror=format-security -wmissing-declarations -wundef -winit-self -wpointer-arith -wshadow -wsign-promo -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -o3 -dndebug -dndebug c++ flags (debug): -fsigned-char -w -wall -werror=return-type -werror=address -werror=sequence-point -wformat -werror=format-security -wmissing-declarations -wundef -winit-self -wpointer-arith -wshadow -wsign-promo -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g -o0 -ddebug -d_debug c compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-gcc c flags (release): -fsigned-char -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 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -o3 -dndebug -dndebug c flags (debug): -fsigned-char -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 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -g -o0 -ddebug -d_debug linker flags (release): linker flags (debug): precompiled headers: yes opencv modules: built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab disabled: world disabled dependency: - unavailable: androidcamera dynamicuda java python viz gui: qt: no gtk+ 2.x: yes (ver 2.24.28) gthread : yes (ver 2.42.2) gtkglext: no opengl support: no vtk 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: yes/yes ximea: no xine: no other third-party libraries: use ipp: no use eigen: no use tbb: no use openmp: no use gcd no use concurrency no use c=: no use cuda: no use opencl: yes opencl: version: dynamic include path: /opt/opencv/3rdparty/include/opencl/1.2 use amd fft: no use amd blas: no python: interpreter: /usr/bin/python2 (ver 2.7.8) java: ant: no jni: no java tests: no documentation: build documentation: no sphinx: no pdflatex compiler: no doxygen: no tests , samples: tests: yes performance tests: yes c/c++ examples: no install path: /usr/local cvconfig.h in: /opt/relarm ----------------------------------------------------------------- configuring done
it shows many of modules including gstreamer, dc1394 etc not found. have installed them manually using sudo yum install commands. run make command in terminal gave me following error shows -lgtk-x11-2.0 cannot found, though have installed yum.
linking cxx shared library ../../lib/libopencv_highgui.so /opt/friendlyarm/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgtk-x11-2.0 collect2: ld returned 1 exit status modules/highgui/cmakefiles/opencv_highgui.dir/build.make:520: recipe target 'lib/libopencv_highgui.so.2.4.11' failed make[2]: *** [lib/libopencv_highgui.so.2.4.11] error 1 cmakefiles/makefile2:2025: recipe target 'modules/highgui/cmakefiles/opencv_highgui.dir/all' failed make[1]: *** [modules/highgui/cmakefiles/opencv_highgui.dir/all] error 2 makefile:147: recipe target 'all' failed make: *** [all] error 2 [root@osboxes relarm]#
any appreciated much. in advance.
the problem met because libraries installed native desktop architecture, , you're trying link these arm compiler arm architecture, won't work. have find arm-architecture libraries link with.
you have 2 ways out of problem: α) download source code libraries need yourself, crosscompile these arm compiler, , use these libraries link application, either β) may try buildroot, project allows choose architecture, libraries want build, next downloads source code , builds. after step finished, may use compilers , libraries build own application.
Comments
Post a Comment