waf, PYTHONHASHSEED & -I order on other architectures

Michael Tokarev mjt at tls.msk.ru
Tue May 10 09:19:05 UTC 2022

10.05.2022 02:24, Thomas Nagy via samba-technical wrote:
> About the guts of waf:
> When changing the PYTHONHASHSEED value in the Makefile and adding traces (--zones=deps):
> """
> WAF_BINARY=$(PYTHON) ./buildtools/bin/waf --zones=deps
> """
> A full rebuild is observed here. The library link order changes as reflected by the traces below:

As I already wrote in another email, it is not "just" the link order.
Well, it is, but sometimes it even produces an executable (or a library)
which starts but crashes later.  We have such a broken build of samba in
debian i386 stable right now - at the time we didn't know about this
PYTHONHASHSEED thing at all, so it was a random thing, and one of the
values it choosen resulted in a broken build with us puzzled entirely,
thinking it is due to some 32/64 bit issue.

> They take their origin in the file buildtools/wafsamba/samba_deps.py before reaching the Waf parts. That file contains a significant amount of non-trivial set() operations.


> Even if a hash seed is provided, the link order may change with a new Python version or on a different operating system.

And it *does* change with different python version and on different
architectures as I already mentioned in this thread.  It did change
when switching from pythin3.9 to 3.10 too, and here it is the sparc64
build which does not work at all.


More information about the samba-technical mailing list