How to build Octave on macOS from scratch?

GitHub allows to run CI tests on macOS Big Sur 11.0 and macOS Catalina 10.15.
I’d like to set up a GitHub action that builds Octave on those runners.

IIUC, they come with pre-installed homebrew.

Are there any instructions somewhere for which packages need to be installed on macOS and how to correctly configure Octave to compile on macOS?

Since homebrew seems to install all gnu tools into /usr/local, I would start by
setting PATH=/usr/local/bin:$PATH and then just do the usual linux recipes.
And go from there… You may want to specify --with-blas=openblas so it
will not pickup Apple’s blas library.

The bootstrap script and configure are completing now.
For configure, I see this is in the log:

checking for clang++ option to enable C++11 features... none needed

But still, compilation fails with this error:

libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I.. -Iliboctave -I../liboctave -I../liboctave/array -Iliboctave/numeric -I../liboctave/numeric -Iliboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I../libinterp/octave-value -Ilibinterp -I../libinterp -I../libinterp/operators -Ilibinterp/parse-tree -I../libinterp/parse-tree -Ilibinterp/corefcn -I../libinterp/corefcn -I../liboctave/wrappers -I/usr/local/Cellar/graphicsmagick/1.3.36/include/GraphicsMagick -I/opt/X11/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openssl/include -I/usr/local/opt/qt@5/include -I/usr/local/opt/readline/include -I/usr/local/opt/sqlite/include -fPIC -D_THREAD_SAFE -pthread -Wall -W -Wshadow -Woverloaded-virtual -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -fvisibility=hidden -g -O2 -MT libinterp/dldfcn/__delaunayn___la-__delaunayn__.lo -MD -MP -MF libinterp/dldfcn/.deps/__delaunayn___la-__delaunayn__.Tpo -c ../libinterp/dldfcn/__delaunayn__.cc  -fno-common -DPIC -o libinterp/dldfcn/.libs/__delaunayn___la-__delaunayn__.o
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:38:
In file included from ../liboctave/array/dim-vector.h:40:
../liboctave/util/oct-refcount.h:48:34: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    refcount (const refcount&) = delete;
                                 ^
../liboctave/util/oct-refcount.h:50:46: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    refcount& operator = (const refcount&) = delete;
                                             ^
../liboctave/util/oct-refcount.h:52:24: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    ~refcount (void) = default;
                       ^
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:38:
../liboctave/array/dim-vector.h:215:21: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <typename... Ints>
                    ^
../liboctave/array/dim-vector.h:276:25: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  dim_vector (dim_vector&& dv) : rep (dv.rep) { dv.rep = nullptr; }
                        ^
../liboctave/array/dim-vector.h:300:37: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  dim_vector& operator = (dim_vector&& dv)
                                    ^
../liboctave/array/dim-vector.h:219:10: error: no member named 'initializer_list' in namespace 'std'
    std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
    ~~~~~^
../liboctave/array/dim-vector.h:219:27: error: unexpected type name 'octave_idx_type': expected expression
    std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
                          ^
../liboctave/array/dim-vector.h:219:44: error: use of undeclared identifier 'all_lengths'
    std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
                                           ^
../liboctave/array/dim-vector.h:219:58: error: expected expression
    std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...};
                                                         ^
../liboctave/array/dim-vector.h:220:33: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
    for (const octave_idx_type l: all_lengths)
                                ^
../liboctave/array/dim-vector.h:220:35: error: use of undeclared identifier 'all_lengths'
    for (const octave_idx_type l: all_lengths)
                                  ^
../liboctave/array/dim-vector.h:222:12: error: use of undeclared identifier 'all_lengths'
    rep -= all_lengths.size ();
           ^
../liboctave/array/dim-vector.h:216:37: warning: unused parameter 'r' [-Wunused-parameter]
  dim_vector (const octave_idx_type r, const octave_idx_type c,
                                    ^
../liboctave/array/dim-vector.h:216:62: warning: unused parameter 'c' [-Wunused-parameter]
  dim_vector (const octave_idx_type r, const octave_idx_type c,
                                                             ^
../liboctave/array/dim-vector.h:217:23: warning: unused parameter 'lengths' [-Wunused-parameter]
              Ints... lengths) : rep (newrep (2 + sizeof... (Ints)))
                      ^
../liboctave/array/dim-vector.h:369:25: error: expected expression
                        [] (octave_idx_type dim) { return dim == 0; });
                        ^
../liboctave/array/dim-vector.h:385:25: error: expected expression
                        [] (octave_idx_type dim) { return dim == 0; });
                        ^
../liboctave/array/dim-vector.h:426:25: error: expected expression
                        [] (octave_idx_type dim) { return dim < 0; });
                        ^
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:39:
../liboctave/array/idx-vector.h:88:42: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_base_rep (const idx_base_rep&) = delete;
                                         ^
../liboctave/array/idx-vector.h:90:54: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_base_rep& operator = (const idx_base_rep&) = delete;
                                                     ^
../liboctave/array/idx-vector.h:92:36: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    virtual ~idx_base_rep (void) = default;
                                   ^
../liboctave/array/idx-vector.h:135:28: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_colon_rep (void) = default;
                           ^
../liboctave/array/idx-vector.h:141:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_colon_rep (const idx_colon_rep& idx) = delete;
                                               ^
../liboctave/array/idx-vector.h:143:60: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_colon_rep& operator = (const idx_colon_rep& idx) = delete;
                                                           ^
../liboctave/array/idx-vector.h:173:28: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_range_rep (void) = delete;
                           ^
../liboctave/array/idx-vector.h:187:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_range_rep (const idx_range_rep& idx) = delete;
                                               ^
../liboctave/array/idx-vector.h:189:60: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_range_rep& operator = (const idx_range_rep& idx) = delete;
                                                           ^
../liboctave/array/idx-vector.h:236:29: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_scalar_rep (void) = delete;
                            ^
../liboctave/array/idx-vector.h:243:50: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_scalar_rep (const idx_scalar_rep& idx) = delete;
                                                 ^
../liboctave/array/idx-vector.h:245:62: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_scalar_rep& operator = (const idx_scalar_rep& idx) = delete;
                                                             ^
../liboctave/array/idx-vector.h:320:50: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_vector_rep (const idx_vector_rep& idx) = delete;
                                                 ^
../liboctave/array/idx-vector.h:322:62: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_vector_rep& operator = (const idx_vector_rep& idx) = delete;
                                                             ^
../liboctave/array/idx-vector.h:324:5: error: exception specification of overriding function is more lax than base version
    ~idx_vector_rep (void);
    ^
../liboctave/array/idx-vector.h:92:13: note: overridden virtual function is here
    virtual ~idx_base_rep (void) = default;
            ^
../liboctave/array/idx-vector.h:374:27: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_mask_rep (void) = delete;
                          ^
../liboctave/array/idx-vector.h:389:46: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_mask_rep (const idx_mask_rep& idx) = delete;
                                             ^
../liboctave/array/idx-vector.h:391:58: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    idx_mask_rep& operator = (const idx_mask_rep& idx) = delete;
                                                         ^
../liboctave/array/idx-vector.h:393:5: error: exception specification of overriding function is more lax than base version
    ~idx_mask_rep (void);
    ^
../liboctave/array/idx-vector.h:92:13: note: overridden virtual function is here
    virtual ~idx_base_rep (void) = default;
            ^
../liboctave/array/idx-vector.h:524:39: error: a space is required between consecutive right angle brackets (use '> >')
  idx_vector (const Array<octave_int<T>>& nda) : rep (new idx_vector_rep (nda))
                                      ^~
                                      > >
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:41:
../liboctave/util/lo-traits.h:84:40: error: a space is required between consecutive right angle brackets (use '> >')
class is_instance <Template, Template<T>>
                                       ^~
                                       > >
../liboctave/util/lo-traits.h:135:60: error: a space is required between consecutive right angle brackets (use '> >')
class strip_template_param<TemplatedClass, TemplatedClass<T>>
                                                           ^~
                                                           > >
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:42:
In file included from ../liboctave/util/lo-utils.h:38:
../liboctave/util/quit.h:51:25: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    frame_info (void) = default;
                        ^
../liboctave/util/quit.h:59:38: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    frame_info (const frame_info&) = default;
                                     ^
../liboctave/util/quit.h:61:50: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    frame_info& operator = (const frame_info&) = default;
                                                 ^
../liboctave/util/quit.h:63:26: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    ~frame_info (void) = default;
                         ^
../liboctave/util/quit.h:106:56: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    execution_exception (const execution_exception&) = default;
                                                       ^
../liboctave/util/quit.h:108:68: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    execution_exception& operator = (const execution_exception&) = default;
                                                                   ^
../liboctave/util/quit.h:110:5: error: exception specification of overriding function is more lax than base version
    ~execution_exception (void) = default;
    ^
/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdexcept:114:13: note: overridden virtual function is here
    virtual ~runtime_error() _NOEXCEPT;
            ^
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:42:
In file included from ../liboctave/util/lo-utils.h:38:
../liboctave/util/quit.h:110:35: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    ~execution_exception (void) = default;
                                  ^
../liboctave/util/quit.h:136:18: error: exception specification of overriding function is more lax than base version
    const char * what (void) const noexcept { return m_message.c_str (); }
                 ^
/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdexcept:116:25: note: overridden virtual function is here
    virtual const char* what() const _NOEXCEPT;
                        ^
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:42:
In file included from ../liboctave/util/lo-utils.h:38:
../liboctave/util/quit.h:136:35: error: expected ';' at end of declaration list
    const char * what (void) const noexcept { return m_message.c_str (); }
                                  ^
                                  ;
../liboctave/util/quit.h:170:46: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    exit_exception (const exit_exception&) = default;
                                             ^
../liboctave/util/quit.h:172:52: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    exit_exception& operator = (exit_exception&) = default;
                                                   ^
../liboctave/util/quit.h:174:5: error: exception specification of overriding function is more lax than base version
    ~exit_exception (void) = default;
    ^
/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/exception:101:13: note: overridden virtual function is here
    virtual ~exception() _NOEXCEPT;
            ^
In file included from ../libinterp/dldfcn/__delaunayn__.cc:53:
In file included from ../liboctave/array/Array.h:42:
In file included from ../liboctave/util/lo-utils.h:38:
../liboctave/util/quit.h:174:30: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    ~exit_exception (void) = default;
                             ^
../liboctave/util/quit.h:176:18: error: exception specification of overriding function is more lax than base version
    const char * what (void) const noexcept { return "exit exception"; }
                 ^
/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/exception:102:25: note: overridden virtual function is here
    virtual const char* what() const _NOEXCEPT;
                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
37 warnings and 20 errors generated.
make[2]: *** [libinterp/dldfcn/__delaunayn___la-__delaunayn__.lo] Error 1
make[1]: *** [all-recursive] Error 1

I’m not sure why this is happening.

Looking at this: Clang - C++20, C++17, C++14, C++11 and C++98 Status (llvm.org)
The configure result seems to be wrong. IIUC, clang needs -std=c++11.

A “standard” clang (not the Apple’s fork) seems to be doing fine w/o. E.g.:
http://buildbot.octave.org:8010/#/builders/9/builds/2252/steps/5/logs/stdio

In any case you can add it manually into CFLAGS/CXXFLAGS.

FWIW: I cannot compile octave on Fedora 34 with 12-rc clang. I am waiting until the release update to file bugreports…

Dmitri.

Compilation seems to reach further with CXXFLAGS="-O2 -g -std=c++11".

IIRC, there was issues with linking with hidden visibility on Mac. That’ll probably be next.

Can you tell if it is using libc++ or gnu libstdc++ ?

Also, I thought homebrew on Mac provides gcc. Did configure not find it?

Afaict, you’re right. Homebrew provides gcc.
I was starting with the old build rule for @jwe’s buildbots as a base:
https://hg.octave.org/octave-buildbot/file/tip/master.cfg#l543
It was using clang. So I figured, I’d go with that.

We can still add a gcc job if we want to.

I didn’t see it linking yet.

I don’t know how to tell which standard libraries it is using.

The first test results for macOS 10.15 with clang are in:
CI: Add “make check” step for macOS · mmuetzel/octave@09326f5 (github.com)

Summary:

  PASS                            16662
  FAIL                                9
  REGRESSION                          1
  XFAIL (reported bug)               44
  SKIP (missing feature)            152
  SKIP (run-time condition)          71

I haven’t yet looked into it in detail. Some of the fails/regressions might also be due to issues with the configuration or job rules.

On MacOS 11.3 with XCode 12.5 I get :

checking for clang++ option to enable C++11 features
result: -std=gnu++11

The default system compiler is :

$ clang++ --version
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

c.

It does, and it is needed to build Octave because it provides the gfortran compiler.

But I would reccomend against using g++ to compile Octave as most binary dependencies
in homebrew are built with the system clang++

c.

@cdf: I don’t have a Mac to run tests locally. So much of the current github action rules for macOS are guess work and the result of trial-and-error.
The current rules are here:
octave/make.yaml at mmuetzel-CI-github-1 · mmuetzel/octave

Any kind of feedback would be very welcome.

The failures in test are probably due to use of libc++ rather than libstdc++; we have seen it before.
E.g. : GNU Octave - Bugs: bug #55538, logspace BIST tests fail when... [Savannah]

Fwiw, the failing tests with clang:

>>>>> processing /Users/runner/work/octave/octave/.build/libinterp/corefcn/mappers.cc-tst
***** test
 rval = pi/2;
 ival = 1.31695789692481635;
 obs = asin ([2, 2-i*eps, 2+i*eps]);
 exp = [rval - ival*i, rval - ival*i, rval + ival*i];
 assert (obs, exp, 2*eps);
 obs = asin ([-2, -2-i*eps, -2+i*eps]);
 exp = [-rval + ival*i, -rval - ival*i, -rval + ival*i];
 assert (obs, exp, 2*eps);
 assert (asin ([2 0]),  [rval - ival*i, 0], 2*eps);
 assert (asin ([2 0i]), [rval - ival*i, 0], 2*eps);
!!!!! test failed
ASSERT errors for:  assert (obs,exp,2 * eps)

  Location  |  Observed  |  Expected  |  Reason
    (3)      1.5708+1.317i 1.5708+1.317i   Abs err 1.1102e-15 exceeds tol 4.4409e-16 by 7e-16
shared variables   scalar structure containing the fields:

    rt2 = 1.4142
    rt3 = 1.7321


>>>>> processing /Users/runner/work/octave/octave/scripts/general/logspace.m
***** assert (logspace (Inf + 1i, Inf + 1i, 3), repmat (complex (-Inf,Inf), [1, 3]))
!!!!! test failed
ASSERT errors for:  assert (logspace (Inf + 1i, Inf + 1i, 3),repmat (complex (-Inf, Inf), [1, 3]))

  Location  |  Observed  |  Expected  |  Reason
    (1)        Inf+NaNi    -Inf+Infi     'NaN' mismatch
    (2)        Inf+NaNi    -Inf+Infi     'NaN' mismatch
    (3)        Inf+NaNi    -Inf+Infi     'NaN' mismatch
***** assert (logspace (-Inf + 1i, Inf + 1i, 3), [0, NaN + NaN * 1i, complex(-Inf, Inf)])
!!!!! test failed
ASSERT errors for:  assert (logspace (-Inf + 1i, Inf + 1i, 3),[0, NaN + NaN * 1i, complex(-Inf, Inf)])

  Location  |  Observed  |  Expected  |  Reason
    (3)        Inf+NaNi    -Inf+Infi     'NaN' mismatch


>>>>> processing /Users/runner/work/octave/octave/scripts/miscellaneous/memory.m
***** testif ; isunix () || ispc ()
 [user, syst] = memory ();
 assert (user.mem_used_octave > 0);
 assert (user.ram_used_octave <= user.mem_used_octave);
 assert (user.mem_used_octave < syst.SystemMemory.Total);
 assert (user.MemAvailableAllArrays <= syst.SystemMemory.Available);
!!!!! test failed
textscan: invalid stream number = -1


>>>>> processing /Users/runner/work/octave/octave/scripts/plot/util/hgsave.m
***** testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && strcmp ("qt", graphics_toolkit ())) || strcmp ("gnuplot", graphics_toolkit ());
 h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]);
 unwind_protect
   x = 0:0.1:2*pi;
   y1 = sin (x);
   y2 = exp (x - 1);
   ax = plotyy (x,y1, x-1,y2, @plot, @semilogy);
   xlabel ("X");
   ylabel (ax(1), "Axis 1");
   ylabel (ax(2), "Axis 2");
   axes (ax(1));
   text (0.5, 0.5, "Left Axis", ...
         "color", [0 0 1], "horizontalalignment", "center");
   axes (ax(2));
   text (4.5, 80, "Right Axis", ...
         "color", [0 0.5 0], "horizontalalignment", "center");
   ftmp = [tempname() ".ofig"];
   png1 = [tempname() ".png"];
   png2 = [tempname() ".png"];
   unwind_protect
     hgsave (h1, ftmp);
     print (h1, png1);
     [img1, map1, alpha1] = imread (png1);
     h2 = hgload (ftmp);
     print (h2, png2);
     [img2, map2, alpha2] = imread (png2);
   unwind_protect_cleanup
     unlink (ftmp);
     unlink (png1);
     unlink (png2);
   end_unwind_protect
   assert (img1, img2);
   assert (map1, map2);
   assert (alpha1, alpha2);
 unwind_protect_cleanup
   close (h1);
   close (h2);
 end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (img1,img2)

  Location  |  Observed  |  Expected  |  Reason
(58,1097,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1098,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1100,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1101,1)      206          233        Abs err 27 exceeds tol 0 by 3e+01
(58,1102,1)      206          216        Abs err 10 exceeds tol 0 by 1e+01
(58,1103,1)      206          240        Abs err 34 exceeds tol 0 by 3e+01
(58,1104,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1105,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1106,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1107,1)      206          254        Abs err 48 exceeds tol 0 by 5e+01
(58,1108,1)      255          219        Abs err 36 exceeds tol 0 by 4e+01
(58,1109,1)      255          219        Abs err 36 exceeds tol 0 by 4e+01
(58,1113,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1114,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1115,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1118,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1119,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1120,1)      206          246        Abs err 40 exceeds tol 0 by 4e+01
(58,1121,1)      255          216        Abs err 39 exceeds tol 0 by 4e+01
(58,1122,1)      206          253        Abs err 47 exceeds tol 0 by 5e+01
(58,1123,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1124,1)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1127,1)      206          253        Abs err 47 exceeds tol 0 by 5e+01
(58,1128,1)      206          246        Abs err 40 exceeds tol 0 by 4e+01
(58,1097,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1098,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1100,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1101,2)      206          155        Abs err 51 exceeds tol 0 by 5e+01
(58,1102,2)      206           82        Abs err 124 exceeds tol 0 by 1e+02
(58,1103,2)      206          190        Abs err 16 exceeds tol 0 by 2e+01
(58,1104,2)       67          255        Abs err 188 exceeds tol 0 by 2e+02
(58,1105,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1106,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1107,2)      206          252        Abs err 46 exceeds tol 0 by 5e+01
(58,1108,2)      255           94        Abs err 161 exceeds tol 0 by 2e+02
(58,1109,2)      255           97        Abs err 158 exceeds tol 0 by 2e+02
(58,1110,2)      255          254        Abs err 1 exceeds tol 0 by 1
(58,1113,2)       67          255        Abs err 188 exceeds tol 0 by 2e+02
(58,1114,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1115,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1118,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1119,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1120,2)      206          215        Abs err 9 exceeds tol 0 by 9
(58,1121,2)      255           82        Abs err 173 exceeds tol 0 by 2e+02
(58,1122,2)       67          248        Abs err 181 exceeds tol 0 by 2e+02
(58,1123,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1124,2)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1127,2)      206          244        Abs err 38 exceeds tol 0 by 4e+01
(58,1128,2)      206          214        Abs err 8 exceeds tol 0 by 8
(58,1097,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1098,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1100,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1101,3)      206          122        Abs err 84 exceeds tol 0 by 8e+01
(58,1102,3)      206           24        Abs err 182 exceeds tol 0 by 2e+02
(58,1103,3)      206          168        Abs err 38 exceeds tol 0 by 4e+01
(58,1104,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1105,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1106,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1107,3)      206          251        Abs err 45 exceeds tol 0 by 4e+01
(58,1108,3)      255           40        Abs err 215 exceeds tol 0 by 2e+02
(58,1109,3)      255           44        Abs err 211 exceeds tol 0 by 2e+02
(58,1110,3)      255          253        Abs err 2 exceeds tol 0 by 2
(58,1113,3)       67          255        Abs err 188 exceeds tol 0 by 2e+02
(58,1114,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1115,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1118,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1119,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1120,3)      206          202        Abs err 4 exceeds tol 0 by 4
(58,1121,3)      255           24        Abs err 231 exceeds tol 0 by 2e+02
(58,1122,3)       67          245        Abs err 178 exceeds tol 0 by 2e+02
(58,1123,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1124,3)      206          255        Abs err 49 exceeds tol 0 by 5e+01
(58,1127,3)      206          241        Abs err 35 exceeds tol 0 by 4e+01
(58,1128,3)      206          200        Abs err 6 exceeds tol 0 by 6


>>>>> processing /Users/runner/work/octave/octave/test/mex/bug-51725.tst
***** assert (bug_51725 (), [])
!!!!! test failed
'bug_51725' undefined near line 2, column 2
***** error <element number 2 undefined in return list> [x,y,z] = bug_51725 ();
!!!!! error failed.
Expected <element number 2 undefined in return list>, but got <'bug_51725' undefined near line 2, column 2>

>>>>> processing /Users/runner/work/octave/octave/test/mex/bug-54096.tst
***** test
 s = bug_54096 ();
 assert (s, struct ("field", []));
 assert (s.field, []);
!!!!! test failed
'bug_54096' undefined near line 3, column 3
>>>>> processing /Users/runner/work/octave/octave/test/mex/mexnumtst.tst
***** test
 s = rand (3, 4, "single");
 sc = s + i * rand (3, 4, "single");
 d = rand (3, 4, "double");
 dc = d + i * rand (3, 4, "double");

 [sx, scx, dx, dcx] = mexnumtst (s, sc, d, dc);
 assert (s, sx)
 assert (sc, scx)
 assert (d, dx)
 assert (dc, dcx)
!!!!! test failed
'mexnumtst' undefined near line 8, column 8


>>>>> processing /Users/runner/work/octave/octave/scripts/specfun/expint.m
***** test <*47738>
 assert (expint (10i), 0.0454564330044554 + 0.0875512674239774i, -4*eps);
!!!!! regression: https://octave.org/testfailure/?47738
ASSERT errors for:  assert (expint (10i),0.0454564330044554 + 0.0875512674239774i,-4 * eps)

  Location  |  Observed  |  Expected  |  Reason
     ()      0.045456+0.087551i 0.045456+0.087551i   Rel err 9.1442e-16 exceeds tol 8.8818e-16 by 3e-17

I’m not sure if all of those are due to the different standard library implementations.

Not all of them.
The logspace bug is GNU Octave - Bugs: bug #55538, logspace BIST tests fail when... [Savannah]

The precision failures probably due to compiler. And I think those are quite small and the tol perhaps could be just relaxed a little.

Test results with a gcc runnner on macOS 10.15:

Summary:

  PASS                            16662
  FAIL                                9
  REGRESSION                          1
  XFAIL (reported bug)               44
  SKIP (missing feature)            152
  SKIP (run-time condition)          71

The failing tests:

>>>>> processing /Users/runner/work/octave/octave/.build/libinterp/corefcn/mappers.cc-tst
***** test
 rval = pi/2;
 ival = 1.31695789692481635;
 obs = asin ([2, 2-i*eps, 2+i*eps]);
 exp = [rval - ival*i, rval - ival*i, rval + ival*i];
 assert (obs, exp, 2*eps);
 obs = asin ([-2, -2-i*eps, -2+i*eps]);
 exp = [-rval + ival*i, -rval - ival*i, -rval + ival*i];
 assert (obs, exp, 2*eps);
 assert (asin ([2 0]),  [rval - ival*i, 0], 2*eps);
 assert (asin ([2 0i]), [rval - ival*i, 0], 2*eps);
!!!!! test failed
ASSERT errors for:  assert (obs,exp,2 * eps)

  Location  |  Observed  |  Expected  |  Reason
    (3)      1.5708+1.317i 1.5708+1.317i   Abs err 1.1102e-15 exceeds tol 4.4409e-16 by 7e-16
shared variables   scalar structure containing the fields:

    rt2 = 1.4142
    rt3 = 1.7321


>>>>> processing /Users/runner/work/octave/octave/scripts/general/logspace.m
***** assert (logspace (Inf + 1i, Inf + 1i, 3), repmat (complex (-Inf,Inf), [1, 3]))
!!!!! test failed
ASSERT errors for:  assert (logspace (Inf + 1i, Inf + 1i, 3),repmat (complex (-Inf, Inf), [1, 3]))

  Location  |  Observed  |  Expected  |  Reason
    (1)        Inf+NaNi    -Inf+Infi     'NaN' mismatch
    (2)        Inf+NaNi    -Inf+Infi     'NaN' mismatch
    (3)        Inf+NaNi    -Inf+Infi     'NaN' mismatch
***** assert (logspace (-Inf + 1i, Inf + 1i, 3), [0, NaN + NaN * 1i, complex(-Inf, Inf)])
!!!!! test failed
ASSERT errors for:  assert (logspace (-Inf + 1i, Inf + 1i, 3),[0, NaN + NaN * 1i, complex(-Inf, Inf)])

  Location  |  Observed  |  Expected  |  Reason
    (3)        Inf+NaNi    -Inf+Infi     'NaN' mismatch


>>>>> processing /Users/runner/work/octave/octave/scripts/miscellaneous/memory.m
***** testif ; isunix () || ispc ()
 [user, syst] = memory ();
 assert (user.mem_used_octave > 0);
 assert (user.ram_used_octave <= user.mem_used_octave);
 assert (user.mem_used_octave < syst.SystemMemory.Total);
 assert (user.MemAvailableAllArrays <= syst.SystemMemory.Available);
!!!!! test failed
textscan: invalid stream number = -1


>>>>> processing /Users/runner/work/octave/octave/scripts/plot/util/hgsave.m
***** testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && strcmp ("qt", graphics_toolkit ())) || strcmp ("gnuplot", graphics_toolkit ());
 h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]);
 unwind_protect
   x = 0:0.1:2*pi;
   y1 = sin (x);
   y2 = exp (x - 1);
   ax = plotyy (x,y1, x-1,y2, @plot, @semilogy);
   xlabel ("X");
   ylabel (ax(1), "Axis 1");
   ylabel (ax(2), "Axis 2");
   axes (ax(1));
   text (0.5, 0.5, "Left Axis", ...
         "color", [0 0 1], "horizontalalignment", "center");
   axes (ax(2));
   text (4.5, 80, "Right Axis", ...
         "color", [0 0.5 0], "horizontalalignment", "center");
   ftmp = [tempname() ".ofig"];
   png1 = [tempname() ".png"];
   png2 = [tempname() ".png"];
   unwind_protect
     hgsave (h1, ftmp);
     print (h1, png1);
     [img1, map1, alpha1] = imread (png1);
     h2 = hgload (ftmp);
     print (h2, png2);
     [img2, map2, alpha2] = imread (png2);
   unwind_protect_cleanup
     unlink (ftmp);
     unlink (png1);
     unlink (png2);
   end_unwind_protect
   assert (img1, img2);
   assert (map1, map2);
   assert (alpha1, alpha2);
 unwind_protect_cleanup
   close (h1);
   close (h2);
 end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (img1,img2)

  Location  |  Observed  |  Expected  |  Reason
(58,1122,1)      255          251        Abs err 4 exceeds tol 0 by 4
(58,1123,1)      255          231        Abs err 24 exceeds tol 0 by 2e+01
(58,1124,1)      255          216        Abs err 39 exceeds tol 0 by 4e+01
(58,1125,1)      255          253        Abs err 2 exceeds tol 0 by 2
(58,1105,2)      214          255        Abs err 41 exceeds tol 0 by 4e+01
(58,1106,2)       0           255        Abs err 255 exceeds tol 0 by 3e+02
(58,1107,2)       25          255        Abs err 230 exceeds tol 0 by 2e+02
(58,1108,2)      252          255        Abs err 3 exceeds tol 0 by 3
(58,1115,2)      218          255        Abs err 37 exceeds tol 0 by 4e+01
(58,1116,2)       0           255        Abs err 255 exceeds tol 0 by 3e+02
(58,1117,2)       9           255        Abs err 246 exceeds tol 0 by 2e+02
(58,1118,2)      242          255        Abs err 13 exceeds tol 0 by 1e+01
(58,1119,2)      253          255        Abs err 2 exceeds tol 0 by 2
(58,1120,2)       62          255        Abs err 193 exceeds tol 0 by 2e+02
(58,1121,2)       5           255        Abs err 250 exceeds tol 0 by 2e+02
(58,1122,2)      209          239        Abs err 30 exceeds tol 0 by 3e+01
(58,1123,2)      255          149        Abs err 106 exceeds tol 0 by 1e+02
(58,1124,2)      255           82        Abs err 173 exceeds tol 0 by 2e+02
(58,1125,2)      180          248        Abs err 68 exceeds tol 0 by 7e+01
(58,1126,2)       0           255        Abs err 255 exceeds tol 0 by 3e+02
(58,1127,2)       76          255        Abs err 179 exceeds tol 0 by 2e+02
(58,1105,3)      214          255        Abs err 41 exceeds tol 0 by 4e+01
(58,1106,3)       0           255        Abs err 255 exceeds tol 0 by 3e+02
(58,1107,3)       25          255        Abs err 230 exceeds tol 0 by 2e+02
(58,1108,3)      252          255        Abs err 3 exceeds tol 0 by 3
(58,1115,3)      218          255        Abs err 37 exceeds tol 0 by 4e+01
(58,1116,3)       0           255        Abs err 255 exceeds tol 0 by 3e+02
(58,1117,3)       9           255        Abs err 246 exceeds tol 0 by 2e+02
(58,1118,3)      242          255        Abs err 13 exceeds tol 0 by 1e+01
(58,1119,3)      253          255        Abs err 2 exceeds tol 0 by 2
(58,1120,3)       62          255        Abs err 193 exceeds tol 0 by 2e+02
(58,1121,3)       5           255        Abs err 250 exceeds tol 0 by 2e+02
(58,1122,3)      209          233        Abs err 24 exceeds tol 0 by 2e+01
(58,1123,3)      255          114        Abs err 141 exceeds tol 0 by 1e+02
(58,1124,3)      255           24        Abs err 231 exceeds tol 0 by 2e+02
(58,1125,3)      180          245        Abs err 65 exceeds tol 0 by 6e+01
(58,1126,3)       0           255        Abs err 255 exceeds tol 0 by 3e+02
(58,1127,3)       76          255        Abs err 179 exceeds tol 0 by 2e+02


>>>>> processing /Users/runner/work/octave/octave/test/mex/bug-51725.tst
***** assert (bug_51725 (), [])
!!!!! test failed
'bug_51725' undefined near line 2, column 2
***** error <element number 2 undefined in return list> [x,y,z] = bug_51725 ();
!!!!! error failed.
Expected <element number 2 undefined in return list>, but got <'bug_51725' undefined near line 2, column 2>

>>>>> processing /Users/runner/work/octave/octave/test/mex/bug-54096.tst
***** test
 s = bug_54096 ();
 assert (s, struct ("field", []));
 assert (s.field, []);
!!!!! test failed
'bug_54096' undefined near line 3, column 3
>>>>> processing /Users/runner/work/octave/octave/test/mex/mexnumtst.tst
***** test
 s = rand (3, 4, "single");
 sc = s + i * rand (3, 4, "single");
 d = rand (3, 4, "double");
 dc = d + i * rand (3, 4, "double");

 [sx, scx, dx, dcx] = mexnumtst (s, sc, d, dc);
 assert (s, sx)
 assert (sc, scx)
 assert (d, dx)
 assert (dc, dcx)
!!!!! test failed
'mexnumtst' undefined near line 8, column 8

Looks quite similar.

I didn’t notice until failing while trying to use them. But the macOS 11 runners are still in a restricted preview phase:
About GitHub-hosted runners - GitHub Docs

Note: The macOS 11.0 virtual environment is currently provided as a private preview only. Any users or organizations that are already using this runner can continue using it, but we’re not accepting any further users or organizations at this time. The macos-latest YAML workflow label still uses the macOS 10.15 virtual environment.

I noticed that the macOS runners don’t pick up QHull:

checking for libqhull.h... no
checking for libqhull/libqhull.h... yes
checking for qh_qhull in -lqhull... no
configure: WARNING: Qhull library not found.  This will result in loss of functionality for some geometry functions.

Afaict, it is installed by homebrew though:

==> Downloading https://ghcr.io/v2/homebrew/core/qhull/manifests/2020.2
==> Downloading https://ghcr.io/v2/homebrew/core/qhull/blobs/sha256:b48c342482e1e50857c444f8eb39f71c36a522a9f0692bd479b93d2088672d2f
==> Downloading from https://pkg-containers-az.githubusercontent.com/ghcr1/blobs/sha256:b48c342482e1e50857c444f8eb39f71c36a522a9f0692bd479b93d2088672d2f?se=2021-04-29T17%3A05%3A00Z&sig=7P3Z3cQ04kiw5Zyq%2Bvd0HvU9jkih%2F8BK7a6wyMGC3iI%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Pouring qhull--2020.2.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/qhull/2020.2: 116 files, 5.5MB

Also, I’m doubting if gcc actually is gcc on macOS. The build results are probably far too similar.
Is it just an alias for clang?