find_program doesn't use PATH from mozconfig
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox67 fixed)
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(3 files)
If you have export PATH=/some/path:$PATH
in .mozconfig and have, say, llvm-config in /some/path, configure won't find it. This is actually a regression from bug 1520394.
Assignee | ||
Comment 1•6 years ago
|
||
Bug 1520394 changed things such that the configure sandbox is using a
copy of os.environ. So when mozconfig injects environment changes, they
only affect the sandbox. Which means when the which module uses
os.environ to get PATH, it gets the original unmodified environment.
So instead of relying on the which module getting PATH itself, we feed
it with it. It's worth noting that the which module adds .
on Windows,
but we don't copy this behavior, because in the context of configure,
it's actually not important (.
would be the topobjdir).
Assignee | ||
Comment 2•6 years ago
|
||
Also, while here, replace subprocess.check_output with check_cmd_output.
Depends on D17771
Assignee | ||
Comment 3•6 years ago
|
||
The combination of bug 1515579 and bug 1520394 made things harder for
old-configure, because it doesn't necessarily have a complete view of
the search PATH that has been used. This doesn't actually cause problems
on non-Windows builds because things work out fine, but on Windows,
some of the executions of clang-cl in old-configure insist on being able
to find a MSVC install. That, again, doesn't currently cause problems in
general on local builds because clang-cl finds it through the registry
(presumably), and on automation, because it's in the mk_add_options export
'ed PATH, but the latter is due to change.
Depends on D17772
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b6ccebd7411a
https://hg.mozilla.org/mozilla-central/rev/22c349313334
https://hg.mozilla.org/mozilla-central/rev/a12f5e7e9da2
Description
•