octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61642] Flags to enable C++11 are not correctl


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #61642] Flags to enable C++11 are not correctly detected for all compilers
Date: Wed, 8 Dec 2021 10:31:00 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36 Edg/96.0.1054.43

URL:
  <https://savannah.gnu.org/bugs/?61642>

                 Summary: Flags to enable C++11 are not correctly detected for
all compilers
                 Project: GNU Octave
            Submitted by: mmuetzel
            Submitted on: Wed 08 Dec 2021 04:30:58 PM CET
                Category: Configuration and Build System
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Build Failure
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 7.0.90
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

We currently use the gnulib module "std-gnu11" to detect the compiler flags to
enable C++11 features.
Apparently that doesn't work correctly with Apple clang. That module claims
that no switches are needed for C++11. But the compilation fails later-on.

I worked around this on the GitHub runners by manually adding `-std=c++11` to
the CXXFLAGS. That allowed to build Octave on that platform.
However, I forgot to set CXXCPP. That causes some configure tests to fail that
would otherwise succeed (and maybe also the other way round?).
In the end, we were building incorrectly configured versions of Octave without
noticing.

That shouldn't have happened. But imho that is an easy mistake to make. It
would be better if the configure script would automatically detect the correct
flags to activate C++11 features for more compilers.

There is the autoconf macro AX_CXX_COMPILE_STDCXX that we could use instead:
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html

In first tests on the GitHub runners, it looks like it detects the correct
flags also for Apple clang.

I'll add a patch here when I come around to preparing a changeset.

Would it still be ok to change that for Octave 7?





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61642>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]