Bug 1718113

Summary: samba fails to build with Python 3.8: AttributeError: module 'time' has no attribute 'clock'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: abokovoy, anoopcs, asn, gdeschner, jhrozek, jrivera, jstephen, lmohanty, lslebodn, madam, sbose, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-01 18:05:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1686977    

Description Miro Hrončok 2019-06-06 23:38:54 UTC
Even after patch from bz1711638 is applied, samba 2:4.10.4-1.fc31 fails to build with Python 3.8.0b1:

Traceback (most recent call last):
  File "/builddir/build/BUILD/samba-4.10.4/third_party/waf/waflib/Scripting.py", line 158, in waf_entry_point
  File "/builddir/build/BUILD/samba-4.10.4/third_party/waf/waflib/Scripting.py", line 251, in run_commands
    ctx = run_command(cmd_name)
  File "/builddir/build/BUILD/samba-4.10.4/third_party/waf/waflib/Scripting.py", line 235, in run_command
  File "/builddir/build/BUILD/samba-4.10.4/third_party/waf/waflib/Scripting.py", line 573, in execute
    return execute_method(self)
  File "/builddir/build/BUILD/samba-4.10.4/third_party/waf/waflib/Build.py", line 231, in execute
  File "/builddir/build/BUILD/samba-4.10.4/third_party/waf/waflib/Build.py", line 245, in execute_build
  File "/builddir/build/BUILD/samba-4.10.4/third_party/waf/waflib/Build.py", line 542, in pre_build
  File "./buildtools/wafsamba/samba_deps.py", line 1106, in check_project_rules
    tstart = time.clock()
AttributeError: module 'time' has no attribute 'clock'

Full logs at https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/samba/

time.clock was deprecated and now it is removed:

DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead

I suspect that other packages using wafsamba will have the same problem.


This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. The fix should be pushed on the master branch and no release bump is required.

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test in locally mock if your package builds with Python 3.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

This issue needs to be resolved by next week, if other rebuilds of Python 3.8 beta 1 go well. If this is unrealistic for you, let us know how much time you need.

If you don't have free cycles to dedicate fixing your package, notify us and we'll try to provide some pointers. Let us know if we can push a fix directly without a pull request, in the case we happen to have one before you do.


Comment 1 Miro Hrončok 2019-06-06 23:40:52 UTC
as expected, libtevent and others have the same failure

Comment 2 Miro Hrončok 2019-06-07 10:57:40 UTC
This includes libtalloc, libldb, libtdb, libtevent.

Comment 3 Lukas Slebodnik 2019-06-12 07:49:50 UTC
I cannot reproduce it with  @python/python3.8 

[MIRROR] python3-setuptools-41.0.1-1.fc31.noarch.rpm: Interrupted by header callback: Server reports Content-Length: 624 but expected size is: 655108                                     
[FAILED] python3-setuptools-41.0.1-1.fc31.noarch.rpm: No more mirrors to try - All mirrors were already tried without success                                                             
(113-114/142): python3-libs-3.8.0~b1-1.fc31.x86_64.rpm                     49% [===================================-                                     ] 2.3 GB/s |  53 MB     00:00 ETA
Error: Error downloading packages:
  Cannot download 00921258-python-setuptools/python3-setuptools-41.0.1-1.fc31.noarch.rpm: All mirrors were tried

Comment 4 Miro Hrončok 2019-06-12 08:36:36 UTC
mock -r ... --scrub=dnf-cache

Comment 5 Miro Hrončok 2019-06-17 09:45:22 UTC
This issue is blocking the Python 3.8 rebuilds. This package is critical for Fedora, unless this is resolved, we cannot proceed with the side tag merge.

Comment 6 Miro Hrončok 2019-06-30 00:14:21 UTC
Can we please get this fixed?

Comment 7 Andreas Schneider 2019-07-01 18:05:29 UTC
Pushed as b6c2e29b4aad8e46a38e859e858b9497a631daec