Bug 13273 - Build breaks if ads is disabled (--without-ads)
Summary: Build breaks if ads is disabled (--without-ads)
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.7.4
Hardware: All All
: P5 regression (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
: 13333 (view as bug list)
Depends on:
Reported: 2018-02-14 12:55 UTC by Daubert, Jürgen
Modified: 2018-04-25 06:37 UTC (History)
5 users (show)

See Also:

samba-4.7.4-no_ads.patch (603 bytes, patch)
2018-03-14 15:47 UTC, Lars Wendler
no flags Details
Patch for v4-6-test (1.08 KB, patch)
2018-04-17 06:10 UTC, Stefan Metzmacher
vl: review+
Patch for v4-7-test (1.08 KB, patch)
2018-04-17 06:11 UTC, Stefan Metzmacher
vl: review+
Patch for v4-8-test (1.08 KB, patch)
2018-04-17 06:12 UTC, Stefan Metzmacher
vl: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Daubert, Jürgen 2018-02-14 12:55:04 UTC
I get the following error while trying to build samba 4.7.4 and newer:

    [2948/3058] Linking default/source4/auth/ntlm/libauth4-samba4.so
    default/source3/libads/kerberos_keytab_63.o: In function `ads_keytab_list':
    kerberos_keytab.c:(.text+0x155): undefined reference to `ads_keytab_open'
    collect2: error: ld returned 1 exit status

I did some investigations and found out that the patch introduced with bug:
and commit:

is the reason for the build error above if ads is disabled with --without-ads

My configuration:

    ./configure --enable-fhs \
                --prefix=/usr \
                --libexecdir=/usr/lib \
                --localstatedir=/var \
                --sysconfdir=/etc \
                --with-privatedir=/etc/samba/private \ 
                --bundled-libraries=!tdb,!talloc,!tevent,!popt \
                --without-{ad-dc,ads,ldap,pam} \

    python ./buildtools/bin/waf build --jobs=6 

Comment 1 Lars Wendler 2018-03-14 15:47:21 UTC
Created attachment 14049 [details]

This has already been reported in the samba-technical mailing list along with a possible fix:


The attached patch is the fix provided by Timur I. Bakeyev <timur@freebsd.org> in that mail. I am not(!) the author of the patch.
Comment 2 Stefan Metzmacher 2018-03-22 09:25:16 UTC
*** Bug 13333 has been marked as a duplicate of this bug. ***
Comment 3 bugs 2018-04-14 11:52:02 UTC
(In reply to Lars Wendler from comment #1)
I guess this is to be marked as wont fix, I note another samba release couple days ago and still broken after 6 months (4.6.11 was last compilable version), if this is case please mark it as such, so we can take appropriate action,like move back to windows servers.
Comment 4 Stefan Metzmacher 2018-04-17 06:10:56 UTC
Created attachment 14144 [details]
Patch for v4-6-test
Comment 5 Stefan Metzmacher 2018-04-17 06:11:53 UTC
Created attachment 14145 [details]
Patch for v4-7-test
Comment 6 Stefan Metzmacher 2018-04-17 06:12:34 UTC
Created attachment 14146 [details]
Patch for v4-8-test
Comment 7 bugs 2018-04-17 12:46:29 UTC
Patch applied against 4.7.7
Patch applies cleanly
configure succeeded
make  succeeded   :)

Thanks, hope this makes it into next releases
Comment 8 bugs 2018-04-17 12:52:37 UTC
was applied against 4.7.6
Comment 9 bugs 2018-04-18 04:30:10 UTC
Now applied to the just released  4.7.7
Build succeeds, thanks.
Comment 10 Karolin Seeger 2018-04-19 09:31:37 UTC
Pushed to autobuild-v4-[8,7]-test.
Comment 11 Karolin Seeger 2018-04-25 06:37:24 UTC
(In reply to Karolin Seeger from comment #10)
Pushed to both branches.
Closing out bug report.