Ask Your Question
0

OpenCv 3.0 install error on Ubuntu 14.04 - undefined reference to `glXGetProcAddressARB'

asked 2015-09-25 09:01:52 -0600

malganis99 gravatar image

updated 2015-09-27 08:14:47 -0600

I followed this guide http://milq.github.io/install-opencv-...

I have Linux Mint 17.2 (Ubuntu 14.04.3) and I want to install opencv3.0 for python2.7.

For cmake I used

cmake -DWITH_QT=ON -DWITH_OPENGL=OFF -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DWITH_FFMPEG=OFF ..

I dont have opengl support on my laptop and I dont need video module, I need it only for photos.

I get this error during make -j4

Linking CXX executable ../../bin/opencv_traincascade
[ 64%] Built target opencv_createsamples
[ 64%] Built target opencv_videostab
Scanning dependencies of target example_tapi_bgfg_segm
Scanning dependencies of target example_tapi_camshift
[ 73%] [ 74%] Building CXX object samples/tapi/CMakeFiles/example_tapi_bgfg_segm.dir/bgfg_segm.cpp.o
Built target opencv_java
Scanning dependencies of target example_tapi_clahe
[ 74%] Building CXX object samples/tapi/CMakeFiles/example_tapi_camshift.dir/camshift.cpp.o
[ 74%] Building CXX object samples/tapi/CMakeFiles/example_tapi_clahe.dir/clahe.cpp.o
../../lib/libopencv_core.so.3.0.0: undefined reference to `glXGetProcAddressARB'
collect2: error: ld returned 1 exit status
make[2]: * [bin/opencv_traincascade] Error 1
make[1]:
[apps/traincascade/CMakeFiles/opencv_traincascade.dir/all] Error 2
make[1]:
Waiting for unfinished jobs....
Linking CXX executable ../../bin/tapi-example-clahe
Linking CXX executable ../../bin/tapi-example-bgfg_segm
Linking CXX executable ../../bin/tapi-example-camshift
[ 74%] Built target example_tapi_clahe
[ 74%] Built target example_tapi_bgfg_segm
[ 74%] Built target example_tapi_camshift
make: *
[all] Error 2

What do I need to do? What other options could I use in cmake so it's only for photos?

EDIT:

According to the comment by berak I used

cmake -DWITH_QT=ON -DWITH_OPENGL=OFF -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON >-DBUILD_EXAMPLES=OFF -DWITH_FFMPEG=OFF -DFORCE_VTK=OFF ..

and it's basicaly the same error

Linking CXX executable ../../bin/opencv_test_stitching
../../lib/libopencv_core.so.3.0.0: undefined reference to `glXGetProcAddressARB'
collect2: error: ld returned 1 exit status
make[2]: * [bin/opencv_traincascade] Error 1
make[1]:
[apps/traincascade/CMakeFiles/opencv_traincascade.dir/all] Error 2
make[1]:
Waiting for unfinished jobs....
[ 88%] Built target opencv_createsamples
[ 88%] Built target opencv_perf_stitching
[ 88%] Built target opencv_test_stitching
make: *
[all] Error 2

The problem is undefined reference to `glXGetProcAddressARB'. Is there a library I'm missing or can I even install it when I dont have OpenGL?

edit retag flag offensive close merge delete

Comments

hmm, you can't have vtk without opengl. try either to remove the -DFORCE_VTK=ON part, or the -DWITH_OPENGL=OFF one.

last, but not least, you can disable the (c++) examples : -DBUILD_examples=OFF (you probably don't even need them, if all you want is the python bindings)

berak gravatar imageberak ( 2015-09-27 00:44:43 -0600 )edit

Added to op.

malganis99 gravatar imagemalganis99 ( 2015-09-27 08:16:33 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-09-26 16:04:13 -0600

Please follow the instruction. I have successfully installed opencv3 in ubuntu 14.04.

http://milq.github.io/install-opencv-...

Thanks.

edit flag offensive delete link more

Comments

I have followed exactly that guide and I get that error.

Is more info needed from my side?

malganis99 gravatar imagemalganis99 ( 2015-09-26 18:22:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-09-25 09:01:52 -0600

Seen: 2,979 times

Last updated: Sep 27 '15