Hello, samba FTBFS on hurd because IOV_MAX is not defined (or the proper header is not included) 16:36:44 runner ['/usr/bin/gcc', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-g', '-O2', '-ffile-prefix-map=/home/bigon/samba-4.13.14+dfsg=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-DHAVE_CONFIG_H=1', '-Dserver_service_ldap_init=samba_init_module', '-fPIC', '-D__STDC_WANT_LIB_EXT1__=1', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_REENTRANT', '-DCTDB_HELPER_BINDIR="/usr/lib/i386-gnu/ctdb"', '-DLOGDIR="/var/log/ctdb"', '-DCTDB_DATADIR="/usr/share/ctdb"', '-DCTDB_ETCDIR="/etc/ctdb"', '-DCTDB_VARDIR="/var/lib/ctdb"', '-DCTDB_RUNDIR="/var/run/ctdb"', '-fstack-protector-strong', '-fstack-clash-protection', '-DSTATIC_service_ldap_MODULES=NULL', '-DSTATIC_service_ldap_MODULES_PROTO=extern void __service_ldap_dummy_module_proto(void)', '-Isource4/ldap_server', '-I../../source4/ldap_server', '-Iinclude/public', '-I../../include/public', '-Isource4', '-I../../source4', '-Ilib', '-I../../lib', '-Isource4/lib', '-I../../source4/lib', '-Isource4/include', '-I../../source4/include', '-Iinclude', '-I../../include', '-Ilib/replace', '-I../../lib/replace', '-Ictdb/include', '-I../../ctdb/include', '-Ictdb', '-I../../ctdb', '-I.', '-I../..', '-Ilibrpc', '-I../../librpc', '-Isource4/libcli', '-I../../source4/libcli', '-Isource4/libcli/wbclient', '-I../../source4/libcli/wbclient', '-Isource4/heimdal/lib/wind', '-I../../source4/heimdal/lib/wind', '-Isource4/heimdal_build', '-I../../source4/heimdal_build', '-Insswitch', '-I../../nsswitch', '-Isource4/smbd', '-I../../source4/smbd', '-Isource4/auth', '-I../../source4/auth', '-Ilib/tsocket', '-I../../lib/tsocket', '-Isource4/heimdal/base', '-I../../source4/heimdal/base', '-Isource4/heimdal/include', '-I../../source4/heimdal/include', '-Isource4/auth/kerberos', '-I../../source4/auth/kerberos', '-Ilibcli/auth', '-I../../libcli/auth', '-Isource4/heimdal/lib/asn1', '-I../../source4/heimdal/lib/asn1', '-Ilibcli/netlogon', '-I../../libcli/netlogon', '-Ilib/socket', '-I../../lib/socket', '-Ilib/util/charset', '-I../../lib/util/charset', '-Ilib/param', '-I../../lib/param', '-Isource4/librpc', '-I../../source4/librpc', '-Isource4/heimdal/lib/hx509', '-I../../source4/heimdal/lib/hx509', '-Isource4/param', '-I../../source4/param', '-Ilibcli/http', '-I../../libcli/http', '-Ilibds/common', '-I../../libds/common', '-Isource4/heimdal/lib/hcrypto', '-I../../source4/heimdal/lib/hcrypto', '-Isource4/heimdal/lib', '-I../../source4/heimdal/lib', '-Isource4/libcli/smb2', '-I../../source4/libcli/smb2', '-Iauth/ntlmssp', '-I../../auth/ntlmssp', '-Isource4/libcli/ldap', '-I../../source4/libcli/ldap', '-Ilib/krb5_wrap', '-I../../lib/krb5_wrap', '-Isource3', '-I../../source3', '-Isource3/include', '-I../../source3/include', '-Isource3/lib', '-I../../source3/lib', '-Isource4/heimdal/lib/com_err', '-I../../source4/heimdal/lib/com_err', '-Isource4/heimdal/lib/krb5', '-I../../source4/heimdal/lib/krb5', '-Isource4/heimdal/lib/gssapi', '-I../../source4/heimdal/lib/gssapi', '-Isource4/heimdal/lib/gssapi/gssapi', '-I../../source4/heimdal/lib/gssapi/gssapi', '-Isource4/heimdal_build/include', '-I../../source4/heimdal_build/include', '-Ibin/default/source4/heimdal/lib/asn1', '-Isource4/heimdal/lib/asn1', '-Ilib/ldb-samba', '-I../../lib/ldb-samba', '-Iauth/credentials', '-I../../auth/credentials', '-Isource4/dsdb', '-I../../source4/dsdb', '-Isource4/auth/ntlm', '-I../../source4/auth/ntlm', '-Isource4/heimdal/lib/roken', '-I../../source4/heimdal/lib/roken', '-Isource3/librpc', '-I../../source3/librpc', '-Ilib/async_req', '-I../../lib/async_req', '-Isource4/lib/messaging', '-I../../source4/lib/messaging', '-Ilibcli/util', '-I../../libcli/util', '-Ilib/crypto', '-I../../lib/crypto', '-Ilibcli/cldap', '-I../../libcli/cldap', '-Isource4/auth/gensec', '-I../../source4/auth/gensec', '-Isource4/lib/socket', '-I../../source4/lib/socket', '-Ilibcli/security', '-I../../libcli/security', '-Ilib/messaging', '-I../../lib/messaging', '-Ilib/compression', '-I../../lib/compression', '-Iauth/gensec', '-I../../auth/gensec', '-Isource4/cluster', '-I../../source4/cluster', '-Ilibcli/lsarpc', '-I../../libcli/lsarpc', '-Iauth/kerberos', '-I../../auth/kerberos', '-Isource4/lib/events', '-I../../source4/lib/events', '-Ilib/pthreadpool', '-I../../lib/pthreadpool', '-Isource4/heimdal/lib/gssapi/spnego', '-I../../source4/heimdal/lib/gssapi/spnego', '-Isource4/heimdal/lib/gssapi/krb5', '-I../../source4/heimdal/lib/gssapi/krb5', '-Isource4/heimdal/lib/gssapi/mech', '-I../../source4/heimdal/lib/gssapi/mech', '-Ilibcli/nbt', '-I../../libcli/nbt', '-Isource4/lib/tls', '-I../../source4/lib/tls', '-Isource4/heimdal/lib/hcrypto/libtommath', '-I../../source4/heimdal/lib/hcrypto/libtommath', '-Ilib/audit_logging', '-I../../lib/audit_logging', '-Idynconfig', '-I../../dynconfig', '-Ilibcli/smb', '-I../../libcli/smb', '-Ilib/addns', '-I../../lib/addns', '-Insswitch/libwbclient', '-I../../nsswitch/libwbclient', '-Ilib/dbwrap', '-I../../lib/dbwrap', '-Ilibcli/dns', '-I../../libcli/dns', '-Ilibcli/named_pipe_auth', '-I../../libcli/named_pipe_auth', '-Ilibcli/ldap', '-I../../libcli/ldap', '-Iauth', '-I../../auth', '-Isource4/lib/stream', '-I../../source4/lib/stream', '-Ilibcli/drsuapi', '-I../../libcli/drsuapi', '-I/usr/include/p11-kit-1', '../../source4/ldap_server/ldap_server.c', '-c', '-o/home/bigon/samba-4.13.14+dfsg/bin/default/source4/ldap_server/ldap_server.c.1.o', '-Wdate-time', '-D_FORTIFY_SOURCE=2'] In file included from ../../lib/replace/../replace/replace.h:663, from ../../source4/include/includes.h:23, from ../../source4/ldap_server/ldap_server.c:24: ../../source4/ldap_server/ldap_server.c: In function ‘ldapsrv_call_writev_start’: ../../source4/ldap_server/ldap_server.c:744:48: error: ‘IOV_MAX’ undeclared (first use in this function); did you mean ‘INT_MAX’? 744 | call->iov_count = MIN(call->iov_count, IOV_MAX); | ^~~~~~~ ../../source4/ldap_server/ldap_server.c:744:48: note: each undeclared identifier is reported only once for each function it appears in
if you add to source4/ldap_server/ldap_server.c this: #include "lib/replace/system/network.h" Does that fix it for you?
Hello, No it's not helping, still failing with the same error
As I don't have a Hurd system to dig into this, can you please find out why this define from lib/replace/system/network.h doesn't get set here? __GNU__ is probably set on Hurd, then IOV_MAX should get defined, too. #ifndef IOV_MAX # ifdef UIO_MAXIOV # define IOV_MAX UIO_MAXIOV # else # ifdef __sgi /* * IRIX 6.5 has sysconf(_SC_IOV_MAX) * which might return 512 or bigger */ # define IOV_MAX 512 # endif # ifdef __GNU__ /* * GNU/Hurd does not have such hardcoded limitations. Use a reasonable * amount. */ # define IOV_MAX 512 # endif # endif #endif
Owww, the code is different in 4.13.14 apparently and this patch is still not in there... https://github.com/samba-team/samba/commit/611e643d14659be8a63e9ca51d5d05659c4b8b6c Applying that patch allows to build to continue, but then it fails on [3278/4301] Compiling lib/util/tests/tfork.c ../../lib/util/tests/tfork.c: In function ‘test_tfork_sigign’: ../../lib/util/tests/tfork.c:105:29: error: ‘SA_NOCLDWAIT’ undeclared (first use in this function); did you mean ‘SA_NOCLDSTOP’? 105 | .sa_flags = SA_NOCLDWAIT, | ^~~~~~~~~~~~ | SA_NOCLDSTOP ../../lib/util/tests/tfork.c:105:29: note: each undeclared identifier is reported only once for each function it appears in
I guess it makes most sense if you try to compile the current master branch on Hurd and work out the fixes needed for a Hurd build there. If you have fixes required for master, they should get fixed there first, then you/we can have a look what of those fixes need backporting.
I can confirm that SA_NOCLDWAIT is still a problem in lib/util/tests/tfork.c with git head
don't have much expectations in other people here putting much time into fixing GNU Hurd build issues. If you propose fixes though we're happy to review and bring them upstream.