Bug 12395 - Build of Samba on Debian Testing fails in configure phase.
Summary: Build of Samba on Debian Testing fails in configure phase.
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: unspecified
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2016-10-28 11:21 UTC by Peter Serbe
Modified: 2016-11-17 07:49 UTC (History)
3 users (show)

See Also:

Proposed patch for master and other releases (982 bytes, patch)
2016-10-28 17:50 UTC, Andrew Bartlett
no flags Details
Patch for 4.4 and 4.5 (1.31 KB, patch)
2016-11-15 00:23 UTC, Martin Schwenke
abartlet: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Serbe 2016-10-28 11:21:22 UTC
An update of Debian Testing within the last two month did break the build process of Samba. I use to configure Samba-4.5.1 by this command:

./configure --prefix=/usr/local/samba \
            --with-piddir=/usr/local/samba/var/run \
            --with-syslog \
            --with-quotas \
            --with-acl-support \
            --enable-debug \
            --enable-cups \
            --enable-selftest \
            --with-ads \

But after a short while this stops throwing an error:
Checking for perl 5.0.0                                                          
: ok 5.24.1
Checking for perl $Config{vendorprefix}:                                         
: '/usr'
: '${LIBDIR}/perl5'
: '${DATADIR}/perl5'
Traceback (most recent call last):
  File "./buildtools/bin/waf", line 76, in <module>
    Scripting.prepare(t, cwd, VERSION, wafdir)
  File "/usr/src/samba/samba-4.5.1/third_party/waf/wafadmin/Scripting.py", line
  145, in prepare
    prepare_impl(t, cwd, ver, wafdir)
  File "/usr/src/samba/samba-4.5.1/third_party/waf/wafadmin/Scripting.py", line
  135, in prepare_impl
  File "/usr/src/samba/samba-4.5.1/wscript", line 347, in main
  File "./buildtools/wafsamba/samba_wildcard.py", line 110, in wildcard_main
  File "/usr/src/samba/samba-4.5.1/third_party/waf/wafadmin/Scripting.py", line
  241, in configure
  File "/usr/src/samba/samba-4.5.1/third_party/waf/wafadmin/Configure.py", line
  237, in sub_config
    self.recurse(k, name='configure')
  File "/usr/src/samba/samba-4.5.1/third_party/waf/wafadmin/Utils.py", line 656,
  in recurse
  File "/usr/src/samba/samba-4.5.1/wscript", line 103, in configure
  File "./buildtools/wafsamba/samba_perl.py", line 52, in SAMBA_CHECK_PERL
ValueError: list.remove(x): x not in list

I did test this on an AMD64 machine and on a ARM, i.e. it is platform independent. The same error is thrown when compiling Samba-4.5.0 - despite of the fact, that it did compile two month ago when 4.5.0 was released. Therefore I conclude that an update in Debian testing is responsible for breaking it without knowing exactly what or when it did break.
Comment 1 Andrew Bartlett 2016-10-28 17:50:56 UTC
Created attachment 12607 [details]
Proposed patch for master and other releases

The fix is pretty simple, I expect this will get into master soon.
Comment 2 Peter Serbe 2016-10-29 03:19:35 UTC
Thank You for the patch Andrew! It works like a charm. 
I have two file servers, both under Debian testing. The compilation now works on both, but the main server still has issues. As the second server works fully OK, for me it looks like the patch is fully working.
Comment 3 Martin Schwenke 2016-11-15 00:23:23 UTC
Created attachment 12664 [details]
Patch for 4.4 and 4.5
Comment 4 Andrew Bartlett 2016-11-15 00:33:48 UTC
Comment on attachment 12664 [details]
Patch for 4.4 and 4.5

Thanks.  Sorry for not doing this earlier.
Comment 5 Martin Schwenke 2016-11-15 00:43:17 UTC
It's OK.  I just ran into it again and wondered what happened, so I thought I would move it along.  :-)

Karolin, this is ready for both 4.4 and 4.5 - same patch applies.

Comment 6 Karolin Seeger 2016-11-16 07:36:13 UTC
(In reply to Martin Schwenke from comment #5)
Pushed to autobuild-v4-{5,4}-test.
Comment 7 Karolin Seeger 2016-11-17 07:49:02 UTC
(In reply to Karolin Seeger from comment #6)
Pushed to both branches.
Closing out bug report.