Не удается найти -lgtk-x11-2.0. Кроме того, некоторые модули не найдены cmake, хотя они установлены

Я пытаюсь запустить opencv на Fedora 21 64-bit с ARM-компиляторами. Я попытался настроить его с графическим интерфейсом Cmake 3.0.2, и я получил это:

The CXX compiler identification is GNU 4.5.1
The C compiler identification is GNU 4.5.1
Check for working CXX compiler: /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++
Check for 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 for working C compiler: /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc
Check for 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 for pthread.h
Looking for pthread.h - found
Check if the system is big endian
Searching 16 bit integer
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 unsigned short
Check size of unsigned short - done
Using unsigned short
Check if the system is big endian - little endian
Could NOT find ZLIB (missing:  ZLIB_LIBRARY) (found version "1.2.8")
Looking for fseeko
Looking for fseeko - found
Looking for unistd.h
Looking for 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
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
Looking for unistd.h
Looking for 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
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
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")
Could NOT find PNG (missing:  PNG_LIBRARY) (found version "1.6.10")
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'
found gtk+-2.0, version 2.24.28
checking for module 'gthread-2.0'
found gthread-2.0, version 2.42.2
checking for module 'gstreamer-base-1.0'
package 'gstreamer-base-1.0' not found
checking for module 'gstreamer-video-1.0'
package 'gstreamer-video-1.0' not found
checking for module 'gstreamer-app-1.0'
package 'gstreamer-app-1.0' not found
checking for module 'gstreamer-riff-1.0'
package 'gstreamer-riff-1.0' not found
checking for module 'gstreamer-pbutils-1.0'
package 'gstreamer-pbutils-1.0' not found
checking for module 'gstreamer-base-0.10'
package 'gstreamer-base-0.10' not found
checking for module 'gstreamer-video-0.10'
package 'gstreamer-video-0.10' not found
checking for module 'gstreamer-app-0.10'
package 'gstreamer-app-0.10' not found
checking for module 'gstreamer-riff-0.10'
package 'gstreamer-riff-0.10' not found
checking for module 'gstreamer-pbutils-0.10'
package 'gstreamer-pbutils-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
checking for module 'libv4l2'
package 'libv4l2' not found
Looking for linux/videodev.h
Looking for linux/videodev.h - found
Looking for linux/videodev2.h
Looking for linux/videodev2.h - found
Looking for sys/videoio.h
Looking for sys/videoio.h - not 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
Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.8", minimum required is "2.0")
Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.7")
Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)
If you want to enable Python/Numpy support, set the following variables:
PYTHON_INCLUDE_PATH
PYTHON_LIBRARIES
PYTHON_NUMPY_INCLUDE_DIR
Could 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 for 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 as 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:
To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab
Disabled:                    world
Disabled by 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 and samples:
Tests:                       YES
Performance tests:           YES
C/C++ Examples:              NO

Install path:                  /usr/local

cvconfig.h is in:              /opt/relarm
-----------------------------------------------------------------

Configuring done

Он показывает, что многие модули, включая gstreamer, dc1394 и т. Д., Не найдены. Но я установил их вручную, используя команды sudo yum install.
Теперь, когда я запустил команду make в Терминале, она выдала мне следующую ошибку, которая показывает, что -lgtk-x11-2.0 не может быть найден, хотя я установил его с помощью 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
for target 'lib/libopencv_highgui.so.2.4.11' failed make[2]: ***
[lib/libopencv_highgui.so.2.4.11] Error 1 CMakeFiles/Makefile2:2025:
recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all'
failed make[1]: ***
[modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Makefile:147: recipe for target 'all' failed make: *** [all] Error 2
[root@osboxes relarm]#

Любая помощь будет принята с благодарностью.
Заранее спасибо.

0

Решение

Проблема, с которой вы столкнулись, состоит в том, что библиотеки, которые вы установили, предназначены для вашей родной архитектуры настольных компьютеров, и вы пытаетесь связать их с компилятором ARM для архитектуры ARM, это не будет работать. Вы должны найти библиотеки ARM-архитектуры для связи.

У вас есть два выхода из этой проблемы: а) Загрузите исходный код для нужных вам библиотек самостоятельно, сделайте кросс-компиляцию с вашим компилятором arm и, наконец, используйте эти библиотеки для связи вашего приложения, либо β) Вы можете попробовать Buildroot, это проект, который позволяет вам выбирать архитектуру, библиотеки, которые вы хотите построить, затем он просто загружает исходный код и собирает. После завершения этого шага вы можете использовать его компиляторы и библиотеки для создания собственного приложения.

0

Другие решения