hi, trying to backport samba 4.2.0 to ubuntu 14.04 (amd64) i'm facing the following error : ubuntu-14-04-build:~/samba-4.2.0_bpo/samba-4.2.0/bin$ gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DCTDB_HELPER_BINDIR="/usr/bin" -DLOGDIR="/var/log" -DSOCKPATH="/var/run/ctdb/ctdbd.socket" -DCTDB_ETCDIR="/etc/ctdb" -DCTDB_VARDIR="/var/lib/ctdb" -DCTDB_RUNDIR="/var/run/ctdb" -DSTATIC_CREDENTIALS_KRB5_MODULES=NULL -DSTATIC_CREDENTIALS_KRB5_MODULES_PROTO='extern void __CREDENTIALS_KRB5_dummy_module_proto(void)' -MD -pthread -Idefault/auth/credentials -I../auth/credentials -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/lib/replace -I../lib/replace -Idefault/ctdb/include -I../ctdb/include -Idefault -I.. -Idefault/lib/ldb/include -I../lib/ldb/include -Idefault/lib/ldb -I../lib/ldb -Idefault/source4/lib/tls -I../source4/lib/tls -Idefault/lib/param -I../lib/param -Idefault/librpc -I../librpc -Idefault/libcli/util -I../libcli/util -Idefault/libds/common -I../libds/common -Idefault/libcli/ldap -I../libcli/ldap -Idefault/libcli/auth -I../libcli/auth -Idefault/lib/ldb-samba -I../lib/ldb-samba -Idefault/source4/auth/kerberos -I../source4/auth/kerberos -Idefault/libcli/security -I../libcli/security -Idefault/auth -I../auth -Idefault/lib/dbwrap -I../lib/dbwrap -Idefault/source3 -I../source3 -Idefault/source3/include -I../source3/include -Idefault/source3/lib -I../source3/lib -Idefault/lib/tdb_compat -I../lib/tdb_compat -Idefault/lib/tdb/include -I../lib/tdb/include -Idefault/lib/tevent -I../lib/tevent -Idefault/source3/librpc -I../source3/librpc -Idefault/libcli/nbt -I../libcli/nbt -Idefault/source4/param -I../source4/param -Idefault/auth/kerberos -I../auth/kerberos -Idefault/source4/lib/stream -I../source4/lib/stream -Idefault/source4/heimdal_build -I../source4/heimdal_build -Idefault/source4/dsdb -I../source4/dsdb -Idefault/lib/crypto -I../lib/crypto -Idefault/lib/krb5_wrap -I../lib/krb5_wrap -Idefault/source4/lib/socket -I../source4/lib/socket -Idefault/lib/compression -I../lib/compression -Idefault/lib/util/charset -I../lib/util/charset -Idefault/libcli/lsarpc -I../libcli/lsarpc -Idefault/source4/lib/events -I../source4/lib/events -Idefault/source4/libcli -I../source4/libcli -Idefault/lib/tdb -I../lib/tdb -Idefault/dynconfig -I../dynconfig -Idefault/lib/tsocket -I../lib/tsocket -I/usr/local/include -I/usr/include/heimdal -I/usr/include/et -I/usr/include/p11-kit-1 -D_FORTIFY_SOURCE=2 -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../auth/credentials/credentials_krb5.c -c -o default/auth/credentials/credentials_krb5_7.o In file included from /usr/include/heimdal/krb5.h:941:0, from ../lib/replace/system/kerberos.h:33, from ../auth/credentials/credentials_krb5.c:25: /usr/include/heimdal/krb5-protos.h:3892:1: error: unknown type name ‘HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE’ HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL ^ /usr/include/heimdal/krb5-protos.h:3893:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘krb5_generate_random’ krb5_generate_random ( ^ HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE seems to be defined in /usr/include/heimdal/krb5-types.h $ dpkg -S /usr/include/heimdal/krb5-protos.h heimdal-multidev: /usr/include/heimdal/krb5-protos.h $ dpkg -l | grep heimdal-multidev ii heimdal-multidev 1.6~git20131207+dfsg-1ubuntu1 amd64 Heimdal Kerberos - Multi-implementation Development build option derivated from ubuntu packages (4.1.6) and debian unstable (4.1.17), both building fine on the same host : --prefix=/usr \ --enable-fhs \ --sysconfdir=/etc \ --localstatedir=/var \ --with-privatedir=/var/lib/samba/private \ --with-smbpasswd-file=/etc/samba/smbpasswd \ --with-piddir=/var/run/samba \ --with-pammodulesdir=/lib/$(DEB_HOST_MULTIARCH)/security \ --with-pam \ --with-syslog \ --with-utmp \ --with-pam_smbpass \ --with-winbind \ --with-shared-modules=idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2,vfs_dfs_samba4,auth_samba4 \ --with-automount \ --with-ldap \ --with-ads \ --with-dnsupdate \ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --with-modulesdir=/usr/lib/$(DEB_HOST_MULTIARCH)/samba \ --datadir=/usr/share \ --with-lockdir=/var/run/samba \ --with-statedir=/var/lib/samba \ --with-cachedir=/var/cache/samba \ --disable-avahi \ --with-cluster-support \ --disable-rpath \ --disable-rpath-install \ --bundled-libraries=NONE,pytevent,iniparser,tdb,ldb,pyldb-util,nss_wrapper,socket_wrapper,uid_wrapper,tevent \ --builtin-libraries=replace,ccan \ --minimum-library-version="$(shell ./debian/autodeps.py --minimum-library-version)" error is the same using gcc or ccache feel free to ask any further information regards,
to ensure taht system's krb5-types.h is used i had to delete (actually rename adding .UNUSED suffix) source4/heimdal_build/krb5-types.h had to do the same thing for source4/heimdal/kdc/kdc.h cf http://upstream.rosalinux.ru/compat_reports/heimdal/1.5.1_to_1.5.2/abi_compat_report.html some attributes have been renamed so source must be patched : sed -i -e "s/as_use_strongest_session_key/tgt_use_strongest_session_key/g" * sed -i -e "s/tgs_use_strongest_session_key/svc_use_strongest_session_key/g" * for all files in source4/kdc/ and source4/heimdal/kdc/ directories
How, exactly, is this fixed in the source? This is reproducible with 4.2.2 in a Debian stable (and again now in Debian testing) build environment. [ 854/3345] Compiling auth/credentials/credentials_krb5.c 21:33:55 runner /usr/bin/gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DCTDB_HELPER_BINDIR="/usr/bin" -DLOGDIR="/var/log" -DSOCKPATH="/var/run/ctdb/ctdbd.socket" -DCTDB_ETCDIR="/etc/ctdb" -DCTDB_VARDIR="/var/lib/ctdb" -DCTDB_RUNDIR="/var/run/ctdb" -fstack-protector -DSTATIC_CREDENTIALS_KRB5_MODULES=NULL -DSTATIC_CREDENTIALS_KRB5_MODULES_PROTO=extern void __CREDENTIALS_KRB5_dummy_module_proto(void) -MD -Idefault/auth/credentials -I../auth/credentials -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/lib/replace -I../lib/replace -Idefault/ctdb/include -I../ctdb/include -Idefault -I.. -Idefault/source4/lib/tls -I../source4/lib/tls -Idefault/lib/param -I../lib/param -Idefault/librpc -I../librpc -Idefault/libcli/util -I../libcli/util -Idefault/libds/common -I../libds/common -Idefault/libcli/ldap -I../libcli/ldap -Idefault/libcli/auth -I../libcli/auth -Idefault/lib/ldb-samba -I../lib/ldb-samba -Idefault/source4/auth/kerberos -I../source4/auth/kerberos -Idefault/libcli/security -I../libcli/security -Idefault/auth -I../auth -Idefault/lib/dbwrap -I../lib/dbwrap -Idefault/source3 -I../source3 -Idefault/source3/include -I../source3/include -Idefault/source3/lib -I../source3/lib -Idefault/lib/tdb_compat -I../lib/tdb_compat -Idefault/source3/librpc -I../source3/librpc -Idefault/libcli/nbt -I../libcli/nbt -Idefault/source4/param -I../source4/param -Idefault/auth/kerberos -I../auth/kerberos -Idefault/source4/lib/stream -I../source4/lib/stream -Idefault/source4/heimdal_build -I../source4/heimdal_build -Idefault/source4/dsdb -I../source4/dsdb -Idefault/lib/crypto -I../lib/crypto -Idefault/source4/lib/socket -I../source4/lib/socket -Idefault/lib/krb5_wrap -I../lib/krb5_wrap -Idefault/lib/compression -I../lib/compression -Idefault/lib/util/charset -I../lib/util/charset -Idefault/libcli/lsarpc -I../libcli/lsarpc -Idefault/source4/lib/events -I../source4/lib/events -Idefault/source4/libcli -I../source4/libcli -Idefault/dynconfig -I../dynconfig -Idefault/lib/tsocket -I../lib/tsocket -I/usr/local/include -I/usr/include/heimdal -I/usr/include/et -I/usr/include/p11-kit-1 -D_FORTIFY_SOURCE=2 -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../auth/credentials/credentials_krb5.c -c -o default/auth/credentials/credentials_krb5_7.o In file included from /usr/include/heimdal/krb5.h:941:0, from ../lib/replace/system/kerberos.h:33, from ../source4/auth/kerberos/srv_keytab.c:25: /usr/include/heimdal/krb5-protos.h:3892:1: error: unknown type name ‘HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE’ HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL ^ /usr/include/heimdal/krb5-protos.h:3893:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘krb5_generate_random’ krb5_generate_random ( ^ In file included from /usr/include/heimdal/krb5.h:941:0, from ../lib/replace/system/kerberos.h:33, from ../auth/credentials/credentials_krb5.c:25: /usr/include/heimdal/krb5-protos.h:3892:1: error: unknown type name ‘HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE’ HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL ^ /usr/include/heimdal/krb5-protos.h:3893:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘krb5_generate_random’ krb5_generate_random ( ^ Waf: Leaving directory `~/samba/samba-4.2.2+dfsg/bin' Build failed: -> task failed (err #1): {task: cc srv_keytab.c -> srv_keytab_8.o} -> task failed (err #1): {task: cc credentials_krb5.c -> credentials_krb5_7.o} debian/rules:90: recipe for target 'override_dh_auto_build' failed make[1]: *** [override_dh_auto_build] Error 1 make[1]: Leaving directory '~/samba/samba-4.2.2+dfsg' debian/rules:69: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2