Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling OpenCV with OpenGL

I am trying to compile opencv 2.4.6.1 on Centos 5.10. However, whenever I add WITH_OPENGL=ON, I am unable to compile it.

My cmake line:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-2.4.6.1-test -D CMAKE_CXX_COMPILER=/usr/local/gcc-4.8.1/bin/g++ -D CMAKE_C_COMPILER=/usr/local/gcc-4.8.1/bin/gcc -D BUILD_opencv_python=OFF -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.5/ -D WITH_FFMPEG=YES -D BUILD_EXAMPLES=ON -D WITH_TBB=ON -D TBB_INCLUDE_DIRS=/opt/intel.2013.0.028/tbb/include/ -D TBB_LIB_DIR=/opt/intel.2013.0.028/tbb/lib/intel64/ -D WITH_IPP=ON -D ENABLE_PROFILING=ON -D WITH_OPENGL=ON  ..

I also have the following environment variables set:

export IPPROOT=/opt/intel.2013.0.028/ipp/
export PKG_CONFIG_PATH=/usr/local/ffmpeg-2.0.2/lib/pkgconfig

This results in:

-- The CXX compiler identification is GNU
-- The C compiler identification is GNU
-- Check for working CXX compiler: /usr/local/gcc-4.8.1/bin/g++
-- Check for working CXX compiler: /usr/local/gcc-4.8.1/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/local/gcc-4.8.1/bin/gcc
-- Check for working C compiler: /usr/local/gcc-4.8.1/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- 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 - 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_WNO_LONG_LONG
-- Performing Test HAVE_CXX_WNO_LONG_LONG - Success
-- Performing Test HAVE_C_WNO_LONG_LONG
-- Performing Test HAVE_C_WNO_LONG_LONG - 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_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Performing Test HAVE_CXX_PG_G
-- Performing Test HAVE_CXX_PG_G - Failed
-- Performing Test HAVE_C_PG_G
-- Performing Test HAVE_C_PG_G - Failed
-- 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
-- Found ZLIB: /lib64/libz.so (found version "1.2.3")
-- Found TIFF: /usr/lib64/libtiff.so 
-- Found JPEG: /usr/lib64/libjpeg.so 
-- Could NOT find Jasper (missing:  JASPER_LIBRARY 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_MISSING_PROTOTYPES
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER - Success
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WNO_UNUSED
-- Performing Test HAVE_C_WNO_UNUSED - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Performing Test HAVE_C_WNO_SIGN_COMPARE
-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success
-- Found PNG: /usr/lib64/libpng.so 
-- Looking for /usr/include/png.h
-- Looking for /usr/include/png.h - found
-- Looking for /usr/include/libpng/png.h
-- Looking for /usr/include/libpng/png.h - not found
-- 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_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - 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.10.4
-- checking for module 'gthread-2.0'
--   found gthread-2.0, version 2.12.3
-- checking for module 'gtkglext-1.0'
--   found gtkglext-1.0, version 1.0.6
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- 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 - not found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.18.102
-- checking for module 'libavformat'
--   found libavformat, version 55.12.100
-- checking for module 'libavutil'
--   found libavutil, version 52.38.100
-- checking for module 'libswscale'
--   found libswscale, version 2.3.100
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   package 'tbb' not found
-- found IPP: 7.1.1 [7.1.1]
-- at: /opt/intel.2013.0.028/ipp
-- IPP libs: libippvm_l.a;libippcc_l.a;libippcv_l.a;libippi_l.a;libipps_l.a;libippcore_l.a
-- IPP libs: libippvm_l.a;libippcc_l.a;libippcv_l.a;libippi_l.a;libipps_l.a;libippcore_l.a
-- CUDA detected: 5.5
-- CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_20,code=compute_20;-gencode;arch=compute_30,code=compute_30
-- Found PythonInterp: /usr/local/bin/python (found suitable version "2.6.4", required is "2.0")
-- Found PythonLibs: /usr/local/lib/python2.6/config/libpython2.6.a (Required is at least version "2.6.4")
-- Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
-- Could NOT find OPENCL (missing:  OPENCL_LIBRARY OPENCL_INCLUDE_DIR) 
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- 
-- General configuration for OpenCV 2.4.6.1 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Linux 2.6.18-308.11.1.el5 x86_64
--     CMake:                       2.8.6
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               RELEASE
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/local/gcc-4.8.1/bin/g++  (ver 4.8.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 -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread  -msse -msse2 -msse3 -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread  -msse -msse2 -msse3 -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     C Compiler:                  /usr/local/gcc-4.8.1/bin/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 -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread  -msse -msse2 -msse3 -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 -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread  -msse -msse2 -msse3 -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 photo legacy gpu nonfree stitching superres ts videostab
--     Disabled:                    python world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera java ocl
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.10.4)
--     GThread :                    YES (ver 2.12.3)
--     GtkGlExt:                    YES (ver 1.0.6)
--     OpenGL support:              YES (/usr/lib64/libGLU.so /usr/lib64/libGL.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so /usr/lib64/libXext.so)
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.3)
--     JPEG:                        /usr/lib64/libjpeg.so (ver 62)
--     PNG:                         /usr/lib64/libpng.so (ver 1.2.10)
--     TIFF:                        /usr/lib64/libtiff.so (ver 42 - 3.8.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:                      YES
--       codec:                     YES (ver 55.18.102)
--       format:                    YES (ver 55.12.100)
--       util:                      YES (ver 52.38.100)
--       swscale:                   YES (ver 2.3.100)
--       gentoo-style:              YES
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/NO
--     XIMEA:                       NO
--     Xine:                        NO
-- 
--   Other third-party libraries:
--     Use IPP:                     7.1.1 [7.1.1]
--          at:                     /opt/intel.2013.0.028/ipp
--     Use Eigen:                   NO
--     Use TBB:                     YES (ver 4.1 interface 6101)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    YES (ver 5.5)
--     Use OpenCL:                  NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             11 12 13 20 21 30
--     NVIDIA PTX archs:            20 30
--     Use fast math:               NO
-- 
--   Python:
--     Interpreter:                 /usr/local/bin/python (ver 2.6.4)
-- 
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java tests:                  NO
-- 
--   Documentation:
--     Build Documentation:         NO
--     Sphinx:                      NO
--     PdfLaTeX compiler:           /usr/bin/pdflatex
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              YES
-- 
--   Install path:                  /usr/local/opencv-2.4.6.1-test
-- 
--   cvconfig.h is in:              /usr/local/src/opencv-2.4.6.1/release
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/opencv-2.4.6.1/release

This is the error I get when I try to build it:

Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/copy.cpp.o
/usr/local/src/opencv-2.4.6.1/modules/core/src/gl_core_3_1.cpp: In function ‘void* IntGetProcAddress(const char*)’:
/usr/local/src/opencv-2.4.6.1/modules/core/src/gl_core_3_1.cpp:131:88: error: ‘glXGetProcAddressARB’ was not declared in this scope
         #define CV_GL_GET_PROC_ADDRESS(name) glXGetProcAddressARB((const GLubyte*) name)
                                                                                        ^
/usr/local/src/opencv-2.4.6.1/modules/core/src/gl_core_3_1.cpp:136:31: note: in expansion of macro ‘CV_GL_GET_PROC_ADDRESS’
         void* func =  (void*) CV_GL_GET_PROC_ADDRESS(name);
                               ^
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/gl_core_3_1.cpp.o] Error 1

Here is the results of rpm -qa | grep gl

libglade2-2.6.0-2
glade2-2.12.1-6.el5
freeglut-devel-2.4.0-7.1.el5
dbus-glib-0.73-11.el5_9
glx-utils-6.5.1-7.11.el5_9
glib-1.2.10-20.el5
dbus-glib-0.73-11.el5_9
glibc-devel-2.5-118.el5_10.2
gtkglext-devel-1.0.6-1.el5.rf
glibc-common-2.5-118.el5_10.2
glib-devel-1.2.10-20.el5
NetworkManager-glib-0.7.0-13.el5
xscreensaver-gl-extras-5.04-1.el5.centos
libglade2-devel-2.6.0-2
glibc-devel-2.5-118.el5_10.2
gtkglext-1.0.6-1.el5.rf
compat-glibc-headers-2.3.4-2.26
compat-glibc-2.3.4-2.26
freeglut-2.4.0-7.1.el5
glib-devel-1.2.10-20.el5
NetworkManager-glib-0.7.0-13.el5
glib2-devel-2.12.3-4.el5_3.1
glibc-2.5-118.el5_10.2
xscreensaver-gl-base-5.04-1.el5.centos
gtkglext-devel-1.0.6-1.el5.rf
avahi-glib-0.6.16-10.el5_6
glib2-2.12.3-4.el5_3.1
glib2-devel-2.12.3-4.el5_3.1
libglade2-devel-2.6.0-2
freeglut-devel-2.4.0-7.1.el5
glibc-2.5-118.el5_10.2
glib-1.2.10-20.el5
gtkglext-1.0.6-1.el5.rf
avahi-glib-0.6.16-10.el5_6
glib2-2.12.3-4.el5_3.1
compat-glibc-2.3.4-2.26
dbus-glib-devel-0.73-11.el5_9
xscreensaver-gl-extras-gss-5.04-1.el5.centos
glibc-headers-2.5-118.el5_10.2
glibc-utils-2.5-118.el5_10.2
libglade2-2.6.0-2
pygtk2-libglade-2.10.1-12.el5
freeglut-2.4.0-7.1.el5
dbus-glib-devel-0.73-11.el5_9

I believe I must be missing a library or something. Any ideas?

like image 728
Alex Avatar asked Nov 04 '13 14:11

Alex


3 Answers

You seem to be missing GL/glx.h, perhaps with mesa-libGL ?

like image 72
florentbuisson Avatar answered Sep 30 '22 10:09

florentbuisson


You probably forgot to install the GTK+ OpenGL Extensions and their headers:

yum install libgtkglext1 libgtkglext1-dev

like image 31
Morgan Avatar answered Sep 30 '22 08:09

Morgan


As @florentbuisson said earlier, your system might be missing glx.h. But it could also be including another glx.h before the Mesa version, one that doesn't define glXGetProcAddressARB().

Either way, one quick hack to bypass this problem is to edit /usr/local/src/opencv-2.4.6.1/modules/core/src/gl_core_3_1.cpp and in the beginning of the file add:

#define glXGetProcAddress glXGetProcAddressARB 
like image 37
karlphillip Avatar answered Sep 30 '22 08:09

karlphillip