Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #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: 272
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: 272
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: 272
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: Thu Jun 04 07:32:06 CEST 2020

Total time taken to generate the page: 0.01318 seconds