Show-stopper samba-4.7.0rc3 on AIX when using xlc

Michael Felt michael at felt.demon.nl
Tue Aug 8 18:28:48 UTC 2017


On 05/08/2017 10:46, Andrew Bartlett via samba-technical wrote:
> On Sat, 2017-08-05 at 09:45 +0200, Michael Felt via samba-technical
> wrote:
>> On 01/08/2017 11:55, Michael Felt via samba-technical wrote:
>>> Been working on packaging SAMBA for AIX the last 24 hours. Via the bug
>>> reports I saw some patches that have been applied to SAMBA-4.7 (but
>>> not in the 4.4.15.+ I guess) - so started a test of the rc as well.
>>>
>>> It stops almost immediately - with a bad compiler flag -
>> Just curious - is there no interest in the RC3 release, or did I post
>> this to the wrong list (as I see nothing about samba4.7rc3 testing at all).
> This is the right place, it is just really hard to get folks to test
> our release candidate releases.
>
> I'm sorry I missed your mail earlier this week.
>
> The issue is in lib/replace/wscript
>
> The code tests for -Wno-format-truncation and then if that exists but
> unconditionally sets -Wno-format-zero-length.
>
>> Q2: as I have been reading a bit - if I was going to try and 'fix' this,
>> would that be in the wafsamba directory (of buildtools)?
> Fixing it shouldn't be hard, just make that test -Wno-format-truncation
> also conditional.
>
> If you look over the git log, you can see us trying hard to keep too
> many different compiler versions happy.  It all started with:
>
> commit b02d636e0b1c43821a83297f51599bb03b5858b3
> Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
> Date:   Tue Nov 1 13:26:11 2016 +1300
>
>      lib/replace tests: prevent GCC fretting over snprintf sizes
>      
>      These tests deliberately use snprintf for truncating strings, which
> is
>      fine for tests. This has the effect of leaving the warning in place
>      but preventing it from becoming a fatal error.
>      
>      Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
>      Reviewed-by: Andrew Bartlett <abartlet at samba.org>
>
> Thanks so much for chasing this down, I'm sure you can get a patch
> knocked up pretty quickly with that info.
Well, you chased it down - I only fell over it.

Learning more about python, looking (for) how things such as 
HAVE_WNO_FORMAT_TRUNCATIONis determined.

p.s. - a simple change would be:
From:
replace_test_cflags="-Wno-format-zero-length"
if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
replace_test_cflags += "-Wno-format-truncation"
TO:
if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
replace_test_cflags="-Wno-format-zero-length -Wno-format-truncation"
else:
     replace_test_cflags=""

This changes the assumption that all compilers know about 
-Wno-format-zero-length to:
ALL compilers that know -Wno-format-truncation ALSO know 
-Wno-format-zero-length

I'll work this into a PATCH email (aka bug report) tomorrow. But (as I 
am also learning git) I do not think I will be able to get it into a PR.

Sincerely,
Michael
> Thanks,
>
> Andrew Bartlett
>



More information about the samba-technical mailing list