Closed Bug 913246 Opened 11 years ago Closed 11 years ago

configure does not run correctly with relative path to alternate $MOZCONFIG

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: coyotebush, Assigned: glandium)

References

Details

Attachments

(1 file, 1 obsolete file)

New at least in the last day or two: my Android mozconfig doesn't work quite right.

$ MOZCONFIG=.mozconfig-android ./mach build
 0:00.15 /usr/bin/make -f client.mk -s
 0:00.31 Adding client.mk options from /Users/cford/code/mozilla-central/.mozconfig-android:
 0:00.31     CONFIG_GUESS=arm-linux-androideabi
 0:00.31     MOZ_OBJDIR=./objdir-droid
 0:00.31     AUTOCLOBBER=1
 0:00.31     FOUND_MOZCONFIG := /Users/cford/code/mozilla-central/.mozconfig-android
 0:00.49 Clobber not needed.
 0:00.51 cd ./objdir-droid
 0:00.51 /Users/cford/code/mozilla-central/configure
 0:00.53 Specified MOZCONFIG ".mozconfig-android" does not exist!
 0:00.53 Fix above errors before continuing.
 0:00.53 *** Fix above errors and then restart with               "/usr/bin/make -f client.mk build"
 0:00.53 make[2]: *** [configure] Error 1
 0:00.53 make[1]: *** [objdir-droid/Makefile] Error 2
 0:00.53 make: *** [build] Error 2
 0:00.58 0 compiler warnings present.

|MOZCONFIG=`pwd`/.mozconfig-android|, however, works.

It looks like .mozconfig-android is getting copied to objdir-droid/.mozconfig (without the -android), and that that name mismatch breaks things.
.mozconfig-android isn't a valid path. Try MOZCONFIG=./mozconfig-android (note the slash).
(In reply to Gregory Szorc [:gps] from comment #1)
> .mozconfig-android isn't a valid path.

How so?

> Try MOZCONFIG=./mozconfig-android (note the slash).

$ MOZCONFIG=./.mozconfig-android ./mach build
 0:00.15 /usr/bin/make -f client.mk -s
 0:00.31 Adding client.mk options from /Users/cford/code/mozilla-central/./.mozconfig-android:
 0:00.31     CONFIG_GUESS=arm-linux-androideabi
 0:00.31     MOZ_OBJDIR=./objdir-droid
 0:00.31     AUTOCLOBBER=1
 0:00.31     FOUND_MOZCONFIG := /Users/cford/code/mozilla-central/./.mozconfig-android
 0:00.49 Clobber not needed.
 0:00.51 cd ./objdir-droid
 0:00.51 /Users/cford/code/mozilla-central/configure
 0:00.52 Specified MOZCONFIG "./.mozconfig-android" does not exist!
 0:00.52 Fix above errors before continuing.
 0:00.52 *** Fix above errors and then restart with               "/usr/bin/make -f client.mk build"
 0:00.52 make[2]: *** [configure] Error 1
 0:00.52 make[1]: *** [objdir-droid/Makefile] Error 2
 0:00.52 make: *** [build] Error 2
 0:00.53 0 compiler warnings present.
(To be clear, once I've run configure with the full path, just |.mozconfig-android| works for rebuilds.)
Gah - I read the initial comment wrong. Teaches me to work while under the influence of a cold.

The problem is that configure is executing from the objdir. So MOZCONFIG=relativepath is different if pwd is srcdir or objdir. Things executing from srcdir are fine. But your mozconfig is getting lost as we chdir.

I can't recall if we ever supported this or if it's a regression.
Since you are complaining about it not working any more, it must be a regression. My guess says bug 911634.
Depends on: 911634
Right, I think that's what's happening.

My `history` suggests that I've never used anything but |MOZCONFIG=.mozconfig-android| from the beginning. Although to be fair https://wiki.mozilla.org/Android#Setup_Fennec_mozconfig does include $PWD in its instructions.

And as I noted, |.mozconfig-android| *does* end up copied to |objdir-droid/.mozconfig|.
I can't reproduce this :/

Can you run the following:

$ hg up 34ca46861c28^1
$ MOZCONFIG=./.mozconfig-android ./mach build
Flags: needinfo?(cford)
That works okay. (My current tip, which doesn't work, is df8f342e9a6b.)
Flags: needinfo?(cford)
Attachment #800496 - Flags: review?(gps)
Attachment #800497 - Flags: review?(gps)
Attachment #800496 - Attachment is obsolete: true
Attachment #800496 - Flags: review?(gps)
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
That does the trick for me.
Attachment #800497 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/1b29c0885eb5
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.