"AttributeError: module distutils has no attribute sysconfig" when building Firefox
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr68 unaffected, firefox-esr78 unaffected, firefox80 unaffected, firefox81 unaffected, firefox82 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox80 | --- | unaffected |
firefox81 | --- | unaffected |
firefox82 | --- | fixed |
People
(Reporter: ahal, Assigned: rstewart)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
I'm not hitting this personally, but there was some chatter on #developers where at least two developers are seeing it.
The error is happening here:
https://searchfox.org/mozilla-central/rev/969fc7fa6c3c7fc489f53b7b7f8c902028b5169f/build/moz.configure/init.configure#382
I believe it's happening because some Linux distros patch the distutils module, and it looks like at least ArchLinux (and possibly also Debian) don't have that sysconfig
attribute.
In general distutils
is pretty unreliable (I think it's even possible for it to be missing entirely from certain distributions).
If we can't find an alternative way to find that info, I wonder if we could solve this by fixing bug 1622789. Maybe it would be possible to vendor the canonical version of distutils?
Assignee | ||
Comment 1•5 years ago
|
||
I wonder what the reference to distutils.sysconfig
is even doing there. We don't use get_python_lib()
there for anything. I assume it can be deleted. Of course there are more references to the module in-tree and I don't know which can and cannot be safely replaced with other stuff.
Assignee | ||
Comment 2•5 years ago
|
||
Historically we haven't had a problem with depending on distutils.sysconfig
outright. On Ubuntu there's a Debian package to install it. Are the reporters just people running Ubuntu who haven't installed it?
Reporter | ||
Comment 3•5 years ago
|
||
They are CC'ed, :pbz at least mentioned it was on ArchLinux.
Comment 4•5 years ago
|
||
(In reply to Ricky Stewart from comment #2)
Historically we haven't had a problem with depending on
distutils.sysconfig
outright. On Ubuntu there's a Debian package to install it. Are the reporters just people running Ubuntu who haven't installed it?
I'd expect mach bootstrap
to set that up for me. Or is that the wrong assumption?
(In reply to Andrew Halberstadt [:ahal] from comment #3)
They are CC'ed, :pbz at least mentioned it was on ArchLinux.
Yes, I'm running Arch. Is there a package I need to install?
Assignee | ||
Comment 5•5 years ago
|
||
No, not to my knowledge. This is a bug of some sort, but I don't know where it's coming from.
I asked you this in Riot, but to be clear: Does locally reverting bug 1660351 (hg revision f50e4bee2efb) fix the issue?
Assignee | ||
Comment 6•5 years ago
|
||
I'd expect
mach bootstrap
to set that up for me. Or is that the wrong assumption?
Yeah, bootstrap
does not necessarily make your Python environment "correct" for you. The UX around this is a work-in-progress. But I don't think that's the root cause of your problem.
Assignee | ||
Comment 7•5 years ago
|
||
Oh. Also, Paul, can you post a complete (unabridged) log from mach configure
demonstrating the failure?
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
This logic is meant to expose packages from a globally-installed Python to be used by the in-objdir
virtualenv
s, so for example we don't have to figure out how to install zstandard
(or other Python packages with native code that may or may not have prebuilt wheels for any given platform) in those virtualenv
s. This worked mostly, but is causing builds to unconditionally break on Arch Linux, caused a couple test failures, and in general is just introducing other weird behaviors downstream, and issues with the resultant PYTHONPATH
s are hard to diagnose and fix.
In the long-term we'll have to permanently solve the zstandard
problem and pave the way for other Python packages with native code as well, but that's not an urgent need.
Partially reverts bugs 1660351 and 1656993. Entirely reverts bug 1660353, restoring that file to as it was before that patch.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 9•5 years ago
|
||
Set release status flags based on info from the regressing bug 1660351
Assignee | ||
Comment 10•5 years ago
|
||
This logic is meant to expose packages from a globally-installed Python to be used by the in-objdir
virtualenv
s, so for example we don't have to figure out how to install zstandard
(or other Python packages with native code that may or may not have prebuilt wheels for any given platform) in those virtualenv
s. Bug 1660351 augmented that logic to work within the requirements of bug 1660353. This worked mostly, but is causing builds to unconditionally break on Arch Linux, caused a couple test failures, and in general is just introducing other weird behaviors downstream, and issues with the resultant PYTHONPATH
s are hard to diagnose and fix.
In the long-term we'll have to permanently solve the zstandard
problem and pave the way for other Python packages with native code as well, but that's not an urgent need.
The ultimate goal is to completely remove inherit-from-parent-environment
, but we can't do that until bug 1659539 is solved.
Partially reverts bugs 1660351. Entirely reverts bug 1660353, restoring that file to as it was before that patch.
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Comment 13•5 years ago
|
||
bugherder |
Description
•