Closed Bug 1506380 Opened 7 years ago Closed 7 years ago

Build failure because js/src/vm/opcode.py conflicts with Python's opcode module

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: ptomato, Assigned: ptomato)

Details

Attachments

(1 file)

Python has a built-in opcode module, apparently in both Python 2 and 3: https://github.com/python/cpython/blob/master/Lib/opcode.py Here's the build failure I get, when building standalone SpiderMonkey: js/src/build/spidermonkey_checks.stub /Users/ptomato/Documents/Coding/gecko-dev/js/src/_build-chk/_virtualenvs/init/bin/python -m mozbuild.action.file_generate /Users/ptomato/Documents/Coding/gecko-dev/config/run_spidermonkey_checks.py main spidermonkey_checks .deps/spidermonkey_checks.pp .deps/spidermonkey_checks.stub libjs_static.a /Users/ptomato/Documents/Coding/gecko-dev/config/check_spidermonkey_style.py /Users/ptomato/Documents/Coding/gecko-dev/config/check_macroassembler_style.py /Users/ptomato/Documents/Coding/gecko-dev/config/check_js_opcode.py TEST-PASS | check_spidermonkey_style.py | ok TEST-PASS | check_macroassembler_style.py | ok TEST-UNEXPECTED-FAIL | check_js_opcode.py | 'module' object has no attribute 'get_opcodes' Traceback (most recent call last): File "/Users/ptomato/jhbuild/install/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Users/ptomato/jhbuild/install/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/ptomato/Documents/Coding/gecko-dev/python/mozbuild/mozbuild/action/file_generate.py", line 110, in <module> sys.exit(main(sys.argv[1:])) File "/Users/ptomato/Documents/Coding/gecko-dev/python/mozbuild/mozbuild/action/file_generate.py", line 70, in main ret = module.__dict__[method](output, *args.additional_arguments, **kwargs) File "/Users/ptomato/Documents/Coding/gecko-dev/config/run_spidermonkey_checks.py", line 15, in main raise Exception(script + " failed") Exception: /Users/ptomato/Documents/Coding/gecko-dev/config/check_js_opcode.py failed make[3]: *** [.deps/spidermonkey_checks.stub] Error 1 On investigation, it looks like this code... sys.path.insert(0, os.path.join(topsrcdir, 'js', 'src', 'vm')) import opcode try: opcode.get_opcodes(topsrcdir) except Exception as e: log_fail(e.args[0]) return False ...is importing Python's builtin opcode module.
Assignee: nobody → philip.chimento
Status: NEW → ASSIGNED
Keywords: checkin-needed
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40399d94b5da Rename opcode.py to avoid conflict with builtin Python module. r=arai
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: