GCC 8.3 and ABI check
Amitay Isaacs
amitay at gmail.com
Tue Apr 9 07:50:23 UTC 2019
Hi Andreas,
On Tue, Apr 9, 2019 at 4:48 PM Andreas Schneider <asn at samba.org> wrote:
>
> On Tuesday, April 9, 2019 6:28:44 AM CEST Amitay Isaacs via samba-technical
> wrote:
> > Hi,
> >
> > With gcc 8.3.1 on fedora 29, ABI check keeps failing for various
> > conditions. Noticed this when I tried building ctdb for the latest
> > master with developer build.
>
> Hi Amitay,
>
> > Issues:
> >
> > 1. We might have to add "-g" to build if abi_check is enabled.
> > (abi_check gets enabled for developer build).
> >
> > 2. The missing debug information from shared library when optimize
> > flags are used, seems like a bug in gcc. Anyone has any other ideas
> > on how to confirm that? To work around this problem we might need
> > to add "-g -O0" to CFLAGS if abi_check is enabled.
>
> The ABI check only reliably works with CFLAGS="-Og -g" as it needs to contain
> DWARF debug info to get the symbol signatures.
Sure. In that case, ABI check should not be enabled by default on
developer build or developer build should force CFLAGS.
>
> > If you are on a different platform (different version of gcc), can you
> > check if abi check works?
> >
> > $ cd samba/lib/talloc
> > $ ./configure --abi-check
> > $ make
> > $ CFLAGS="-O2" ./configure --abi-check
> > $ make
>
> I guess this is probably because the optimizer is less aggressive or not as
> advanced as on x86-64.
The tests are run on my laptop, so it's x86_64.
I regularly build CTDB with developer build with "-g -O3". I'm sure
it worked with initial releases of gcc8. With some later release gcc8
is broken and does not store the right debug information.
Amitay.
More information about the samba-technical
mailing list