On Wed, May 03, 2017 at 12:00:20PM +0200, Mattia Rizzolo wrote:
> I noticed that libpodofo exports symbols for all of its methods, which
> means that things like https://sourceforge.net/p/podofo/code/1838
> actually break the ABI despite it not needed to, as that's a private
> method.
> 
> 
> It would be quite nice if somebody could go through all of the codebase,
> and do something like https://gcc.gnu.org/wiki/Visibility

So, I had a chance to dig around a tiny bit, and discovered things about
PODOFO_LOCAL and PODOFO_API, which seem to exist with the exact porpuse
of tweaking symbol visibility.
See the CODINDSTYLE.txt file.

Though, all the interesting part of those macros are enabled only with
cmake's variable PODOFO_USE_VISIBILITY enabled, which is automatically
enabled only when cmake detects a GCC version 4.* with some weird code.
So, one problem is that apparently that part doesn't consider that GCC
now changed versioning scheme....  Also that code calls `gcc --version`
unconditionally, so I'm wondering how that's going to work if I have
both gcc and clang instaled but I'm compiling with an old version of
clang that doesn't support -fvisibility...  So, that check needs an
overhoul to be useful again.


Anyway, starting from the next SONAME bump (i.e. podofo release) I'll be
manually setting -DPODOFO_USE_VISIBILITY, it seemed to remove a good
bunch of exported symbols, alas not that many, probably more
PODOFO_LOCAL and PODOFO_API are still needed through the codebase.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to