U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 14 January 2020 09:21
Hi,

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 #52933 is a reply to message #52932] Tue, 14 January 2020 11:51 Go to previous messageGo to next message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
mirek wrote on Tue, 14 January 2020 12:36

...

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


Thanks Mirek! Now it works again. Smile

Best regards,

Tom
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52936 is a reply to message #52930] Wed, 15 January 2020 08:58 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
In my case not only GLCtrl but BEMRosetta compiles and works perfectly.

Could you include a testcase?


Best regards
Iñaki

[Updated on: Wed, 15 January 2020 08:58]

Report message to a moderator

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52937 is a reply to message #52936] Wed, 15 January 2020 10:23 Go to previous messageGo to next message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
Hi Koldo,

It seems (based on the message ID) that you are responding to my message about the GLCtrl issue ( https://www.ultimatepp.org/forums/index.php?t=msg&th=108 94&goto=52930&#msg_52930 ). I do not think it needs any further investigation or testcase as Mirek already solved it. But thank you anyway!

Best regards,

Tom
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52938 is a reply to message #52902] Wed, 15 January 2020 11:38 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
Hi

For linux and BSD, gtk-2.0 is still in umk config (on U++ debian server).

Example: Makefile.in and uMakefile.in files from last snapshot contain "/usr/include/gtk-2.0" and more gtk-2.0 references.
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52940 is a reply to message #52938] Wed, 15 January 2020 17:20 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
While fixing warnings, I have encountered a little problem: It looks like whole trayicon API was deprecated in gtk3, they simply consider the whole thing "not modern".

What should I do here? Remove TrayIcon from U++/gtk3? Ignore warnings? Or perhaps provide X11 based code?

Mirek
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52941 is a reply to message #52940] Wed, 15 January 2020 17:50 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
I would ignore those warnings for now personally.

Some apps use it in other desktop environment (like KDE) while running in background. Music players for instance.
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52942 is a reply to message #52941] Wed, 15 January 2020 18:03 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Some posts about it:
https://www.omgubuntu.co.uk/2017/09/will-you-miss-gnome-lega cy-tray
https://stackoverflow.com/questions/41917903/gtk-3-statusico n-replacement


Best regards
Iñaki
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52943 is a reply to message #52902] Thu, 16 January 2020 11:05 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 826
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
This 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".
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52944 is a reply to message #52943] Thu, 16 January 2020 11:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
mr_ped wrote on Thu, 16 January 2020 11:05
This 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 #52945 is a reply to message #52944] Fri, 17 January 2020 12:25 Go to previous messageGo to next message
pvictor is currently offline  pvictor
Messages: 75
Registered: December 2015
Member
Hello Mirek,

Apps that are compiled now and TheIDE itself have unusual (swapped) location of buttons OK and Cancel in standard dialogs.

In old gtk2 versions in file ChGtk.cpp:
SwapOKCancel_Write(!Qt);

Now there is nothing like this.

Best regards,
Victor
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52946 is a reply to message #52919] Sat, 18 January 2020 00:42 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Sender Ghost wrote on Sun, 12 January 2020 16:58
There is a difference (marked with red rectangle) between OptionBox of TestChStyle and checkbutton of gtk3-widget-factory. The ✔ mark of OptionBox looks more blurry compared to checkbutton.

Checked for 13910 svn revision. The ✔ mark of OptionBox is not blurry as before, but the the size of its background image is smaller, if compare to checkbutton of gtk3-widget-factory.
https://i.postimg.cc/QHCCPJNS/gtk3-widget-factory-and-Test-Ch-Style-marked-r13910.png
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52947 is a reply to message #52946] Sat, 18 January 2020 10:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Sender Ghost wrote on Sat, 18 January 2020 00:42
Sender Ghost wrote on Sun, 12 January 2020 16:58
There is a difference (marked with red rectangle) between OptionBox of TestChStyle and checkbutton of gtk3-widget-factory. The ✔ mark of OptionBox looks more blurry compared to checkbutton.

Checked for 13910 svn revision. The ✔ mark of OptionBox is not blurry as before, but the the size of its background image is smaller, if compare to checkbutton of gtk3-widget-factory.
https://i.postimg.cc/QHCCPJNS/gtk3-widget-factory-and-Test-Ch-Style-marked-r13910.png


Cannot solve this without breaking other things.

Mirek
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52948 is a reply to message #52945] Sat, 18 January 2020 10:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
pvictor wrote on Fri, 17 January 2020 12:25
Hello Mirek,

Apps that are compiled now and TheIDE itself have unusual (swapped) location of buttons OK and Cancel in standard dialogs.

In old gtk2 versions in file ChGtk.cpp:
SwapOKCancel_Write(!Qt);

Now there is nothing like this.

Best regards,
Victor


Thanks, fixed. (I have retained the logic that in KDE it is not swapped).

Mirek
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52950 is a reply to message #52902] Mon, 20 January 2020 14:53 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
I have three issues to report.

1. First, there are still references to gtk-2.0 in several files in svn.
The easier way to find them: 'grep -R --exclude-dir=.svn gtk-2.0 .'

2. Secondly, there is a typo in trunk/uppsrc/CtrlCore/CtrlCore.upp. xdmpc should be xdmcp I guess

3. Thirdly, I would like to understand this new strategy:

Extract of trunk/uppsrc/CtrlCore/CtrlCore.upp:

pkg_config(LINUX | FREEBSD) "freetype2 x11 xinerama xrender xft xdmpc fontconfig xcb xext";

pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify";


So now U++ can be compiled with GTK dependencies only (GTK+libnotify) or GTK+X11 dependencies and we need pkg-config to compile CtrlCore?
"xinerama xrender xft xdmcp fontconfig xcb xext" are now mandatory for GTK+X11?

I need to understand this because current domake script is broken as:

* umk on debian server doesn't use '((INCLUDES))' anymore in ~/.upp/theide/GCCMK.bm
* exported Makefiles use pkg-config when using CtrlCore because of trunk/uppsrc/CtrlCore/CtrlCore.upp recent changes
* U++ won't compile if pkg-config is not there because of missing default includes
* Previously we only needed gtk3 x11 and libnotify

Extract of Makefile.in in new tarball snapshots:

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`

...
		$(OutDir_plugin_bmp)BmpReg.o \
			$(OutDir_plugin_bmp)bmp.a \
			$(OutDir_RichText)RichText.a \
			`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 -Wl,--end-group

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52951 is a reply to message #52950] Mon, 20 January 2020 15:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
I will fix 1 and 2 ASAP.

3: It is work in progress, however the idea is to depend on pkg-config, with basically empty INCLUDE/LIB paths. Do you know about any system that supports gtk-3 or C++11 and does not have pkg-config?

Mirek

[Updated on: Mon, 20 January 2020 15:06]

Report message to a moderator

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52953 is a reply to message #52902] Mon, 20 January 2020 20:51 Go to previous messageGo to next message
amrein is currently offline  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 #52954 is a reply to message #52953] Mon, 20 January 2020 21:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
amrein wrote on Mon, 20 January 2020 20:51
You must install pkg-config manually (using the distro package manager) as it's not installed by default when you install other devel packages.


I do not think this is correct. I believe it really is present always - I mean like "bash level" kind of presence...

Which makes sense, as its infrastructure is precursor to packaging systems....
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52955 is a reply to message #52954] Tue, 21 January 2020 10:32 Go to previous messageGo to next message
amrein is currently offline  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

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52956 is a reply to message #52955] Tue, 21 January 2020 11:07 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1284
Registered: August 2007
Senior Contributor
Hello amrein,

IIRC, Fedora uses the pkgconf package for some time (circa F26?), which in turn uses the pkgconf-pkg-config package to replace pkg-config links.

Can you check that?

Packages list requiring the pkg-conf-pkg-config package is long (see "Required by" section)

https://fedora.pkgs.org/31/fedora-x86_64/pkgconf-pkg-config- 1.6.3-2.fc31.x86_64.rpm.html


Best regards,
Oblivion.


Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52957 is a reply to message #52956] Tue, 21 January 2020 11:59 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
Well, rpm tells that there is no package requiring pkgconf-pkg-config or pkg-config or even pkgconf. But when I try to remove one of them, it gives me a long list of dependencies. Sad

In previous Redhat based distro (a few years ago) I had to install pkg-config manually. This has changed apparently.

edit: Those packages require /usr/bin/pkg-config directly or pkgconfig (pkgconfig is not a package but a virtual dependency). This explain this.

[Updated on: Tue, 21 January 2020 12:04]

Report message to a moderator

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52958 is a reply to message #52902] Tue, 21 January 2020 13:14 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
After some discussion with Mirek, I proposed patch for possible minimal set of pkg-config dependencies in uppsrc/CtrlCore and uppsrc/Draw packages:
https://www.ultimatepp.org/redmine/issues/2007

I tested build on FreeBSD 10.4 (for examples/AddressBook and reference/ConsoleDraw packages, but also for uppsrc/ide, etc.) for GUI and "GUI X11" main package configurations.

Please test for other platforms, if interested.

[Updated on: Wed, 22 January 2020 00:07]

Report message to a moderator

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52960 is a reply to message #52958] Tue, 21 January 2020 22:19 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
Hi Sender Ghost,

If U++ uses GTK3 only, x11 or libnotify are not required.
Previous U++ release required libnotify-devel. x11-devel is installed because GTK3 devel package ask for it.

So if I'm not wrong, this part of the patch is incorrect:

-pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify";
+pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 x11";

and should be replaced by

-pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify";
+pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 libnotify";
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52961 is a reply to message #52960] Wed, 22 January 2020 00:05 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hi, Amrein.

amrein wrote on Tue, 21 January 2020 21:19

If U++ uses GTK3 only, x11 or libnotify are not required.
<..>
So if I'm not wrong, this part of the patch is incorrect:
<..>
and should be replaced by

-pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify";
+pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 libnotify";

If use
pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 libnotify";
or
pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0";
in uppsrc/CtrlCore package to build examples/AddressBook for GUI main package configuration, then there is following linker error:
Linking...
/usr/bin/ld: undefined reference to symbol `XFlush' (try adding -lX11)
//usr/local/lib/libX11.so.6: could not read symbols: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)
The XFlush function is used in GetProperty function in uppsrc/CtrlCore/GtkX11Util.cpp file for GUI_GTK define. This is why !X11 (GTK 3) case requires x11 pkg-config dependency (at least on FreeBSD, where other specified pkg-config dependencies didn't include x11 implicitly).
% ldd -a ./AddressBook | sed 's/ (.*)$// ; s|^/.*/||' | head -27
AddressBook:
	libgtk-3.so.0 => /usr/local/lib/libgtk-3.so.0
	libgdk-3.so.0 => /usr/local/lib/libgdk-3.so.0
	libpangocairo-1.0.so.0 => /usr/local/lib/libpangocairo-1.0.so.0
	libpango-1.0.so.0 => /usr/local/lib/libpango-1.0.so.0
	libatk-1.0.so.0 => /usr/local/lib/libatk-1.0.so.0
	libcairo-gobject.so.2 => /usr/local/lib/libcairo-gobject.so.2
	libcairo.so.2 => /usr/local/lib/libcairo.so.2
	libthr.so.3 => /lib/libthr.so.3
	libgdk_pixbuf-2.0.so.0 => /usr/local/lib/libgdk_pixbuf-2.0.so.0
	libgio-2.0.so.0 => /usr/local/lib/libgio-2.0.so.0
	libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0
	libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0
	libintl.so.8 => /usr/local/lib/libintl.so.8
	libX11.so.6 => /usr/local/lib/libX11.so.6
	libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1
	libfreetype.so.6 => /usr/local/lib/libfreetype.so.6
	libpng16.so.16 => /usr/local/lib/libpng16.so.16
	libz.so.6 => /lib/libz.so.6
	librt.so.1 => /usr/lib/librt.so.1
	libexecinfo.so.1 => /usr/lib/libexecinfo.so.1
	libc++.so.1 => /usr/lib/libc++.so.1
	libcxxrt.so.1 => /lib/libcxxrt.so.1
	libm.so.5 => /lib/libm.so.5
	libgcc_s.so.1 => /lib/libgcc_s.so.1
	libc.so.7 => /lib/libc.so.7
libgtk-3.so.0:
Some example of pkg-config output for libnotify and x11 on FreeBSD 10.4:
% pkg-config -cflags -libs libnotify
-I/usr/local/include -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -pthread -L/usr/local/lib -lnotify -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
% pkg-config -cflags -libs x11
-I/usr/local/include -D_THREAD_SAFE -pthread -L/usr/local/lib -lX11
Edit:
But after build test for reference/TrayIcon package, there was following linker error:
<..>/CtrlLib/CLANG.Gui.Shared/CtrlLib.a(TrayIconGtk.o): In function `Upp::TrayIcon::Message(int, char const*, char const*, int)':
<..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x1b): undefined reference to `notify_is_initted'
<..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x27): undefined reference to `notify_init'
<..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x59): undefined reference to `notify_notification_new'
<..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x6b): undefined reference to `notify_notification_set_timeout'
<..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x77): undefined reference to `notify_notification_show'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
where mentioned functions are used in TrayIcon::Message method in uppsrc/CtrlLib/TrayIconGtk.cpp file.
This may mean, that libnotify package dependency is required for some cases in uppsrc/CtrlLib package.
Possible to add following check for uppsrc/CtrlLib package:
pkg_config(POSIX !X11 (!OSX | OSX11)) libnotify;

Example of ldd output for TrayIcon and AddressBook executables for this case, which library dependencies are the same:
Click to expand

Thanks for your attention.

[Updated on: Wed, 22 January 2020 04:14]

Report message to a moderator

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend [message #52974 is a reply to message #52902] Thu, 23 January 2020 20:28 Go to previous message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
Dependencies issues on BSD fix + finer dependencies fix. So your patch looks Ok in fact LOL.

I will test this further on different distros after your patch been applied + introduction of LDLIBS in Makefile.in and uMakefile.in.

[Updated on: Thu, 23 January 2020 20:29]

Report message to a moderator

Previous Topic: Happy New Year 2020
Next Topic: ide now has multiple Find in files outputs
Goto Forum:
  


Current Time: Sun Oct 04 16:35:01 GMT+2 2026

Total time taken to generate the page: 0.01731 seconds