Re: C++11 flags for jhbuild
- From: Kjell Ahlstedt <kjell ahlstedt bredband net>
- To: Ian Martin <martin_id vodafone co nz>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: C++11 flags for jhbuild
- Date: Mon, 20 Jul 2015 10:16:29 +0200
On 2015-07-20 02:21, Ian Martin wrote:
On 20/07/15 01:45, Murray Cumming wrote:
On Sun, 2015-07-19 at 15:44 +0200, Murray Cumming wrote:
On Sun, 2015-07-19 at 23:09 +1200, Ian Martin wrote:
Hi,
I'm trying to build gtkmm with jhbuild. glibmm fails with a number of
warnings and errors starting with
warning: identifier 'decltype' is a keyword in C++11 [-Wc++0x-compat]
/opt/gnome/include/sigc++-2.0/sigc++/functors/functor_trait.h:91:3:
warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]
/opt/gnome/include/sigc++-2.0/sigc++/functors/functor_trait.h:91:36:
error: 'decltype' has not been declared
/opt/gnome/include/sigc++-2.0/sigc++/functors/functor_trait.h:96:44:
error: 'nullptr' was not declared in this scope
= sizeof(check(static_cast<T_functor*>(nullptr))) ==
sizeof(int)
I'm guessing this means I need to enable C++11 within jhbuild. Do
I do
this in my .jhbuildrc or should this be a compiler flag added
within the
glibmm configure.ac?
This seems to be a -Wc++0x-compat warning. Do you have that in your
jhbuild config file somehow?
Or maybe you just need to run autogen.sh again.
Excluding comments, my .jhbuildrc contains the following:
modulesets_dir = '/usr/share/jhbuild/modulesets'
modules = [ 'gtkmm', 'cairomm' ]
checkoutroot = '/data/checkout/gnome-source/'
prefix = '/opt/gnome'
and rerunning ./autogen.sh gives the same errors.
I've tried adding
autogenargs='-std=c++11'
to jhbuildrc, but that blocked glib building with "unknown compiler
flag -std=c++11 ".
I'm running Debian testing, and use C++11 in other projects without
any problem, so I assume my build chain is set up OK.
This seems to be a -Wc++0x-compat warning. Do you have that in your
jhbuild config file somehow?
The warnings confirm this: one is
/opt/gnome/include/sigc++-2.0/sigc++/signal.h:257:7: warning: 'auto'
changes meaning in C++11; please remove it [-Wc++0x-compat]
auto tmp_ = end();
I haven't added it myself.
Update: can build glibmm by adding
MM_AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
to configure.ac
When you said that you build gtkmm with jhbuild, the people that have
replied to your first post probably assumed (like myself) that you have
let jhbuild pull all relevant modules from the master branch in the git
repository very recently.
MM_AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) was added to several
configure.ac files about a week ago.
I'm no autotools genius, but it looks to me like sigc++ is now
dependent on c++11, which is going to create dependencies for all
downstream projects. If I'm correct, do you want me to create the bug
report and patches?
I don't think it's necessary. If you just get the latest versions of
gtkmm and all modules it depends on, it should work. One exception
though: if you use --enable-warnings=fatal on gtkmm, it does not work
right now because of very recent deprecations in gtk+. That will soon be
fixed even without a bug report.
Ian.
Ian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]