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

RESOLVED FIXED in mozilla26

Status

defect
RESOLVED FIXED
6 years ago
Last year

People

(Reporter: coyotebush, Assigned: glandium)

Tracking

Trunk
mozilla26
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

6 years ago
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).
Reporter

Comment 2

6 years ago
(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.
Reporter

Comment 3

6 years ago
(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
Reporter

Comment 6

6 years ago
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|.
Duplicate of this bug: 913258
I can't reproduce this :/

Can you run the following:

$ hg up 34ca46861c28^1
$ MOZCONFIG=./.mozconfig-android ./mach build
Flags: needinfo?(cford)
Reporter

Comment 9

6 years ago
That works okay. (My current tip, which doesn't work, is df8f342e9a6b.)
Flags: needinfo?(cford)
Assignee

Comment 10

6 years ago
Attachment #800496 - Flags: review?(gps)
Assignee

Updated

6 years ago
Attachment #800496 - Attachment is obsolete: true
Attachment #800496 - Flags: review?(gps)
Assignee

Updated

6 years ago
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Reporter

Comment 12

6 years ago
That does the trick for me.
Attachment #800497 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/1b29c0885eb5
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.