Samba from git (4-8-stable and 4-8-test) is failing to compile. I did
not have these issues with the previous 4-7 branches.
Basically this installation is just a simple file server, no domain,
ad, print service, etc. necessary or even desired.
My configure arguments:
$ ./configure --without-winbind --disable-avahi --without-ads
--without-ldap --without-pam --without-quotas --without-dnsupdate
--without-automount --without-ad-dc --with-systemd --enable-gnutls
--without-ntvfs-fileserver --accel-aes=intelaesni
If I drop "--without-ldap" the compile is successful but I have no
need for ldap in the installed environment and I see no reason that
anything to do with GPO would be necessary when the configure includes
"--without-ads --without-ldap --without-ad-dc".
Seems to be a mistake that libgpo/pygpo.c is even attempted as part of
the make in such an environment.
The failure:
============================================[1939/3416] Compiling libgpo/pygpo.c
../libgpo/pygpo.c: In function ‘find_samaccount’:
../libgpo/pygpo.c:340:11: warning: implicit declaration of function
‘ads_do_search_all’; did you mean ‘ads_do_search_all_fn’?
[-Wimplicit-function-declaration]
status = ads_do_search_all(ads, ads->config.bind_path,
^~~~~~~~~~~~~~~~~
ads_do_search_all_fn
../libgpo/pygpo.c:341:8: error: ‘LDAP_SCOPE_SUBTREE’ undeclared (first
use in this function); did you mean ‘LDAP_OPT_SUCCESS’?
LDAP_SCOPE_SUBTREE, filter, attrs, &res);
^~~~~~~~~~~~~~~~~~
LDAP_OPT_SUCCESS
../libgpo/pygpo.c:341:8: note: each undeclared identifier is reported
only once for each function it appears in
In file included from ../source3/include/ads.h:9:0,
from ../libgpo/gpo.h:23,
from ../libgpo/pygpo.c:23:
../libgpo/pygpo.c:348:22: error: ‘LDAP_NO_RESULTS_RETURNED’ undeclared
(first use in this function); did you mean
‘WERR_DS_NO_RESULTS_RETURNED’?
status = ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
^
../source3/libads/ads_status.h:43:65: note: in definition of macro
‘ADS_ERROR_LDAP’
#define ADS_ERROR_LDAP(rc) ads_build_error(ENUM_ADS_ERROR_LDAP, rc, 0)
^~
../libgpo/pygpo.c:348:12: note: in expansion of macro ‘ADS_ERROR’
status = ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
^~~~~~~~~
../libgpo/pygpo.c:352:7: warning: implicit declaration of function
‘ads_get_dn’; did you mean ‘ads_get_upn’?
[-Wimplicit-function-declaration]
dn = ads_get_dn(ads, talloc_tos(), res);
^~~~~~~~~~
ads_get_upn
../libgpo/pygpo.c:352:5: warning: assignment makes pointer from
integer without a cast [-Wint-conversion]
dn = ads_get_dn(ads, talloc_tos(), res);
^
In file included from ../source3/include/ads.h:9:0,
from ../libgpo/gpo.h:23,
from ../libgpo/pygpo.c:23:
../libgpo/pygpo.c:354:22: error: ‘LDAP_NO_MEMORY’ undeclared (first
use in this function); did you mean ‘EAI_MEMORY’?
status = ADS_ERROR(LDAP_NO_MEMORY);
^
../source3/libads/ads_status.h:43:65: note: in definition of macro
‘ADS_ERROR_LDAP’
#define ADS_ERROR_LDAP(rc) ads_build_error(ENUM_ADS_ERROR_LDAP, rc, 0)
^~
../libgpo/pygpo.c:354:12: note: in expansion of macro ‘ADS_ERROR’
status = ADS_ERROR(LDAP_NO_MEMORY);
^~~~~~~~~
../libgpo/pygpo.c:358:7: warning: implicit declaration of function
‘ads_pull_uint32’; did you mean ‘ndr_pull_uint32’?
[-Wimplicit-function-declaration]
if (!ads_pull_uint32(ads, res, "userAccountControl", &uac)) {
^~~~~~~~~~~~~~~
ndr_pull_uint32
In file included from ../source3/include/ads.h:9:0,
from ../libgpo/gpo.h:23,
from ../libgpo/pygpo.c:23:
../libgpo/pygpo.c:359:22: error: ‘LDAP_NO_SUCH_ATTRIBUTE’ undeclared
(first use in this function); did you mean ‘Py_GCC_ATTRIBUTE’?
status = ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
^
../source3/libads/ads_status.h:43:65: note: in definition of macro
‘ADS_ERROR_LDAP’
#define ADS_ERROR_LDAP(rc) ads_build_error(ENUM_ADS_ERROR_LDAP, rc, 0)
^~
../libgpo/pygpo.c:359:12: note: in expansion of macro ‘ADS_ERROR’
status = ADS_ERROR(LDAP_NO_SUCH_ATTRIBUTE);
^~~~~~~~~
../libgpo/pygpo.c:376:2: warning: implicit declaration of function
‘ads_msgfree’ [-Wimplicit-function-declaration]
ads_msgfree(ads, res);
^~~~~~~~~~~
Waf: Leaving directory `/usr/local/src/samba-master/bin'
Build failed: -> task failed (err #1):
{task: cc pygpo.c -> pygpo_4.o}
make: *** [Makefile:8: all] Error 1
=============================================