The following holds with gnutls stable 3.4.11: [...] [ 517/3610] Compiling lib/util/getpass.c [ 518/3610] Compiling lib/util/genrand.c In file included from ../lib/util/genrand.c:24: In file included from ../source4/../lib/crypto/crypto.h:23: ../source4/../lib/crypto/hmacmd5.h:28:9: fatal error: unknown type name 'MD5_CTX' MD5_CTX ctx; ^ 1 error generated. Waf: Leaving directory `/opt/src/samba-4.1.23/bin' Build failed: -> task failed (err #1): {task: cc genrand.c -> genrand_1.o} make: *** [all] Error 1
The same holds without gnutls.
/opt/src/samba-4.1.23/source4/../lib/crypto/hmacmd5.h #include "../lib/crypto/md5.h" /opt/src/samba-4.1.23/source4/../lib/crypto/md5.h
> /opt/src/samba-4.1.23/source4/../lib/crypto/hmacmd5.h #include "../lib/crypto/md5.h" > /opt/src/samba-4.1.23/source4/../lib/crypto/md5.h /* Try to use CommonCrypto on Mac as otherwise we can get MD5Final twice */ #elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) #include <CommonCrypto/CommonDigest.h> >/usr/include/CommonCrypto/CommonDigest.h #define MD5_CTX CC_MD5_CTX Then, why "unknown type name"?
... #if defined(HAVE_BSD_MD5_H) /* Try to avoid clashes with BSD MD5 implementation (on linux) */ #include <bsd/md5.h> #elif defined(HAVE_SYS_MD5_H) /* Try to avoid clashes with BSD MD5 implementation (on BSD) */ #include <sys/md5.h> /* Try to use CommonCrypto on Mac as otherwise we can get MD5Final twice */ #elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) #include <CommonCrypto/CommonDigest.h> #define MD5Init(c) CC_MD5_Init(c) #define MD5Update(c,d,l) CC_MD5_Update(c,d,l) #define MD5Final(m, c) CC_MD5_Final((unsigned char *)m,c) #define MD5Context CC_MD5state_st #else typedef struct MD5Context { uint32_t buf[4]; uint32_t bits[2]; uint8_t in[64]; } MD5_CTX; ... >ls /usr/include/bsd/md5.h ls: /usr/include/bsd/md5.h: No such file or directory >ls /usr/include/sys/md5.h ls: /usr/include/sys/md5.h: No such file or directory >ls -l /usr/include/CommonCrypto/CommonDigest.h -rw-r--r-- 1 root wheel 11670 Feb 5 02:15 /usr/include/CommonCrypto/CommonDigest.h /opt/src/samba-4.1.23/bin/config.log:157987:#define HAVE_COMMONCRYPTO_COMMONDIGEST_H 1 ... >grep 'define\ MD5_CTX' /usr/include/CommonCrypto/CommonDigest.h #define MD5_CTX CC_MD5_CTX #define MD5_CTX CC_MD5_CTX
Problem solved on samba 4.6.0