[Samba] Trying to build Samba from source on RHEL 8

Andrew Bartlett abartlet at samba.org
Wed Jun 7 09:25:26 UTC 2023


On Tue, 2023-06-06 at 17:29 +0000, Flynn, Garrett S     RTX via samba
wrote:
> Hi,
> 
> I'm trying to build Samba from source on a RHEL version 8 server.  I installed all the necessary packages and untarred the source for Samba version 4.6.10.
> In the past I have been able to successfully build and install Samba version 4.13.17 on a RHEL version 7 server with Python2.
> Here I believe I am using Python3, but I cannot seem to get past the configure command:
> 
> [root at v2ecsqapp09 samba-4.16.10]# ./configure
> Setting top to                           : /usr/local/src/Samba/samba-4.16.10
> Setting out to                           : /usr/local/src/Samba/samba-4.16.10/bin
> Checking for 'gcc' (C compiler)          : /bin/gcc
> Checking for program 'git'               : not found
> Checking for c flags '-MMD'              : Traceback (most recent call last):
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Utils.py", line 831, in wrap
>     return cache[k]
> KeyError: (<samba_waf18.ConfigurationContext object at 0x7f08a69dc160>,)
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Utils.py", line 831, in wrap
>     return cache[k]
> KeyError: (<samba_waf18.ConfigurationContext object at 0x7f08a69dc160>,)
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Context.py", line 296, in recurse
>     user_function(self)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Utils.py", line 833, in wrap
>     ret = fun(*k)
>   File "/usr/local/src/Samba/samba-4.16.10/buildtools/wafsamba/wscript", line 309, in configure
>     conf.load('gccdeps')
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Configure.py", line 271, in load
>     func(self)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/extras/gccdeps.py", line 226, in configure
>     conf.check(fragment='int main() { return 0; }', features='c force_gccdeps', cflags=flags, msg='Checking for c flags %r' % ''.join(flags))
>   File "./buildtools/wafsamba/samba_utils.py", line 66, in fun
>     return f(*k, **kw)
>   File "./buildtools/wafsamba/samba_waf18.py", line 177, in check
>     ret = self.run_build(*k, **kw)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Configure.py", line 317, in fun
>     return f(*k, **kw)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Configure.py", line 552, in run_build
>     h = Utils.h_list(buf)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Utils.py", line 608, in h_list
>     return md5(repr(lst).encode()).digest()
> TypeError: __init__() takes 1 positional argument but 2 were given
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Context.py", line 296, in recurse
>     user_function(self)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Utils.py", line 833, in wrap
>     ret = fun(*k)
>   File "/usr/local/src/Samba/samba-4.16.10/lib/replace/wscript", line 30, in configure
>     conf.RECURSE('buildtools/wafsamba')
>   File "./buildtools/wafsamba/samba_utils.py", line 66, in fun
>     return f(*k, **kw)
>   File "./buildtools/wafsamba/samba_utils.py", line 469, in RECURSE
>     return ctx.recurse(relpath)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Context.py", line 298, in recurse
>     self.post_recurse(node)
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Configure.py", line 285, in post_recurse
>     self.hash = Utils.h_list((self.hash, node.read('rb')))
>   File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Utils.py", line 608, in h_list
>     return md5(repr(lst).encode()).digest()
> TypeError: __init__() takes 1 positional argument but 2 were given

> I need to get this working to support a ClearCase environment and I would appreciate any advice.

I suspect, perhaps for reasons to support your other tools on the
system, the environment variable PYTHON is set, pointing to a python2
binary.  Try 'PYTHON= ./configure' and see if you get further, where it
will instead use the default python3 from the waf 'shebang'
(#!/usr/bin/env python3)

You will need to use 'PYTHON= make -j' as well

-- 
Andrew Bartlett (he/him)        https://samba.org/~abartlet/
Samba Team Member (since 2001)  https://samba.org
Samba Developer, Catalyst IT    https://catalyst.net.nz/services/samba




More information about the samba mailing list