Open
Description
System information (version)
- OpenCV => 4.6.0
- Operating System / Platform => CentOS 7
- Compiler => gcc-11 (devtoolset-11)
- Nvidia system with R515.48.07 driver and CUDA 11.7.
Detailed description
Undefined reference to glGenRenderbuffersEXT
and several other OpenGL functions.
Was fine a few versions (4.5.5) and months ago (2022-04-27).
Not sure if it's due to changes of something else in system or due to opencv itself.
$ cmake --build . -- -j1
[1/8] cd /media/Scratch/tmp.FilPhE8QZU/opencv/build/modules/cvv && /usr/local/bin/cmake -E cmake_autogen /media/Scratch/tmp.FilPhE8QZU/opencv/build/modules/cvv/CMakeFiles/opencv_cvv_autogen.dir/AutogenInfo.json Release
[2/5] : && /opt/rh/devtoolset-11/root/usr/bin/g++ -fPIC -fdebug-prefix-map='/media/Scratch/tmp.FilPhE8QZU'='/usr/local/src' -g -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -flto -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -O3 -DNDEBUG -DNDEBUG -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -shared -Wl,-soname,libopencv_rgbd.so.406 -o lib/libopencv_rgbd.so.4.6.0 modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/colored_kinfu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/colored_tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/depth_cleaner.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/depth_registration.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/depth_to_3d.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/dqb.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/dynafu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/dynafu_tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/fast_icp.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/hash_tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/kinfu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/kinfu_frame.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/large_kinfu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/linemod.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/nonrigid_icp.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/normal.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/odometry.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/plane.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/pose_graph.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/tsdf_functions.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/utils.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/volume.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/warpfield.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/opencl_kernels_rgbd.cpp.o -Wl,-rpath,/media/Scratch/tmp.FilPhE8QZU/opencv/build/lib:::::::::::::::::::::::::::::: lib/libopencv_calib3d.so.4.6.0 -ldl -lm -lpthread -lrt 3rdparty/lib/libippiw.a 3rdparty/ippicv/ippicv_lnx/icv/lib/intel64/libippicv.a /lib64/libOpenGL.so /lib64/libGLX.so /lib64/libGLU.so lib/libopencv_features2d.so.4.6.0 lib/libopencv_flann.so.4.6.0 lib/libopencv_imgproc.so.4.6.0 lib/libopencv_core.so.4.6.0 && :
FAILED: lib/libopencv_rgbd.so.4.6.0
: && /opt/rh/devtoolset-11/root/usr/bin/g++ -fPIC -fdebug-prefix-map='/media/Scratch/tmp.FilPhE8QZU'='/usr/local/src' -g -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -flto -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -O3 -DNDEBUG -DNDEBUG -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -shared -Wl,-soname,libopencv_rgbd.so.406 -o lib/libopencv_rgbd.so.4.6.0 modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/colored_kinfu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/colored_tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/depth_cleaner.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/depth_registration.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/depth_to_3d.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/dqb.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/dynafu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/dynafu_tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/fast_icp.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/hash_tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/kinfu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/kinfu_frame.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/large_kinfu.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/linemod.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/nonrigid_icp.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/normal.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/odometry.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/plane.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/pose_graph.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/tsdf.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/tsdf_functions.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/utils.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/volume.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/src/warpfield.cpp.o modules/rgbd/CMakeFiles/opencv_rgbd.dir/opencl_kernels_rgbd.cpp.o -Wl,-rpath,/media/Scratch/tmp.FilPhE8QZU/opencv/build/lib:::::::::::::::::::::::::::::: lib/libopencv_calib3d.so.4.6.0 -ldl -lm -lpthread -lrt 3rdparty/lib/libippiw.a 3rdparty/ippicv/ippicv_lnx/icv/lib/intel64/libippicv.a /lib64/libOpenGL.so /lib64/libGLX.so /lib64/libGLU.so lib/libopencv_features2d.so.4.6.0 lib/libopencv_flann.so.4.6.0 lib/libopencv_imgproc.so.4.6.0 lib/libopencv_core.so.4.6.0 && :
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o: in function `cv::dynafu::DynaFu::create(cv::Ptr<cv::kinfu::Params> const&)':
/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:159: undefined reference to `glGenRenderbuffersEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:160: undefined reference to `glBindRenderbufferEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:161: undefined reference to `glRenderbufferStorageEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:164: undefined reference to `glGenFramebuffersEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:165: undefined reference to `glBindFramebufferEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:167: undefined reference to `glFramebufferRenderbufferEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:171: undefined reference to `glGenRenderbuffersEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:172: undefined reference to `glBindRenderbufferEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:173: undefined reference to `glRenderbufferStorageEXT'
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: /tmp/ccFIHCan.ltrans1.ltrans.o:/usr/local/src/opencv/build/../contrib/modules/rgbd/src/dynafu.cpp:175: undefined reference to `glFramebufferRenderbufferEXT'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Steps to reproduce
Here's the cmake arg list I'm using:
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found any solution - I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc