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

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
Hi,

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 -

root@x064:[/data/prj/samba/samba-4.7.0rc3]make V=1
WAF_MAKE=1 python ./buildtools/bin/waf build
Waf: Entering directory `/data/prj/samba/samba-4.7.0rc3/bin'
     Selected embedded Heimdal build
[ 477/3656] Compiling lib/replace/test/testsuite.c
20:06:46 runner /usr/vacpp/bin/xlc_r -Wno-format-zero-length -fPIC
-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-DSTATIC_replace_test_MODULES=NULL
-DSTATIC_replace_test_MODULES_PROTO=extern void
__replace_test_dummy_module_proto(void) -Idefault/lib/replace
-I../lib/replace -Idefault/include/public -I../include/public
-Idefault/source4 -I../source4 -Idefault/lib -I../lib
-Idefault/source4/lib -I../source4/lib -Idefault/source4/include
-I../source4/include -Idefault/include -I../include -Idefault -I..
-I/usr/local/include -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_ALL_SOURCE=1
-D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1
../lib/replace/test/testsuite.c -c -o default/lib/replace/test/testsuite_4.o
/usr/vacpp/bin/xlc_r: 1501-210 (S) command option Wno-format-zero-length
contains an incorrect subargument
Waf: Leaving directory `/data/prj/samba/samba-4.7.0rc3/bin'
Build failed:  -> task failed (err #40):
         {task: cc testsuite.c -> testsuite_4.o}
Makefile:8: recipe for target 'all' failed
make: *** [all] Error 1
root@x064:[/data/prj/samba/samba-4.7.0rc3]

If I cut/paste the command but also remove the bad flag
(-Wno-format-zero-length) the compile is successful. But only for one file.

With 'waf' I have no idea where I should be looking for this "forced"
gcc (guessing) flag being applied everywhere.

Hope this helps - In a later mail I'll give a report on what I did to
get 4.4.15 to build.

Sincerely,

Michael


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
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).

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)?

Thx.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
On la, 05 elo 2017, 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).
If you want to see a bug fixed in a released version, file the bug itself at
bugzilla.samba.org first. If you are able to provide patches, provide
them against git master.

> 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)?
It should be somewhere in wafsamba, yes.

--
/ Alexander Bokovoy

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
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 <[hidden email]>
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 <[hidden email]>
    Reviewed-by: Andrew Bartlett <[hidden email]>

Thanks so much for chasing this down, I'm sure you can get a patch
knocked up pretty quickly with that info.

Thanks,

Andrew Bartlett

--
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
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 <[hidden email]>
> 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 <[hidden email]>
>      Reviewed-by: Andrew Bartlett <[hidden email]>
>
> 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
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
On Tue, 2017-08-08 at 20:28 +0200, Michael Felt via samba-technical
wrote:

> 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 <[hidden email]>
> > 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 <[hidden email]
> > z>
> >      Reviewed-by: Andrew Bartlett <[hidden email]>
> >
> > 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.

There are lots of very good tutorials on the web.  Please make it a
signed-off git commit, sent here as git-format-patch -1, it makes it
much, much more likely to be picked up in a timely manner, which in
turn makes a 4.7 backport much more practical.

Andrew Bartlett

--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT  
https://catalyst.net.nz/services/samba





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
On 08/08/2017 23:22, Andrew Bartlett wrote:
> There are lots of very good tutorials on the web.  Please make it a
> signed-off git commit, sent here as git-format-patch -1, it makes it
> much, much more likely to be picked up in a timely manner, which in
> turn makes a 4.7 backport much more practical.

I read about git and signing things, and I have done several tutorials.
But I am an old dog - having trouble learning the new tricks :)

As to this particular problem - I think the patch 'causing' this is
poorly architected as
my suspicion is that there are multiple locations where "cflags" are
being tested and set.
IMHO - these would be better 'determined' aka set in one location, and
used where needed.
(I am thinking specifically about the code at about line 90 where the
boolean tested at line 720-something
  is set.)

Michael


Loading...