[PATCH] waf: Fix the build on openbsd

Thomas Nagy tnagy1024 at gmail.com
Sat Mar 7 07:42:54 MST 2015

On Fri, Mar 6, 2015 at 11:33 AM, Andrew Bartlett wrote:
> On Mon, 2015-02-02 at 21:11 +0100, Volker Lendecke wrote:
>> Hi!
>> Review&push appreciated!
>> Thanks,
>> Volker
> Volker,
> With current master, I can't build on OpenBSD.  I get
> /usr/bin/ld: cannot find -lsmbconf
> collect2: ld returned 1 exit status
> Waf: Leaving directory `/home/abartlet/samba/bin'
> Build failed:  -> task failed (err #1):
>         {task: cc_link version_test_213.o -> versiontest}
> *** Error 1 in /home/abartlet/samba (Makefile:8 'all')
> Is that the error you got when you built with this fix, or is this
> something else?
> (My background here is that I've been asked to review the patch to
> migrate us to waf 1.8, and I certainly wouldn't want to be party to a
> regression in this area)

Regarding the waf 1.8 transition, the patches in question are attached
to this message; their goal is to have the wscript files unmodified
when performing changes on the wafsamba and waf files. Tracking
changes will be much easier without having to constantly merge the
wscript files. The other changes from the waf 1.5 repository are bug
fixes that convey no significant benefits for Samba; they can be
excluded for the time being.

I wrote a proof of concept for building samba with Python 3, but there
are a few questions regarding the wafsamba files. Since the waf 1.8
files are written in Python 2.7-3.x syntax, the waf library typically
unpacks and modifies itself in order to support Python 2.5 and 2.6.
Since the Samba build relies on python files in the wafsamba folder,
these files will need to be updated to the Python 3 exception handling
syntax. There is therefore a decision to make on the minimum Python
version supported:
A. Python 2.6 may become the minimum supported version for building Samba.
B. Or it could make sense to leverage the waf library unpacking
mechanism to have the wafsamba files modified for Python 2.5 as well
(move the python files files under a folder called waflib/extras/).
Creating a custom waf file for Python 2.5 could be provided for
convenience if someone actually needs them.
C. Or, the the waf 1.5 files could live side-by-side with the waf 1.8
ones (branching by abstraction). This would also require to move the
wafsamba files under waflib/extras/ and have a second folder, but this
would address all regression concerns. When the waf build was
introduced it was not perfect from day 1.

I could continue with my proof of concept for building samba with waf
1.8, but I would like to have the points above addressed first
(patches + questions).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Transition-to-waf-1.8-replaced-on_results-by-update_.patch
Type: text/x-patch
Size: 5690 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150307/597c658f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Transition-to-waf-1.8-wrap-conf.check_cfg-to-make-it.patch
Type: text/x-patch
Size: 6516 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150307/597c658f/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Transition-to-waf-1.8-Remove-PYTHONDIR-and-PYTHONARC.patch
Type: text/x-patch
Size: 2260 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150307/597c658f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Transition-to-waf-1.8-future-proof-default-prefix-se.patch
Type: text/x-patch
Size: 1692 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150307/597c658f/attachment-0003.bin>

More information about the samba-technical mailing list