Created attachment 9076 [details] c source file generated by configure to check for ldap_initialize Samba version 4.0.7 Aix 6.1 Compiler: IBM xlc Last lines of "./configure" output: Checking for ldap_init : not found Checking for ldap_init_fd : not found Checking for ldap_initialize : not found Checking for ldap_set_rebind_proc : not found Checking for ldap_add_result_entry : ok Checking whether ldap_set_rebind_proc takes 3 arguments : ok Active Directory support not available: LDAP support ist not available. <path>/wscript:760: error: Active Directory support not found. Use --without-ads for building without Active Directory support. Cause: the generated "test.c" file used in configure checks doesn't have the following required ldap include: #include <ldap.h> The compilation gives the following error "test.c", line 826.39: 1506-045 (S) Undeclared identifier ldap_initialize. After having extracted the test.c file , added the missing include, it compiles just fine
Hi Gilles, I'm currently in vacation but will be back at work on Monday August 5, 2013. I'm running Samba on AIX (5.3, 6.1 and 7.1) and compile it with XL C/C++. What is your compilation procedure which produce the following errors? (env. variable, configure options, etc.) What do you have on your system? IBM Tivoli Directory Server/Client? OpenLDAP? Something else? Best regards, Yannick Bergeron
2013/8/3 <samba-bugs@samba.org> > > I'm currently in vacation but will be back at work on Monday August 5, 2013. > I'm running Samba on AIX (5.3, 6.1 and 7.1) and compile it with XL C/C++. > What is your compilation procedure which produce the following errors? (env. > variable, configure options, etc.) > What do you have on your system? IBM Tivoli Directory Server/Client? OpenLDAP? > Something else? I'm created a separate samba projet tree using it's own dedicated openldap (2.4.26) source tree. All samba dependencies (like openssl, openldap) are all installed under a dedicated common prefix. You should be able to easily reproduce the bug. (Maybe it's not present when using another version of openldap) When waf version of "configure" tries to check for the availability of "ldap_set_rebind_proc" API it uses the attached .c file With my setup, a compile and link done with the following command fails when the includes (ldap.h and lber.h) are commented out: PREFIX=<install_directory_path_here> # openldap and openssl installed there, also "--prefix" of samba install > xlc -I$PREFIX/include/ -L$PREFIX/lib -lldap -llber -lcrypto -lssl -o a.out test.c "test.c", line 829.39: 1506-045 (S) Undeclared identifier ldap_set_rebind_proc. The *same* commands runs without error after having un-commented the two includes lines (ldap.h and lper.h) inside test.c
Created attachment 9110 [details] test.c
I have the same problem with AIX 7.1 Samba version 4.1.4 openldap 2.4.39 what is the correct procedure here? should I open a new bug?
Created attachment 9750 [details] ldap_init(ialize) not found config.log after these messages: Checking for header ldap.h : yes Checking for header lber.h : yes Checking for header ldap_pvt.h : no Checking for ber_tag_t : ok Checking for library lber : yes Checking for ber_scanf : ok Checking for ber_sockbuf_add_io : ok Checking for variable LDAP_OPT_SOCKBUF : ok Checking for variable LBER_OPT_LOG_PRINT_FN : ok Checking for library ldap : yes Checking for ldap_init : not found Checking for ldap_init_fd : not found Checking for ldap_initialize : not found Checking for ldap_set_rebind_proc : not found Checking for ldap_add_result_entry : ok Checking whether ldap_set_rebind_proc takes 3 arguments : ok Active Directory support not available: LDAP support ist not available. /usr/samba-4.1.5/source3/wscript:753: error: Active Directory support not found. Use --without-ads for building without Active Directory support.
i don't have a aix box for testing any more. we also don't have any aix box in the build farm. to get aix build work again we a aix machine in the buildfarm and a possibility for us to log in would be very helpful. finally we would also have space for a donated box in the server room here if remote login is more problematic :-)
Configure, possible false negative on AIX 7.1.3, ldap_init not found AIX Version: 7100-03-05-1524 XLC Version: 13.01.0003.0000 Samba Version: 4.3.5 OpenLDAP Version: 2.4.43 Checking for header ldap.h : yes Checking for header lber.h : yes [...] Checking for library ldap : yes Checking for ldap_init : not found Checking for ldap_init_fd : not found Checking for ldap_initialize : not found Checking for ldap_set_rebind_proc : not found Checking for ldap_add_result_entry : ok Checking whether ldap_set_rebind_proc takes 3 arguments : ok /usr/src/samba-4.3.5/source3/wscript:700: error: LDAP support not found. Try installing libldap2-dev or openldap-devel. Otherwise, use --without-ldap to build without LDAP support. LDAP support is required for the LDAP passdb backend, LDAP idmap backends and ADS. ADS support improves communication with Active Directory domain controllers. Configure can't find ldap_init, ldap_init_fd, ldap_initialize and ldap_set_rebind_proc but is able to find ldap.h, lber.h, etc. bin/config.log reveals that when it tries to compile their test, ld can't find any of lber's symbols. Adding lber as a library in CHECK_FUNCS_IN fixes the problem (see patch). I don't see why lber is required here, could this be my openldap that's not properly built? ld: 0711-317 ERROR: Undefined symbol: .ber_sockbuf_ctrl ld: 0711-317 ERROR: Undefined symbol: .ber_memalloc_x ld: 0711-317 ERROR: Undefined symbol: ber_pvt_log_print [...] The patch might also resolve Bug 7467.
Created attachment 11865 [details] Proposed patch
this patch is not enough and this is also not really a AIX specific issue, it's a generic waf configure issue imho. On AIX (like on some other platforms) openldap is always a third party installed library, so that the specific compiler and linker flags need to be used for exactly that specific openldap installation. And in the waf build the ldap library specific flags need to be used at all the places where they are needed (but not globally). Some brainstorming: The flags needed for ldap (and other library) support should probably extracted from a pkg-config file. For libraries (like openldap) which don't ship with pkg-config files we might just ship out own pkg-config file, which returns the flags that we currently use by default now anyway. Someone with special needs for his ldap library installation can then just adopt that file.