William Brown via samba-technical
2018-04-18 09:00:57 UTC
Hi,
I noticed that my fresh checkout on f27 stopped working with:
commit fc473cd28261478cc9c3232b43fc725f0468f8a9 (HEAD -> master,
origin/master, origin/HEAD)
./configure.developer --address-sanitizer --enable-developer --enable-
debug --enable-auto-reconfigure
make
...
[1624/4154] Compiling lib/ldb-samba/ldb_wrap.c
../lib/ldb-samba/ldb_wrap.c: In function âldb_wrap_findâ:
../lib/ldb-samba/ldb_wrap.c:191:14: error: implicit declaration of
function âgetpidâ; did you mean âgetptâ? [-Werror=implicit-function-
declaration]
pid_t pid = getpid();
^~~~~~
getpt
cc1: some warnings being treated as errors
Waf: Leaving directory `/home/william/development/samba/bin'
Build failed: -> task failed (err #1):
{task: cc ldb_wrap.c -> ldb_wrap_5.o}
make: *** [Makefile:8: all] Error 1
I then dumped the preprocessor output (attached), I notice that
unistd.h is missing. It's avaliable in source3/.../includes.h, but not
in source4.
I created a patch adding unistd.h to ldb_wrap.c, then continued and
noticed:
[3106/4154] Compiling source3/libgpo/gpext/security.c
../source3/libgpo/gpext/security.c: In function
âsecurity_process_group_policyâ:
../source3/libgpo/gpext/security.c:202:5: error: âstatus.vâ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
if (!NT_STATUS_IS_OK(status)) {
^
cc1: some warnings being treated as errors
Waf: Leaving directory `/home/william/development/samba/bin'
Build failed: -> task failed (err #1):
{task: cc security.c -> security_5.o}
At this point I was quite suspicious - I have eventually worked out the
root cause is '--address-sanitizer'. Addition of this option will cause
compilation to fail, however I don't understand why.
I have done a make clean, reconfigure, build with and without, and the
cause is always --address-sanitizer
Any advice on what could be going on here would be great, as I'm not
yet very familiar with waf.
Thank you!
William
I noticed that my fresh checkout on f27 stopped working with:
commit fc473cd28261478cc9c3232b43fc725f0468f8a9 (HEAD -> master,
origin/master, origin/HEAD)
./configure.developer --address-sanitizer --enable-developer --enable-
debug --enable-auto-reconfigure
make
...
[1624/4154] Compiling lib/ldb-samba/ldb_wrap.c
../lib/ldb-samba/ldb_wrap.c: In function âldb_wrap_findâ:
../lib/ldb-samba/ldb_wrap.c:191:14: error: implicit declaration of
function âgetpidâ; did you mean âgetptâ? [-Werror=implicit-function-
declaration]
pid_t pid = getpid();
^~~~~~
getpt
cc1: some warnings being treated as errors
Waf: Leaving directory `/home/william/development/samba/bin'
Build failed: -> task failed (err #1):
{task: cc ldb_wrap.c -> ldb_wrap_5.o}
make: *** [Makefile:8: all] Error 1
I then dumped the preprocessor output (attached), I notice that
unistd.h is missing. It's avaliable in source3/.../includes.h, but not
in source4.
I created a patch adding unistd.h to ldb_wrap.c, then continued and
noticed:
[3106/4154] Compiling source3/libgpo/gpext/security.c
../source3/libgpo/gpext/security.c: In function
âsecurity_process_group_policyâ:
../source3/libgpo/gpext/security.c:202:5: error: âstatus.vâ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
if (!NT_STATUS_IS_OK(status)) {
^
cc1: some warnings being treated as errors
Waf: Leaving directory `/home/william/development/samba/bin'
Build failed: -> task failed (err #1):
{task: cc security.c -> security_5.o}
At this point I was quite suspicious - I have eventually worked out the
root cause is '--address-sanitizer'. Addition of this option will cause
compilation to fail, however I don't understand why.
I have done a make clean, reconfigure, build with and without, and the
cause is always --address-sanitizer
Any advice on what could be going on here would be great, as I'm not
yet very familiar with waf.
Thank you!
William