|
|
Home » Community » U++ community news and announcements » MILESTONE: gtk3 replaces gtk2 as default linux backend
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52932 is a reply to message #52930] |
Tue, 14 January 2020 11:36   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Tom1 wrote on Tue, 14 January 2020 09:21Hi,
My OpenGL (GLCtrl) based applications now crash on startup. I did a full rebuild, but still the result is this:
tom@tom-LM-WMV:~/upp.out/program52/CLANG.Gui.Shared$ ./GLModeler
(GLModeler:5955): Gtk-ERROR **: 10:07:31.280: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Trace/breakpoint trap (core dumped)
tom@tom-LM-WMV:~/upp.out/program52/CLANG.Gui.Shared$
Here's the backtrace:
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
g_log_writer_default () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
g_log_structured_array () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
g_log_structured_standard () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0
g_option_context_parse () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
gtk_parse_args () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
gtk_init_check () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
gtk_init () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
Upp::InitGtkApp (argc=1, argv=0x7fffffffe448, envptr=0x7fffffffe458) at /home/tom/upp.src/uppsrc/CtrlCore/GtkApp.cpp:74
main (argc=1, argv=0x7fffffffe448, envptr=0x7fffffffe458) at /mnt/hgfs/program52/GLModeler/GLModeler.cpp:3
Am I doing something wrong here? (I have not changed anything in my code and it used to work on Linux. It still works on Windows.)
Best regards,
Tom
Can you retry now? I have removed dependency on gtkglext, which we are not using anyway.
If it still does not work, do non-GL examples work for you?
Mirek
|
|
|
|
|
|
|
|
|
|
|
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52944 is a reply to message #52943] |
Thu, 16 January 2020 11:18   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
mr_ped wrote on Thu, 16 January 2020 11:05This sounds like lot of fun.
I guess dropping support for status icons in Gtk is legitimate option, as that's how the Gnome authors envision it and how they want it.
But as a KDE user, I would prefer if there were still APIs and tools in U++ to handle status icons normally.
But U++ is GTK3 based now, so ... I don't know. Maybe the X11 without GTK branch only to keep them supported and GTK3 branch to ignore any U++ API calls?
Seems quite awkward situation to me, I definitely like existence of status icons in the task bar in my desktop environment, and if some app is overusing it, I can uninstall the particular app. But I don't understand Gnome design decisions for many years, so this is just another one, I simply think completely differently about my computer "desk".
No worries, I have kept it with warnings disabled. Perhaps in future, if they decide to drop it, I can switch to X11 implementation, which is possible even with gtk3 backend. For now, problem solved.
(And yes, it is idiotic decision on gtk3 part. If they present it as multi-platform toolkit, they should care about more than Gnome).
Mirek
|
|
|
|
|
|
|
|
|
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52953 is a reply to message #52902] |
Mon, 20 January 2020 20:51   |
 |
amrein
Messages: 278 Registered: August 2008 Location: France
|
Experienced Member |
|
|
All POSIX OS have pkg-config in their repository. You must install pkg-config manually (using the distro package manager) as it's not installed by default when you install other devel packages. If so, this dependency need to be added in docs.
The main idea of using pkg-config is to have dynamic cflags and libs on any POSIX OS I guess.
So for me, the best strategy would be to add LDLIBS in Makefile using pkg-config (after CINC and at link time):
CINC = -I./ `pkg-config --cflags freetype2` `pkg-config --cflags x11` `pkg-config --cflags fontconfig` `pkg-config --cflags xcb` `pkg-config --cflags expat` `pkg-config --cflags libpng` `pkg-config --cflags xinerama` `pkg-config --cflags xrender` `pkg-config --cflags xft` `pkg-config --cflags xdmpc` `pkg-config --cflags xext` `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libnotify`
LDLIBS = `pkg-config --libs freetype2` `pkg-config --libs x11` `pkg-config --libs fontconfig` `pkg-config --libs xcb` `pkg-config --libs expat` `pkg-config --libs libpng` `pkg-config --libs xinerama` `pkg-config --libs xrender` `pkg-config --libs xft` `pkg-config --libs xdmpc` `pkg-config --libs xext` `pkg-config --libs gtk+-3.0` `pkg-config --libs libnotify` -lbz2 -lpthread -ldl -lrt -lz
...
$(OutDir_plugin_bmp)BmpReg.o \
$(OutDir_plugin_bmp)bmp.a \
$(OutDir_RichText)RichText.a \
$(LDLIBS) -Wl,--end-group
That way, it easier for external script like domake to change Makefiles configuration dynamically using its own CINC and LDLIBS.
Note: It would be even more fun to use Flags to switch Makefile from one configuration to another but my investigation in this area showed several flows because of POSIX gmake differences between OS.
[Updated on: Mon, 20 January 2020 21:02] Report message to a moderator
|
|
|
|
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52955 is a reply to message #52954] |
Tue, 21 January 2020 10:32   |
 |
amrein
Messages: 278 Registered: August 2008 Location: France
|
Experienced Member |
|
|
Example on Fedora:
$ lsb_release -sir
Fedora 31
$ rpm -q --whatrequires pkg-config
no package requires pkg-config
$ rpm -qa | grep devel | wc -l
114
So on a full Fedora installation with all U++ dependencies installed and much more... not a single package requires pkg-config.
So no, you need to manually install pkg-config on most POSIX OS. It's not more complicated than installing other U++ build dependencies.
[Updated on: Tue, 21 January 2020 10:33] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 12:44:59 CEST 2025
Total time taken to generate the page: 0.01388 seconds
|
|
|