I found two issues about building samba on darwin. First error is: [1307/3646] Compiling lib/dbwrap/dbwrap.c In file included from ../lib/dbwrap/dbwrap.c:26: In file included from ../lib/dbwrap/dbwrap.h:27: In file included from ../lib/param/loadparm.h:259: default/lib/param/param_local.h:141:1: error: field has incomplete type 'struct timespec' LOADPARM_EXTRA_LOCALS ^ ../lib/param/loadparm.h:253:18: note: expanded from macro 'LOADPARM_EXTRA_LOCALS' struct timespec usershare_last_mod; \ ^ default/lib/param/param_local.h:141:1: note: forward declaration of 'struct timespec' ../lib/param/loadparm.h:253:9: note: expanded from macro 'LOADPARM_EXTRA_LOCALS' struct timespec usershare_last_mod; \ ^ 1 error generated. Waf: Leaving directory `/Users/hiro/work/samba/bin' Build failed: -> task failed (err #1): {task: cc dbwrap.c -> dbwrap_1.o} It can be fixed by adding '#include "system/time.h"' to lib/param/loadparam.h Second error is: [3590/3646] Linking default/source4/torture/smbtorture clang: warning: argument unused during compilation: '-pie' Undefined symbols for architecture x86_64: "_getgrent_r", referenced from: _test_enum_r_group in nss_tests_1.o "_getpwent_r", referenced from: _test_enum_r_passwd in nss_tests_1.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Because of OS X doesn't have getgrent_r and getpwent_r, I used HAVE_GETGRENT_R and HAVE_GETPWENT_R to skip tests at source4/torture/local/nss_tests. I also confirmed above issues on latest source code.
First error is duplicate of https://bugzilla.samba.org/show_bug.cgi?id=11811
*** Bug 13574 has been marked as a duplicate of this bug. ***
Fixed by f460bb52ed4393722d58f9e6d30bd0c7e6a51f1d in Samba 4.10 (timespec is in bug 11811)