Closed Bug 1621753 Opened 2 years ago Closed 2 years ago

build with --enable-stdcxx-compat fails with python errors

Categories

(Firefox Build System :: General, defect)

76 Branch
x86_64
Linux
defect
Not set
normal

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mac198442, Assigned: rstewart)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Tried to build with --enable-stdcxx-compat with a system that ended up building in dependencies not permitted

Actual results:

Got a slew of python errors as follows:

111:06.13 Traceback (most recent call last):
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 311, in checks
111:06.13 c(target, binary)
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 188, in check_glibc
111:06.13 check_dep_versions(target, binary, 'libc', 'GLIBC', GLIBC_MAX_VERSION)
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 174, in check_dep_versions
111:06.13 ' {} ({})'.format(s['name'], s['version']) for s in unwanted
111:06.13 RuntimeError: We do not want these libc symbol versions to be used:
111:06.13 memcpy (GLIBC_2.14)
111:06.13 During handling of the above exception, another exception occurred:
111:06.13 Traceback (most recent call last):
111:06.13 File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
111:06.13 "main", mod_spec)
111:06.13 File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
111:06.13 exec(code, run_globals)
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 359, in <module>
111:06.13 sys.exit(main(sys.argv[1:]))
111:06.13 Traceback (most recent call last):
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 311, in checks
111:06.13 c(target, binary)
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 188, in check_glibc
111:06.13 check_dep_versions(target, binary, 'libc', 'GLIBC', GLIBC_MAX_VERSION)
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 174, in check_dep_versions
111:06.13 ' {} ({})'.format(s['name'], s['version']) for s in unwanted
111:06.13 RuntimeError: We do not want these libc symbol versions to be used:
111:06.13 memcpy (GLIBC_2.14)
111:06.13 During handling of the above exception, another exception occurred:
111:06.13 Traceback (most recent call last):
111:06.13 File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
111:06.13 "main", mod_spec)
111:06.13 File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
111:06.13 exec(code, run_globals)
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 359, in <module>
111:06.13 sys.exit(main(sys.argv[1:]))
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 353, in main
111:06.13 return checks(HOST, options.binary)
111:06.13 File "/home/<user>/mozilla/test/python/mozbuild/mozbuild/action/check_binary.py", line 318, in checks
111:06.13 .format(name, basename, e.message),
111:06.13 AttributeError: 'RuntimeError' object has no attribute 'message'

Expected results:

Should have got the error:

TEST-UNEXPECTED-FAIL | check_glibc | brotli | We do not want these libc symbol versions to be used:
94:18.02 memcpy (GLIBC_2.14)

OS: Unspecified → Linux
Regressed by: 1620744
Hardware: Unspecified → x86_64
Has Regression Range: --- → yes
Keywords: regression

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → General
Product: Firefox → Firefox Build System

hg bisect found:

The first bad revision is:
changeset: 517902:3bc8fda68107
user: Mike Shal <mshal@mozilla.com>
date: Mon Mar 09 22:02:43 2020 +0000
summary: Bug 1620744 - Convert check_binary.py to py3; r=firefox-build-system-reviewers,rstewart

It seem this section of code is NOT python 3 friendly:

    except RuntimeError as e:
        print('TEST-UNEXPECTED-FAIL | {} | {} | {}'
              .format(name, basename, e.message),
              file=sys.stderr)

Hmm is there a comma missing in that?

e.message works in Python 2, but not Python 3. If that's the only issue then this should be a really quick fix.

Can you check the revision https://phabricator.services.mozilla.com/D66478 fixes the issue?

Thanks for the quick fix. That worked great! But I have a question, would the new code also work with python2?

Assignee: nobody → rstewart

Yup.

Pushed by rstewart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c6d575ec5ed
Fix Python 3 incompatibility in check_binary.py r=mshal
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.