Closed
Bug 1285860
Opened 8 years ago
Closed 8 years ago
`mach build` fails if there is a local installation of mozbuild
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox50 fixed)
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: amiyaguchi, Assigned: gps)
Details
Attachments
(1 file)
`./mach build` will fail in an unexpected manner if the user has a local installation of mozbuild. This occurs on OSX during the initial build if mozbuild is installed in the system python packages.
This can be reproduced through the following steps.
1) Obtain a clean tree free of the build virtualenv, `./mach clobber`
2) Install mozbuild to the system packages, `pip install mozbuild`
3) Start the build, `./mach build`
It should throw up something like the following:
> 0:02.05 cd /Users/amiyaguchi/mozilla-central/obj-x86_64-apple-darwin15.4.0/x86_64
> 0:02.05 /Users/amiyaguchi/mozilla-central/configure
> 0:02.08 Traceback (most recent call last):
> 0:02.08 File "/Users/amiyaguchi/mozilla-central/configure.py", line 16, in <module>
> 0:02.08 from mozbuild.configure import ConfigureSandbox
> 0:02.08 ImportError: cannot import name ConfigureSandbox
> 0:02.08 *** Fix above errors and then restart with "/Applications/Xcode.app/Contents/Developer/usr/bin/make -f client.mk build"
> 0:02.08 make[3]: *** [configure] Error 1
> 0:02.08 make[2]: *** [/Users/amiyaguchi/mozilla-central/obj-x86_64-apple-darwin15.4.0/x86_64/Makefile] Error 2
> 0:02.08 make[1]: *** [realbuild] Error 2
> 0:02.08 make: *** [build] Error 2
> 0:02.12 0 compiler warnings present.
I expect the build system create the appropriate virtualenv and install a fresh copy of mozbuild to it. Instead, it attempts to reference my local copy. A workaround is to uninstall mozbuild during the initial build. Once the virtualenv has been created for the repository, this issue no longer manifests itself.
Assignee | ||
Comment 1•8 years ago
|
||
I found the bug. Will submit patch momentarily.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
We want local source directory paths to take precedence over system paths so system installed packages don't get used. Review commit: https://reviewboard.mozilla.org/r/63500/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/63500/
Attachment #8769786 -
Flags: review?(mh+mozilla)
Comment 3•8 years ago
|
||
Comment on attachment 8769786 [details] Bug 1285860 - Add python/mozbuild at beginning of sys.path; https://reviewboard.mozilla.org/r/63500/#review60478
Attachment #8769786 -
Flags: review?(mh+mozilla) → review+
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/278b332af0cd Add python/mozbuild at beginning of sys.path; r=glandium
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/278b332af0cd
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•