Samba build error: module 'time' has no attribute 'clock'

Andrew Bartlett abartlet at samba.org
Wed Jan 26 21:02:11 UTC 2022


https://docs.python.org/3.7/library/time.html#time.clock

Deprecated since version 3.3, will be removed in version 3.8: The
behaviour of this function depends on the platform: use
perf_counter() or process_time() instead, depending on your
requirements, to have a well defined behaviour.

Python hasn't learnt the lesson from their previous removals (which
thankfully were caught pre-release) it seems. 

See https://bugs.python.org/issue37330 for another example.

Andrew Bartlett

On Wed, 2022-01-26 at 14:06 -0600, Steve French wrote:
> And same error with default "./configure"
> 
> On Wed, Jan 26, 2022 at 2:05 PM Steve French <smfrench at gmail.com>
> wrote:
> > I cloned jra's tree to fresh tree (master-smb2 branch) and get this
> > error on build:
> > 
> > Checking for python version >= 2.6.0
> >            : 3.9.7
> > python-config
> >            : /usr/bin/python3-config
> > Asking python-config for pyembed '--cflags --libs --ldflags' flags
> >            : yes
> > Testing pyembed configuration
> >            : Could not build a python embedded interpreter
> > Testing pyembed configuration
> >            : Could not build a python embedded interpreter
> > The configuration failed
> > (complete log in /home/smfrench/jra/samba/bin/config.log)
> > PYTHONHASHSEED=1 WAF_MAKE=1  ./buildtools/bin/waf build
> > The project was not configured: run "waf configure" first!
> > 
> > (Running waf configure directly gets a similar error)
> > 
> > Checking for python version >= 2.6.0
> >            : 3.9.7
> > python-config
> >            : /usr/bin/python3-config
> > Asking python-config for pyembed '--cflags --libs --ldflags' flags
> >            : yes
> > Testing pyembed configuration
> >            : Could not build a python embedded interpreter
> > Testing pyembed configuration
> >            : Could not build a python embedded interpreter
> > The configuration failed
> > (complete log in /home/smfrench/jra/samba/bin/config.log)
> > 
> > The command being run was:
> > ./configure --without-pam --without-ldap --without-winbind
> > --without-ads --without-ad-dc
> > 
> > On Wed, Jan 26, 2022 at 11:57 AM Andrew Bartlett <
> > abartlet at samba.org> wrote:
> > > On Wed, 2022-01-26 at 11:40 -0600, Steve French via samba-
> > > technical
> > > wrote:
> > > > Not having much luck building Jeremy's master-smb2 branch (
> > > > 
> > > > https://git.samba.org/?p=jra/samba/.git;a=shortlog;h=refs/heads/master-smb2)
> > > > 
> > > > on Ubuntu
> > > > 
> > > > 
> > > > 
> > > > Anyone recognize this Samba build error and how to fix it?
> > > 
> > > Try with a very clean tree, if you haven't built Samba for a very
> > > long
> > > time.
> > > 
> > > We had a Samba python file called time.py that could therefore
> > > jump in
> > > front of the system time, but I never saw it cause build
> > > errors.  We
> > > renamed it a long while back, but an old .pyc file could be the
> > > issue.
> > > 
> > > Andrew Bartlett
> > > 
> > > --
> > > Andrew Bartlett (he/him)       https://samba.org/~abartlet/
> > > Samba Team Member (since 2001) https://samba.org
> > > Samba Team Lead, Catalyst IT   
> > > https://catalyst.net.nz/services/samba
> > > 
> > > Samba Development and Support, Catalyst IT - Expert Open Source
> > > Solutions
> > > 
> > 
> > --
> > Thanks,
> > 
> > Steve
> 
> 
-- 
Andrew Bartlett (he/him)       https://samba.org/~abartlet/
Samba Team Member (since 2001) https://samba.org
Samba Team Lead, Catalyst IT   https://catalyst.net.nz/services/samba

Samba Development and Support, Catalyst IT - Expert Open Source
Solutions








More information about the samba-technical mailing list