Bug 1144 - PV fails to build with clang-7
Summary: PV fails to build with clang-7
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Other (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-25 18:54 CEST by Uwe Hermann
Modified: 2019-06-30 19:16 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2018-03-25 18:54:44 CEST
Using cmake with "-DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7" I get:


[  5%] Building CXX object CMakeFiles/pulseview.dir/main.cpp.o
In file included from [...]/pulseview/main.cpp:25:
In file included from [...]/include/libsigrokcxx/libsigrokcxx.hpp:78:
In file included from /usr/include/glibmm-2.4/glibmm.h:92:
In file included from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:21:
In file included from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:23:
/usr/include/glibmm-2.4/glibmm/variant.h:2132:3: error: use of this statement in a constexpr function is a C++14 extension [-Werror,-Wc++14-extensions]
  (void)arg;
  ^
[  6%] Building CXX object test/CMakeFiles/pulseview-test.dir/__/pv/storesession.cpp.o
In file included from [...]/pulseview/pv/storesession.cpp:22:
In file included from [...]/pulseview/pv/storesession.hpp:32:
/usr/include/glibmm-2.4/glibmm/variant.h:2132:3: error: use of this statement in a constexpr function is a C++14 extension [-Werror,-Wc++14-extensions]
  (void)arg;
  ^
In file included from [...]/pulseview/pv/session.cpp:31:
In file included from [...]/pulseview/pv/session.hpp:38:
In file included from [...]/pulseview/pv/views/viewbase.hpp:32:
In file included from [...]/pulseview/pv/data/signalbase.hpp:36:
In file included from [...]/include/libsigrokcxx/libsigrokcxx.hpp:78:
In file included from /usr/include/glibmm-2.4/glibmm.h:92:
In file included from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:21:
In file included from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:23:
/usr/include/glibmm-2.4/glibmm/variant.h:2132:3: error: use of this statement in a constexpr function is a C++14 extension [-Werror,-Wc++14-extensions]
  (void)arg;
  ^


Looks like this needs fixing in glibmm (or some workaround in PV?), not sure we can do much about it. This will affect more users in the future as clang-7 becomes more widely used.
Comment 2 Uwe Hermann 2019-06-30 19:16:19 CEST
Can't reproduce this anymore with clang 7.0.1 and glibmm 2.58.0, was probably fixed upstream, closing.