Skip to content

Enable C++17 language features to satisfy libsigc++ requirements - #122

Closed
amotl wants to merge 1 commit into
sigrokproject:masterfrom
daq-tools:c++17
Closed

Enable C++17 language features to satisfy libsigc++ requirements#122
amotl wants to merge 1 commit into
sigrokproject:masterfrom
daq-tools:c++17

Conversation

@amotl

@amotl amotl commented Feb 21, 2021

Copy link
Copy Markdown

Dear Uwe, Bert, Gerhard and all other contributors,

first things first: Thanks a stack for conceiving and maintaining libsigrok.

While working on sigrokproject/sigrok-meter#1, when trying to build on macOS Catalina with recent compilers (GCC 10.2.0) and libraries (libsigc++ 3.0.6) installed through Homebrew, the process croaked with error: 'invoke' is not a member of 'std'.

It turned out that libsigc++ is telling us [1]:

Compatible compilers must support C++17, such as the decltype(auto) specifier (from C++14) and std::invoke().

So, this brings in C++17 support by updating the ax_cxx_compile_stdcxx.m4 macro to the most recent version from [2] and by adjusting some bits in configure.ac. Please bear with me when I might have done something wrong, as C/C++ is not my native habitat. However, with those changes, GCC stopped croaking on my end.

With kind regards,
Andreas.

P.S.: Others reading here also aiming at building on a recent macOS, please also note #123.

[1] https://github.com/libsigcplusplus/libsigcplusplus#compatibility
[2] http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx.m4

When trying to build on macOS Catalina with recent compilers
(GCC 10.2.0) and libraries (libsigc++ 3.0.6) installed through Homebrew,
the process croaked with "error: 'invoke' is not a member of 'std'".

It turned out that libsigc++ is telling us [1]:

> Compatible compilers must support C++17, such as the decltype(auto)
> specifier (from C++14) and std::invoke().

[1] https://github.com/libsigcplusplus/libsigcplusplus#compatibility
@depili

depili commented Nov 5, 2022

Copy link
Copy Markdown

This might break the compilation on other hosts that don't have C++17, but have C++11.

@depili

depili commented Nov 27, 2022

Copy link
Copy Markdown

This has now been implemented in cbcc060

Could help if you closed the PR

@amotl

amotl commented Nov 27, 2022

Copy link
Copy Markdown
Author

Dear @depili and @gsigh,

thanks a stack!

With kind regards,
Andreas.

@amotl amotl closed this Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants