! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Compiling source with GCC 5.4.0
Status:
RESOLVED: FIXED
Product:
Xfce4-hardware-monitor-plugin
Component:
General

Comments

Description Martin DiViaio 2017-07-15 20:32:59 CEST
The --std option needs to be added to CPPFLAGS in order for this package to compile with GCC 5.4.0. The option can be set to c++11 or gnu++11. I was able to get the package to compile using c++11.

The error received without the option is:

In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/type_traits:35:0,
                 from /usr/include/sigc++-2.0/sigc++/visit_each.h:22,
                 from /usr/include/sigc++-2.0/sigc++/functors/slot.h:6,
                 from /usr/include/sigc++-2.0/sigc++/signal_base.h:27,
                 from /usr/include/sigc++-2.0/sigc++/signal.h:8,
                 from /usr/include/sigc++-2.0/sigc++/sigc++.h:104,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:50,
                 from /usr/include/glibmm-2.4/glibmm.h:89,
                 from /usr/include/libgnomecanvasmm-2.6/libgnomecanvasmm/pixbuf.h:7,
                 from canvas-view.cpp:24:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/type_traits:35:0,
                 from /usr/include/sigc++-2.0/sigc++/visit_each.h:22,
                 from /usr/include/sigc++-2.0/sigc++/functors/slot.h:6,
                 from /usr/include/sigc++-2.0/sigc++/signal_base.h:27,
                 from /usr/include/sigc++-2.0/sigc++/signal.h:8,
                 from /usr/include/sigc++-2.0/sigc++/sigc++.h:104,
                 from /usr/include/gtkmm-2.4/gtkmm/linkbutton.h:8,
                 from choose-monitor-window.cpp:24:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/type_traits:35:0,
                 from /usr/include/sigc++-2.0/sigc++/visit_each.h:22,
                 from /usr/include/sigc++-2.0/sigc++/functors/slot.h:6,
                 from /usr/include/sigc++-2.0/sigc++/signal_base.h:27,
                 from /usr/include/sigc++-2.0/sigc++/signal.h:8,
                 from /usr/include/sigc++-2.0/sigc++/sigc++.h:104,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:50,
                 from /usr/include/glibmm-2.4/glibmm.h:89,
                 from /usr/include/libgnomecanvasmm-2.6/libgnomecanvasmm/pixbuf.h:7,
                 from column-view.cpp:22:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/type_traits:35:0,
                 from /usr/include/sigc++-2.0/sigc++/visit_each.h:22,
                 from /usr/include/sigc++-2.0/sigc++/functors/slot.h:6,
                 from /usr/include/sigc++-2.0/sigc++/signal_base.h:27,
                 from /usr/include/sigc++-2.0/sigc++/signal.h:8,
                 from /usr/include/sigc++-2.0/sigc++/sigc++.h:104,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:50,
                 from /usr/include/glibmm-2.4/glibmm.h:89,
                 from /usr/include/libgnomecanvasmm-2.6/libgnomecanvasmm/rect.h:7,
                 from bar-view.cpp:24:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^


This is actually the start of a cascade of several thousand errors from the package but adding "--std=c++11" to CPPFLAGS before running ./configure fixes it and the package will compile and install.

Thanks.
Comment 1 OmegaPhil 2017-07-16 20:17:37 CEST
Thanks for the report - that sounds like a pretty old gcc, the project has compiled fine on Debian systems for me for years, perhaps Debian enables this in the background?

For reference the project is much too old for C++11 code, presumably this is a problem with the libraries its building with.

Anyway, I'll see what I can do when I reach this.
Comment 2 OmegaPhil 2017-07-20 22:28:02 CEST
This has now been fixed in git (probably not worth an official release yet) - the flag has been added to AM_CXXFLAGS in the automake system (so requires another automake run to update the build system etc).

Bug #13717

Reported by:
Martin DiViaio
Reported on: 2017-07-15
Last modified on: 2017-07-20

People

Assignee:
OmegaPhil
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information