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

Robert Marcano robert at marcanoonline.com
Tue Jun 6 17:40:45 UTC 2023


On 6/6/23 1:29 PM, 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:

If you found the Samba tarball inside the SRPM and tried to built that, 
you are building the standard Samba sources. Red Hat doesn't modify the 
original sources when creating an RPM, the RPM contain patches de 
distribution adds on top of the original sources in order to fix build 
problems when building it, or to backport patches, etc.

If you install the SRPM, the entire sources, patche, extra files and the 
SPEC file (that contains the instructions of how the RPM was build), the 
location of all that wiil be inside directories inside the result of

   rpm --eval %{_topdir}

If you want the exact same version and patches thet Red Hat distributes, 
you will need to red the SPEC file, and maybe patch it to you liking and 
rebuild the RPM is my recommendation.

What you are doing probably is no different that getting the sources 
from Samba servers and trying to build that.

> 
> [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
> 
> 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/wscript", line 163, in configure
>      conf.RECURSE('lib/replace')
>    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
> 
> 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/Scripting.py", line 159, in waf_entry_point
>      run_commands()
>    File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Scripting.py", line 255, in run_commands
>      ctx = run_command(cmd_name)
>    File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Scripting.py", line 239, in run_command
>      ctx.execute()
>    File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Configure.py", line 159, in execute
>      super(ConfigurationContext, self).execute()
>    File "/usr/local/src/Samba/samba-4.16.10/third_party/waf/waflib/Context.py", line 214, in execute
>      self.recurse([os.path.dirname(g_module.root_path)])
>    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.
> 
> 
> Thanks,
> Garrett




More information about the samba mailing list