When configuring samba 4.2.0 for building on a Linux host with system-mitkrb5 generates an error: Looking for kerberos features Checking for program krb5-config.heimdal : not found Checking for program krb5-config : /usr/bin/krb5-config Checking for /usr/bin/krb5-config : Traceback (most recent call last): File "./buildtools/bin/waf", line 76, in <module> Scripting.prepare(t, cwd, VERSION, wafdir) File "/sources/samba-4.2.0/buildtools/wafadmin/Scripting.py", line 145, in prepare prepare_impl(t, cwd, ver, wafdir) File "/sources/samba-4.2.0/buildtools/wafadmin/Scripting.py", line 135, in prepare_impl main() File "/sources/samba-4.2.0/wscript", line 345, in main wildcard_main(wildcard_cmd) File "./buildtools/wafsamba/samba_wildcard.py", line 110, in wildcard_main fun(ctx) File "/sources/samba-4.2.0/buildtools/wafadmin/Scripting.py", line 241, in configure conf.sub_config(['']) File "/sources/samba-4.2.0/buildtools/wafadmin/Configure.py", line 237, in sub_config self.recurse(k, name='configure') File "/sources/samba-4.2.0/buildtools/wafadmin/Utils.py", line 634, in recurse f(self) File "/sources/samba-4.2.0/wscript", line 142, in configure conf.PROCESS_SEPARATE_RULE('system_mitkrb5') File "./buildtools/wafsamba/samba_utils.py", line 656, in PROCESS_SEPARATE_RULE exec(compile(txt, file_path, 'exec'), dc) File "/sources/samba-4.2.0/wscript_configure_system_mitkrb5", line 25, in <module> package="", uselib_store="KRB5") File "/sources/samba-4.2.0/buildtools/wafadmin/Tools/config_c.py", line 245, in check_cfg ret = self.exec_cfg(kw) File "/sources/samba-4.2.0/buildtools/wafadmin/Tools/config_c.py", line 229, in exec_cfg parse_flags(ret, kw.get('uselib_store', kw['package'].upper()), kw.get('env', self.env)) File "./buildtools/wafsamba/samba_conftests.py", line 568, in samba_config_c_parse_flags linkflags.remove(x) NameError: global name 'linkflags' is not defined Configuring with: LD_LIBRARY_PATH=/tools/lib PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-logfilebase=/var/log/samba --with-piddir=/var/run --with-pammodulesdir=/lib/security --enable-fhs --with-statedir=/var/lib/samba --with-privatedir=/var/lib/samba/private --without-ad-dc --with-system --with-system-mitkrb5 Output of krb5-config --libs --cflags: -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib -lkrb5 -lk5crypto -lcom_err
(In reply to Sietse from comment #0) Just removing the linkflags.remove(x) line might fix, it seems to be a leftover while reworking the patch. Sorry for that!
Ha ! If it were that simple I wouldn't have been so upset (I already did that fix :-). This change probably fixes this specific bug, but cross-compiling using system-mitkrb5 is still broken. I'll open another bug with more details..
(In reply to Jeremy Allison from comment #2) > Ha ! If it were that simple I wouldn't have been so upset (I already did that > fix :-). > > This change probably fixes this specific bug, but cross-compiling using system-mitkrb5 is still broken. I'll open another bug with more details.. I don't see how this bug relates to cross-compiling in the first place. We should have a different bug (or several) for cross-compiling issues.
(In reply to Michael Adam from comment #3) It relates to cross-compiling as it's not writing the missing 'execute' test into the answers.txt file, which should be done by default on every test that needs executing to pass, which is what caused me to come across this problem. Anyway, the fix is to remove the erroneous linkflags.remove(x) line, which I'll propose to master and then attach to this bug in case it needs back-porting. I think the best thing to do for cross-compile is log each bug separately, until we have a working setup. If there are a lot of them I'll create a 'master' bug to contain a dependency list.
(In reply to Jeremy Allison from comment #4) > It relates to cross-compiling as it's not writing the missing 'execute' test > into the answers.txt file, which should be done by default on every test that > needs executing to pass, which is what caused me to come across this problem. Hmm, ok. So it is not cross-compile specific, but a general bug uncovered (for you) by the cross-build. I guess one should try the --cross-execute to use qemu instead to do the execute tests instead of --cross-answers to circumvent them, if at all possible. I played with it today and it worked quite nicely! > Anyway, the fix is to remove the erroneous linkflags.remove(x) line, which > I'll propose to master and then attach to this bug in case it needs > back-porting. good. > I think the best thing to do for cross-compile is log each bug separately, > until we have a working setup. If there are a lot of them I'll create a > 'master' bug to contain a dependency list. Sounds good. Thanks - Michael