Open Bug 965127 Opened 11 years ago Updated 2 years ago

mach gets confused with relative pathnames

Categories

(Firefox Build System :: General, defect)

x86
Windows 8
defect

Tracking

(Not tracked)

People

(Reporter: vlad, Unassigned)

References

(Blocks 1 open bug)

Details

If I do: cd inbound mkdir obj-foo cd obj-foo MOZCONFIG=../../configs/debug ../configure mozmake -s -j8 it will blow up with an issue during export, as in http://hastebin.com/denuwoyura . mozinfo.json has an incorrect path to mozconfig -- it somehow resolved the "../.." relative to the srcdir, not the objdir that I was in, and then recorded that in mozinfo.json. I suspect this is breaking various other usage of mach as well; I've been trying to use it but it's pretty painful to do so on Windows for anything other than the most basic default builds. Specifying an absolute path is unfortunately not an option -- there's no sense in forcing people to use MOZCONFIG=/c/Users/vladimir/mozilla/config/debug (or even the same on osx/linux!), when relative paths have worked forever before. If absolute paths are required, the objdir should force things to absolute as needed -- either mach or configure should do that before invoking things further.
There are two problems in your log: the relative path one, and the fact that we're loading the mozconfig to do webidl processing...
Blocks: 912114
mozinfo.json doesn't reference the mozconfig - what path inside mozinfo.json is incorrect? Yes, mozconfig loading during webidl processing shouldn't occur. It's happening because MozbuildObject.from_environment() is called and something is incurring lazy resolution of a value the build system thinks it needs mozconfigs to resolve. We should have a separate code path for reading some configure/config.status-derived file instead.
Let's reuse this bug, since the core issue is still valid. (On Windows as usual) # mkdir objdir # cd objdir # MOZCONFIG=../someconfig ../mozilla-central/configure # ../mozilla-central/mach build this starts re-configuring a new objdir in ../mozilla-central/obj-blah-blah, when it should just do a build in the current directory. mozinfo.json has appropriate absolute path names. Just running make ("mozmake -s -j8") manually works fine. This looks like an issue in client.mk.
Any more thoughts on this? I keep wanting to use mach, but this makes it impossible.
I'm unable to work on build patches until at least other more important work is complete. Staffing for this type of work is hard to come by right now. Most of the effort is being invested into cloud-y aspects of build. As they say, "patches welcome."
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.