opencv: Error when make opencv2 : /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0: undefined reference to `g_option_group_unref'
System information (version)
- OpenCV => ❔
- Operating System / Platform => ❔
- Compiler => ❔
Detailed description
Hi,
Like title, when I run ‘make’ in opencv folder, then terminal throw some error :
[ 26%] Linking CXX executable …/…/bin/opencv_test_imgproc
//usr/lib/x86_64-linux-gnu/libgio-2.0.so.0: undefined reference to g_option_group_unref' //usr/lib/x86_64-linux-gnu/libgio-2.0.so.0: undefined reference to
g_thread_pool_move_to_front’
//usr/lib/x86_64-linux-gnu/libgio-2.0.so.0: undefined reference to `g_sequence_is_empty’
collect2: error: ld returned 1 exit status
What should I do ? Thanks . 😄
Steps to reproduce
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (1 by maintainers)
Hey!
I have been struggling with this problem for several days now! I even ended up deleting some libraries, which ended up causing damage to my Ubuntu system. It took me another whole day to fix it! Haha… it was a frustrating experience!
The actual reason behind this issue is that “{$anaconda}/lib/libgio-2.0xxx” has a different version compared to “/usr/lib/{$arch}/libgio-2.0xxx”, and as a result, cmake is unable to locate it. To resolve this, you can try creating a symbolic link. If your error message mentions “/usr/lib/${arch}”, you should remove the libgio-2.0xxx file from that location and create a symbolic link to “{$anaconda}/lib/libgio-2.0xxx” instead.
This solution should work for both OpenCV and OpenPose. If you need further clarification or more details, please feel free to ask. I apologize for any limitations in my English expression.
Ok, I think I passed this bug by the solution I mentioned above.
My hands are shaking… It works;