fastfusion
fastfusion copied to clipboard
Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Hi, I am using fastfusion on Ubuntu 16.04, and when i run fastfusion after building, I get the following error:
Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
I cannot delete either of the two because both are needed by basic OS applications. Is fastfusion direcly importing GTK libraries, or could it be OpenCV importing symbols from both GTK versions? Any hints how I can get pass it will be greatly appreciated.
Thanks.
Please note that "ldd" shows only gtk3, I am unable to understand how gtk2 symbols are being used by the program.
`~/fastfusion $ ldd -d bin/onlinefusion | grep gtk
libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f51ee529000)
`
Hi, I am facing the same problem. Does anyone know how to solve it? @tashianasir?
(I'm on Ubuntu 18.04)
I fixed it by manually compiling OpenCV and setting it to use GTK2.0. Make sure to enable WITH_GTK_2_X when configuring via CMake.
Afterwards you might face a new bug, if you use the most recent OpenCV version, about ::type not being a member or something (sry, dont have my logs anymore).
You need to change all:
cv::Datatype< DT >::type to cv::traits::Type
Furthermore, in src/auxiliary/ocv_tools.cpp I needed to comment out a part of the code which is referencing a now out-dated datatype. Specifically this part:
#include <auxiliary/ocv_tools.h>
[...]
// if(m.type() == cv::traits::Type<uint>::value)
// {
// return "uint";
// }
[...]
For me this doesn't break anything. If it does for you, either recompile OpenCV with deprecated types enabled in traits, or change to a new, equivalent type.
EDIT: For example, see https://github.com/ros-perception/image_pipeline/pull/302/files which performs a comparable fix in a DIFFERENT (aka unrelated) project.
HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks ! import gi gi.require_version('Gtk', '2.0')
gi
no module named gi!
@phamvandan ValueError: Namespace Gtk is already loaded with version 3.0
when using gi.require_version('Gtk','2.0')
@imohamadhoseins pip install gi
@devkapilbansal Oh, i don't know this error
@devkapilbansal Oh, i don't know this error
@phamvandan I found it. It was because I was using matplotlib and opencv at a same time and probably both uses different Gtk versions
@devkapilbansal , yeah, I see.
HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks ! import gi gi.require_version('Gtk', '2.0')
Thanks for the fix. Really helped
HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks ! import gi gi.require_version('Gtk', '2.0')
Thanks for the fix. Really helped
@Achilles107 where is the main python file in this repository?
@devkapilbansal how did you solve the problem? were you able to use both together?
@Vigneshpadoor I use opencv only there removing matplotlib and doing the changes in separate files
import gi gi.require_version('Gtk', '2.0')
Could you elaborate how to implement the fix above pls? Thank you
Fix related to this error running eviacam: (eviacam:22012): Gtk-ERROR **: 15:04:20.718: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)
import gi gi.require_version('Gtk', '2.0')
Could you elaborate how to implement the fix above pls? Thank you
Fix related to this error running eviacam: (eviacam:22012): Gtk-ERROR **: 15:04:20.718: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)
Just add it to the "TOP" of your python script or avoiding using both openCV and matplotlib
In testing gtkmm3.x with openCV used, it will conflict with the default GTK+ 2.x installed. To this issue, I rebuild OpenCV by unchecking the option of GTK+ 2.x, then this error message disappears.
HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks ! import gi gi.require_version('Gtk', '2.0')
How can this be implemented in c++?
I'm not sure about that
On Tue, Nov 15, 2022 at 6:15 PM MagnusErler @.***> wrote:
HELLO GUYS, After many months work with this error, I have just passed this by append this two lines in the head of the main python file. It will specify only version, which you want when your environment have many version of GTK. Good lucks ! import gi gi.require_version('Gtk', '2.0')
How can this be implemented in c++?
— Reply to this email directly, view it on GitHub https://github.com/tum-vision/fastfusion/issues/21#issuecomment-1315163489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2WPYKMSHU5UP3SWFO5GT3WINWF3ANCNFSM4EFKIQ2Q . You are receiving this because you were mentioned.Message ID: @.***>