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

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

[Octave-bug-tracker] [bug #59820] build fails on macOS with visibility s


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #59820] build fails on macOS with visibility settings
Date: Wed, 12 May 2021 02:46:24 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Edg/90.0.818.56

Follow-up Comment #41, bug #59820 (project octave):

I pushed a follow-up patch that lets the GitHub macOS runner build with
visibility flags here:
https://hg.savannah.gnu.org/hgweb/octave/rev/0230f7cf4044

This seems to be working now.

So this wasn't a compiler/vendor difference after all. We've been compiling
with "-fvisibility=hidden" but didn't add any visibility attributes to
declarations on macOS.

The linker emits quite a few warnings like the following though:

ld: warning: direct access in function 'boolMatrix::diag(long long) const'
from file 'liboctave/array/.libs/libarray.a(libarray_la-boolMatrix.o)' to
global weak symbol 'vtable for Array<bool>' from file
'liboctave/array/.libs/libarray.a(libarray_la-Array-b.o)' means the weak
symbol cannot be overridden at runtime. This was likely caused by different
translation units being compiled with different visibility settings.
[...]
ld: warning: direct access in function
'SparseBoolMatrix::concat(SparseBoolMatrix const&, Array<long long> const&)'
from file 'liboctave/array/.libs/libarray.a(libarray_la-boolSparse.o)' to
global weak symbol 'vtable for Sparse<bool>' from file
'liboctave/array/.libs/libarray.a(libarray_la-Sparse-b.o)' means the weak
symbol cannot be overridden at runtime. This was likely caused by different
translation units being compiled with different visibility settings.


There might be something off with how we declare the template classes Array<T>
and Sparse<T>.
IIRC, it was tricky to get the visibility flags right so that both clang and
gcc would accept them.
Maybe something is still not quite right.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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