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

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

[Octave-patch-tracker] [patch #8919] Start of patch to enable visibility


From: Markus Mützel
Subject: [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system
Date: Mon, 04 Apr 2016 11:41:25 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #2, patch #8919 (project octave):

The problem with index_exception::message (as described - but interpreted
wrongly - in bug #47587) still puzzles me.

Making it pure virtual and adding definitions to every class that inherits
from it (as done in file #36813) does not seem the right way to go.

When I revert that part of the patch and re-compile, I get the following
additional linker errors:

libinterp/.libs/liboctinterp.so: undefined reference to
`index_exception::message[abi:cxx11]() const'
libinterp/.libs/liboctinterp.so: undefined reference to `typeinfo for
index_exception'
libinterp/.libs/liboctinterp.so: undefined reference to `vtable for
index_exception'


The last two led to my assumption that index_exception::message was not
defined. But it is in lo-array-errwarn.cc.

The first error indicates problems with linking objects that have been
compiled with different ABIs. But I do not know where (and if really) this is
a problem.

Those three link errors disappear if the definition for
index_exception::message is inlined (see attached patch).
(However, I do not know what inlining a virtual function means for the
compiler and whether this could lead to changed behavior where "message" is
actually overloaded by a child class. AFAICS "message" is not overloaded
anywhere in core Octave.)

A similar behavior shows for the destructor of octave_chunk_buffer. To avoid
linker errors, the destructor has to be inlined (also included in the new
patch).

Maybe someone more experienced can comment on this...

I should already have mentioned in comment #1 that these are "minimal
patches": I do not see any more link errors than the ones already mentioned.
But most probably there are more functions that should be exposed to get all
packages (and any .oct file) to compile...

After updating to the newest Mercurial repo, I see a lot of new warnings
(probably from changeset f3f8e1d3e399: avoid mulitple definitions of static
function-scope vars (bug #47372)). So I wonder whether that change is working
as expected... I'll attach the complete output from make, too.

I cannot test any further since Octave still does not compile because of the
functions that are not exported by gnulib when it is compiled with
CFLAGS="-fvisibility=hidden" CXXFLAGS="-fvisibility=hidden".

(file #36831, file #36832)
    _______________________________________________________

Additional Item Attachment:

File name: visibility3.patch              Size:27 KB
File name: output_make.log                Size:164 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8919>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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