Closed Bug 1628641 Opened 5 years ago Closed 5 years ago

Switch to python3 seems to have broken the Compiler database backend

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox77 fixed)

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: bbouvier, Assigned: bbouvier)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When I run Spidermonkey's configure with the compiler database backend enabled, with:

CC="clang" \
CXX="clang++" \
/home/ben/code/mozilla-inbound/js/src/configure \
    --enable-debug \
    --disable-optimize \
    --with-ccache \
    --without-intl-api \
    --enable-warnings-as-errors \
    --enable-linker=lld \
    --enable-build-backends=CompileDB,RecursiveMake

I get the following configure error:

  File "/home/ben/code/mozilla-inbound/js/src/../../configure.py", line 181, in <module>
    sys.exit(main(sys.argv))
  File "/home/ben/code/mozilla-inbound/js/src/../../configure.py", line 57, in main
    return config_status(config)
  File "/home/ben/code/mozilla-inbound/js/src/../../configure.py", line 176, in config_status
    return config_status(args=[], **normalize(sanitized_config))
  File "/home/ben/code/mozilla-inbound/python/mozbuild/mozbuild/config_status.py", line 148, in config_status
    the_backend.consume(definitions)
  File "/home/ben/code/mozilla-inbound/python/mozbuild/mozbuild/backend/base.py", line 144, in consume
    self.consume_finished()
  File "/home/ben/code/mozilla-inbound/python/mozbuild/mozbuild/compilation/database.py", line 88, in consume_finished
    for (directory, filename, unified), cmd in self._db.iteritems():
AttributeError: 'collections.OrderedDict' object has no attribute 'iteritems'

It seems iteritems() has been deprecated with Python 3, and the build system now uses Python 3, so that might be it.

Assignee: nobody → bbouvier
Status: NEW → ASSIGNED
Pushed by bbouvier@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/369961f46e1d Use OrderedDict.items() in place of Python 2's iteritems; r=sylvestre
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: