GNOME Bugzilla – Bug 756035
GParted does not compile with newer gtkmm libraries in Fedora 23
Last modified: 2016-02-17 13:40:13 UTC
Found these issues preventing GParted compiling with the latest gtkmm libraries as found in the latest Fedora 23 Beta. 1) glibmm24 version 2.46 uses C++11 features and therefore requires apps using it to be compiled enabling the C++11 features. GParted build doesn't enable this. 2) libsigc++2 version 2.6.1 removed used header file <sigc++/class_slot.h>. I have also looked at how the Fedora Project managed to build their gparted package (gparted-0.23.0-3.fc23) recently (2015-09-19) for Fedora 23 [1]. They were using older versions of those packages in their build environment [2]. glibmm24-devel-2.45.3-1.fc23 and libsigc++20-2.4.1-3.fc23, both before changes causing the issues. [1] Information for build gparted-0.23.0-3.fc23 http://koji.fedoraproject.org/koji/buildinfo?buildID=686233 [2] build root log for gparted-0.23.0-3.fc23 on x86_64 https://kojipkgs.fedoraproject.org//packages/gparted/0.23.0/3.fc23/data/logs/x86_64/root.log
Created attachment 312643 [details] [review] Make GParted compile with newer gtkmm libs on Fedora 23 (v1) Hi Curtis, Here's the patchset to fix these issues compiling GParted with the latest libraries as found on Fedora 23. Further to issue 2 - removal of header <sigc++/class_slot.h> ... The gtkmm demo program doesn't directly include <sigc++/*slot.h>, although it does use "sigc::slot<T>", as GParted does. https://git.gnome.org/browse/gtkmm/tree/demos/gtk-demo/demos.h#n6 https://git.gnome.org/browse/gtkmm/tree/demos/gtk-demo/demowindow.h#n21 Looking at the GParted code: * GParted_Core.cc: uses sigc::slot<void>() * Utils.cc: uses sigc::slot<void>() Both #include <gtkmm/main.h> which includes this chain: #include <sigc++/sigc++.h> #include <sigc++/signal.h> #include <sigc++/functors/slot.h> This header file also defines sigc::slot<T> template. Ran these commands on the following distros: make dist make distcheck tar xf gparted-0.23.0-git.tar.bz2 cd gparted-0.23.0-git ./configure make Distro Autoconf Archive installed ------------------ -------------------------- CentOS 5 No (Not available) CentOS 6 No (Not available) CentOS 7 No (Available but not installed) Debian 6 No (Not installed. Available but too old to include macro AX_CXX_COMPILE_STDCXX_11). Debian 8 Yes (Manually installed). Ubuntu 14.04 LTS Yes (Manually installed) Fedora 22 [1] Yes (Required by packages: gnome-common, libtool, etc.) Fedora 23 Beta [1] Yes (Required by packages: gnome-common, libtool, etc.) Success with the following caveats: [1] make dist and following build worked. make distcheck failed reporting sub/gparted.desktop.in contained translatable text but was not in either POTFILES.in or POTFILES.skip. Not sure where it's getting the "sub/" directory from. POTFILES.skip does contain gparted.desktop.in POTFILES.in does contain gparted.desktop.in.in Thanks, Mike
Hi Mike, Thank you for identifying this problem early, researching solutions and providing relevant links to learn more about the problem. This made it easier for me to review and test the patch set. Using patch set v1 from comment #1 I successfully tested the following commands: ./configure && make make distcheck on the following distros: Debian 7 Fedora 21 kubuntu 12.04 LTS ubuntu 15.10 beta2 openSUSE 13.1 openSUSE 13.2 All looks good to me. As such patch set v1 from comment #1 has been committed to the git repository for inclusion in the next release of GParted. The relevant git commits can be viewed at the following links: Include local copy of Autoconf Archive macro AX_CXX_COMPILE_STDCXX_11 (#756035) https://git.gnome.org/browse/gparted/commit/?id=f97cac9ab459bd2c2b8cd1098f7683a5ec137c50 Enable C++11 compilation when using glibmm 2.45.40 and later (#756035) https://git.gnome.org/browse/gparted/commit/?id=d6d7cb2bbf2fc381b890f63bbbf626eacfc8cdf8 Stop including removed <sigc++/class_slot.h> header (#756035) https://git.gnome.org/browse/gparted/commit/?id=d925bd2bb592160bd9b760c200fbeb7c9d24b2a1 Curtis
This enhancement was included in the GParted 0.24.0 release on October 27, 2015.
The added C++11 configure tests are too late to help the Gtk::Window::set_default_icon_name compile-and-link test, which therefore reports a false negative in Fedora 23. (Fedora 24 is using GCC 6, which defaults to gnu++14, which "fixes" the test.) If that test really can't be made into a simple PKG_CHECK_EXISTS check, then the tests need to be reordered accordingly.
Thank you Yaakov, I've opened a new bug report to track the fault you have found with this fix. Bug 762184 - Autoconf check for C++11 comes after compile test for Gtk::Window::set_default_icon_name() Mike