Commit 996560191ac6bd603901dcd6c0de5d239e019ef4 causes strange regression

Andrew Bartlett abartlet at samba.org
Mon Mar 8 02:42:06 UTC 2021


On Mon, 2021-03-08 at 14:59 +1300, Andrew Bartlett via samba-technical
wrote:
> On Mon, 2021-03-08 at 12:39 +1100, Martin Schwenke via samba-
> technical
> wrote:
> > I want to flag this regression as soon as possible (before I really
> > understand it) because 4.12.12 is due for release on Thursday and
> > this
> > may be the last 4.12.x release, due to the imminent release of
> > 4.14.0.
> 
> Thanks for looking at this.  Bother.
> 
> Can you see if --as-needed is being detected on your
> host?  Previously
> it was being used only if we were compiling with GCC, now we test,
> but
> it is possible the test is wrong.
> 
> In short, can you look into the config.log and such?
> 
> Andrew Bartlett

Lot of bugs here.  To aid those trying to chase them along, the
regression is in the fix for 
https://bugzilla.samba.org/show_bug.cgi?id=14288

Interestingly, 996560191ac6bd603901dcd6c0de5d239e019ef4 is essentially
a revert of:

commit ab232ca77f8f08879d99f88cfcd554500717075e
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Sep 23 17:21:51 2019 +0200

    waf: Use waf function to add for -Wl,--as-needed
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Matthias Dieter Wallnöfer <mdw at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Wed Sep 25 16:56:40 UTC 2019 on sn-devel-
184

Sorry for the bung review here.  The patch is wrong, it changes
behaviour on Linux, see the diff attached.  

It was likely tested most carefully by the person not wanting --as-
needed on the Solaris derivative and not for the normal case on Linux. 

I looked into if should we go back to before that commit, but reverting
it doesn't help.

As to why, this commit is revealing:

commit b0f41c07ffe8600433c20a038b1612c04ed29e89
Author: Björn Jacke <bj at sernet.de>
Date:   Thu Sep 10 21:31:03 2015 +0200

    build: use as-needed linker flag also on OpenBSD
    
    OpenBSD is unusable with binaries with many superfluous libs linked
in.
    samba-tool start times of 250 seconds without as-needed vs. 1.4
seconds with
    as-needed.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11355
    
    Signed-off-by: Bjoern Jacke <bj at sernet.de>
    Reviewed-by: Ralph Böhme <rb at sernet.de>
    
    Autobuild-User(master): Björn Jacke <bj at sernet.de>
    Autobuild-Date(master): Fri Sep 11 03:37:17 CEST 2015 on sn-devel-
104

I wonder if we should do the opposite, just decide this is a required
feature, at least until someone works out how to pare down the library
list.

Finally, the issue here is that ADD_LDFLAGS modified EXTRA_LDFLAGS
while conf.add_as_needed() changes LINKFLAGS.

I'll update the bug with this last summery.

Andrew Bartlett
-- 
Andrew Bartlett (he/him)       https://samba.org/~abartlet/
Samba Team Member (since 2001) https://samba.org
Samba Team Lead, Catalyst IT   https://catalyst.net.nz/services/samba

Samba Development and Support, Catalyst IT - Expert Open Source
Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.diff
Type: text/x-patch
Size: 49004 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20210308/15950635/config.log.bin>


More information about the samba-technical mailing list