Closed Bug 1577749 Opened 5 years ago Closed 5 years ago

Busted build with sccache when using it with RUSTC_WRAPPER (AttributeError: 'ReadOnlyNamespace' object has no attribute 'splitext')

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox69 unaffected, firefox70 fixed)

RESOLVED FIXED
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox69 --- unaffected
firefox70 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

$ echo $RUSTC_WRAPPER                                                                                                                                                                                                                      
sccache
$ ./mach build                                                                                                                                                                                                                             
 Config object not found by mach.
 0:00.24 Clobber not needed.
 0:00.24 Adding make options from /home/emilio/src/moz/gecko-3/mozconfig
    AUTOCLOBBER=1
    MOZ_OBJDIR=/home/emilio/src/moz/gecko-3/obj-debug-noopt
    OBJDIR=/home/emilio/src/moz/gecko-3/obj-debug-noopt
    FOUND_MOZCONFIG=/home/emilio/src/moz/gecko-3/mozconfig
    export FOUND_MOZCONFIG
 0:00.25 /usr/bin/gmake -f client.mk -s configure
 0:00.25 cd /home/emilio/src/moz/gecko-3/obj-debug-noopt
 0:00.25 /home/emilio/src/moz/gecko-3/configure
 0:00.32 Reexecuting in the virtualenv
 0:00.42 Adding configure options from /home/emilio/src/moz/gecko-3/mozconfig
 0:00.42   --enable-debug
 0:00.42   --disable-optimize
 0:00.42   MOZCONFIGS=/home/emilio/.mozconfigs
 0:00.42 checking for vcs source checkout... git
 0:00.45 checking for a shell... /usr/bin/sh
 0:00.53 checking for host system type... x86_64-pc-linux-gnu
 0:00.53 checking for target system type... x86_64-pc-linux-gnu
 0:00.84 checking whether cross compiling... no
 0:00.92 checking for Python 3... /usr/bin/python3 (3.7.4)
 0:00.92 checking for git... /usr/bin/git
 0:00.92 checking for Git version... 2.21.0
 0:00.92 checking for sparse checkout... no
 0:00.92 checking for yasm... /usr/bin/yasm
 0:00.93 checking yasm version... 1.3.0
 0:00.93 Traceback (most recent call last):
 0:00.93   File "/home/emilio/src/moz/gecko-3/configure.py", line 164, in <module>
 0:00.93     sys.exit(main(sys.argv))
 0:00.93   File "/home/emilio/src/moz/gecko-3/configure.py", line 40, in main
 0:00.93     sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))
 0:00.93   File "/home/emilio/src/moz/gecko-3/python/mozbuild/mozbuild/configure/__init__.py", line 498, in run
 0:00.93     func(*args)
 0:00.93   File "/home/emilio/src/moz/gecko-3/python/mozbuild/mozbuild/configure/__init__.py", line 542, in _value_for
 0:00.93     return self._value_for_depends(obj)
 0:00.93   File "/home/emilio/src/moz/gecko-3/python/mozbuild/mozbuild/util.py", line 963, in method_call
 0:00.93     cache[args] = self.func(instance, *args)
 0:00.93   File "/home/emilio/src/moz/gecko-3/python/mozbuild/mozbuild/configure/__init__.py", line 551, in _value_for_depends
 0:00.93     value = obj.result()
 0:00.93   File "/home/emilio/src/moz/gecko-3/python/mozbuild/mozbuild/util.py", line 963, in method_call
 0:00.93     cache[args] = self.func(instance, *args)
 0:00.93   File "/home/emilio/src/moz/gecko-3/python/mozbuild/mozbuild/configure/__init__.py", line 157, in result
 0:00.93     return self._func(*resolved_args)
 0:00.93   File "/home/emilio/src/moz/gecko-3/python/mozbuild/mozbuild/configure/__init__.py", line 1149, in wrapped
 0:00.93     return new_func(*args, **kwargs)
 0:00.93   File "/home/emilio/src/moz/gecko-3/build/moz.configure/toolchain.configure", line 323, in check_sccache_version
 0:00.93     (os.path.splitext(os.path.basename(rustc_wrapper[0]))[0].lower() ==
 0:00.93 AttributeError: 'ReadOnlyNamespace' object has no attribute 'splitext'
 0:00.96 *** Fix above errors and then restart with\
 0:00.96                "./mach build"
 0:00.96 gmake: *** [client.mk:115: configure] Error 1
$ cat mozconfig                                                                                                                                                                                                                            
MOZCONFIGS=/home/emilio/.mozconfigs
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-debug
ac_add_options --disable-optimize
mk_add_options MOZ_OBJDIR=/home/emilio/src/moz/gecko-3/obj-debug-noopt

Looks like a regression from bug 1577351.

Assignee: nobody → emilio
Summary: Busted build with sccache (AttributeError: 'ReadOnlyNamespace' object has no attribute 'splitext') → Busted build with sccache when using it with RUSTC_WRAPPER (AttributeError: 'ReadOnlyNamespace' object has no attribute 'splitext')

Chris, if you could sanity-check the patch it'd be appreciated. After discussing with jwatt I think we should land this to not make other people spend time on it :)

Flags: needinfo?(cmanchester)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd8cfdc6b5b3 Fix check_sccache_version when using RUSTC_WRAPPER. r=jwatt
Pushed by cbrindusan@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/92c38343d239 Fix check_sccache_version when using RUSTC_WRAPPER. r=jwatt a=Aryx

I guess given this went to central we can call this FIXED.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

The fix is good. Thank you for the patch!

Flags: needinfo?(cmanchester)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: