After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758545 - gparted-0.24.0 fails to build with gnome 3.18 mm packages
gparted-0.24.0 fails to build with gnome 3.18 mm packages
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.24.0
Other Linux
: Normal normal
: ---
Assigned To: Mike Fleetwood
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2015-11-23 14:57 UTC by Pacho Ramos
Modified: 2016-04-26 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
full build.log.bz2 (67.61 KB, application/x-bzip)
2015-11-23 14:57 UTC, Pacho Ramos
  Details
Enable C++11 compilation when using libsigc++ 2.5.1 and later (v1) (2.34 KB, patch)
2016-03-26 14:08 UTC, Mike Fleetwood
none Details | Review

Description Pacho Ramos 2015-11-23 14:57:15 UTC
Created attachment 316098 [details]
full build.log.bz2

With 3.18 cycle, the gnome mm stack started to request -std=c++11 to be used, then, probably it should be appended to cxxflags then

Thanks

/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
Comment 1 Curtis Gedak 2015-11-23 16:23:09 UTC
Thank you Pacho for your interest in GParted.

Currently GParted uses the gtkmm/glibmm 2.x libraries and has not been re-written to use gtkmm/glibmm 3.x.

Having said that, recent versions of 2.x libraries have also been set to use c++11 by default.

An enhancement was made to GParted 0.24.0 to handle C++11.  See:
Bug 756035 - GParted does not compile with newer gtkmm libraries in Fedora 23

This resulted in the following commit:

Enable C++11 compilation when using glibmm 2.45.40 and later (#756035)
https://git.gnome.org/browse/gparted/commit/?id=d6d7cb2bbf2fc381b890f63bbbf626eacfc8cdf8

From your build.log I see the following line:

...
checking for glibmm >= 2.45.40 which requires C++11 compilation... no
...

So it appears that your installation does not yet have glibmm >= 2.45.40.  In this case you would need to manually set the need to use C++11.

I believe this can be controlled by using:
CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=1

Does that help?

Curtis
Comment 2 Mike Fleetwood 2015-11-24 13:36:55 UTC
I've updated the bug summary from gnome 3.8 to gnome 3.18.


GNOME 3.18.0 includes these relevant packages:
glibmm 2.46.1
libsigc++ 2.6.0
https://www.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/core/3.18/3.18.0/NEWS

From the build.log I see the compiler is failing on libsigc++ files.
libsigc++ >= 2.5.1 also requires C++11 compilation.
https://git.gnome.org/browse/libsigc++2/commit/?id=4efb854bb4d0009f3d8d6ae2cf40a6186de90901

Question: What glibmm version is in your build environment?

Given the build.log contains this:
  checking for glibmm >= 2.45.40 which requires C++11 compilation... no
What version of glibmm do you have in your build environment?
Trying to work out if the autoconf check is not working correctly in
your build environment or whether you don't have the right version of
glibmm.


We might have to update how we determine whether C++11 compilation is
needed since libsigc++ also requires it for version 2.5.1 and later.
Initial thoughts are:
1) Autoconf check for libsigc++ >= 2.5.1 to enable and require C++11
   compilation;
2) Autoconf test AX_CXX_COMPILE_STDCXX_11(, optional) which I think
   always enable C++11 when enable, but does't fail configuration if not
   available; or
3) Autoconf check which builds a test which needs glibmm and libsigc++
   without C++11 and with C+11 and enables only if required.


Thanks,
Mike
Comment 3 Pacho Ramos 2015-12-01 21:11:33 UTC
Yeah, it looks to work now. I will ask to the other one hitting it downstream, maybe we had some mixed setup while getting the issue
Comment 4 Mike Fleetwood 2016-03-26 14:08:50 UTC
Created attachment 324795 [details] [review]
Enable C++11 compilation when using libsigc++ 2.5.1 and later (v1)

Hi Curtis,

I decided that we should update configure.ac as there is a hard
dependancy for libsigc++ >= 2.5.1 to be compiled using a C++11 compiler
which is so far indirectly expressed via the packages included in a
GNOME release and to the version of gtkmm.  Chose option (1) from
comment 2 above:
   Autoconf check for libsigc++ >= 2.5.1 to enable and require C++11
   compilation

Patch attached.

Successfully compiled on:
Distro                Needs C++11 compilation
-------------------   -----------------------
CentOS 5              No
CentOS 6              No
CentOS 7              No
Fedora 22             No
Fedora 23             Yes
Fedora Rawhide (25)   Yes

Thanks,
Mike
Comment 5 Curtis Gedak 2016-03-28 17:39:39 UTC
Hi Mike,

Your updated patch looks good to me.

Using the patch from comment #4 I successfully compiled on:

  debian    8
  kubuntu  12.04
  openSUSE 12.3
  openSUSE 13.2
  ubuntu   15.10

The patch in comment #4 has been committed to the git repository.

The relevant git commit can be viewed at the following link:

Enable C++11 compilation when using libsigc++ 2.5.1 and later (#758545)
https://git.gnome.org/browse/gparted/commit/?id=707bae6fd6783e84600c6143f0f4bfd7989f56f

Curtis
Comment 6 Curtis Gedak 2016-04-26 15:56:33 UTC
This enhancement was included in the GParted 0.26.0 release on April 26, 2016.