On 01/30/2018 09:31 AM, Thomas Seeling wrote:
Hallo,


I tried to compile the current samba 4.7 according to BLFS instructions.

OpenLDAP and MIT-kbr5 are recommended because significant functionality is lost without them (participation in an AD environment).

I used the configure switches from the book (plus some more definitions
for directories I'd like to have differently set) and it looks like it
fails for some AD / LDAP libraries ... although the configure switches
disable LDAP and AD functionality.

[2992/3122] Linking default/source3/libads-samba4.so
default/source3/libads/kerberos_keytab_63.o: In function `ads_keytab_list':
kerberos_keytab.c:(.text+0xde): undefined reference to `ads_keytab_open'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/mnt/5/sources/samba-4.7.4/bin'
Build failed:  -> task failed (err #1):
        {task: cc_link
ldap_63.o,sasl_63.o,sasl_wrapping_63.o,krb5_setpw_63.o,kerberos_util_63.o,ldap_user_63.o,ads_struct_63.o,kerberos_keytab_63.o,disp_sec_63.o,ldap_utils_63.o,ldap_schema_63.o,util_63.o,ndr_63.o,namequery_dc_104.o,trustdom_cache_104.o,dsgetdcname_104.o
-> libads-samba4.so}
make: *** [Makefile:8: all] Error 1

Anyone encountered this already?


<snip>

--without-ads
--without-ldap

For right now, these switches are simply not valid with current samba. There was a proposed patch on blfs-dev a few days ago (but krb5 is still required). http://samba.2283325.n4.nabble.com/Fix-compilation-of-Samba-4-7-4-with-disabled-ADS-td4728041.html has one proposed fix, but best is in the response to wrap the whole thing in #ifdef HAVE_ADS as below:

dj@lfsdt2 [ /sources/samba-4.7.4 ]$ diff -au source3/libads/kerberos_keytab.c{.orig,} --- source3/libads/kerberos_keytab.c.orig 2018-01-30 21:37:06.823617321 -0600
+++ source3/libads/kerberos_keytab.c    2018-01-30 21:38:20.840536661 -0600
@@ -30,8 +30,6 @@
 #include "ads.h"
 #include "secrets.h"

-#ifdef HAVE_KRB5
-
 #ifdef HAVE_ADS

 /* This MAX_NAME_LEN is a constant defined in krb5.h */
@@ -614,7 +612,6 @@
        return ret;
 }

-#endif /* HAVE_ADS */

 /**********************************************************************
  List system keytab.
@@ -716,4 +713,4 @@
        return ret;
 }

-#endif /* HAVE_KRB5 */
+#endif /* HAVE_ADS */
dj@lfsdt2 [ /sources/samba-4.7.4 ]$

Please note that I haven't tried this, and am not suggesting that it is a great idea to install a crippled samba, but I've recited the mantra and did the above. :-)

--DJ

--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to