Bug 13401 - libgpo/pygpo.c: fatal error: use of undeclared identifier 'LDAP_SCOPE_SUBTREE'
Summary: libgpo/pygpo.c: fatal error: use of undeclared identifier 'LDAP_SCOPE_SUBTREE'
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.8.0
Hardware: x64 Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-24 16:54 UTC by Ruga
Modified: 2018-06-13 11:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruga 2018-04-24 16:54:43 UTC
The following compilation error occurs when the source is configured "--without-ldap". The author didn't expect that someone would compile it without LDAP support. 

[1917/3307] Compiling source3/auth/auth_unix.c
[1918/3307] Compiling libgpo/pygpo.c
../libgpo/pygpo.c:340:11: warning: implicit declaration of function 'ads_do_search_all' is invalid in C99 [-Wimplicit-function-declaration]
        status = ads_do_search_all(ads, ads->config.bind_path,
                 ^
../libgpo/pygpo.c:341:8: fatal error: use of undeclared identifier 'LDAP_SCOPE_SUBTREE'
                                   LDAP_SCOPE_SUBTREE, filter, attrs, &res);
                                   ^
1 warning and 1 error generated.
Waf: Leaving directory `/opt/src/samba-4.8.0/bin'
Build failed:  -> task failed (err #1): 
        {task: cc pygpo.c -> pygpo_3.o}
make: *** [all] Error 1
Comment 1 Ruga 2018-04-24 18:11:24 UTC
Problem solved with "--disable-python".
Comment 2 Andrew Bartlett 2018-06-13 11:49:08 UTC
(In reply to Ruga from comment #1)
Fixed in master with a222b7506b53e689708834237f18877231dca589 for Samba 4.9.

The fix is pretty blunt, it just moves the issue to the python layer which now will find these functions missing. 

A log term fix is what you suggest, make --without-ldap require --without-python.