Closed Bug 1066669 Opened 10 years ago Closed 10 years ago

Build fails with "configure: error: invalid variable name: `'" when using --with-ccache=...

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED
mozilla35

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Keywords: regression)

Attachments

(1 file)

After updating my mozilla-central clone today, the build fails during configure:

[...]
 0:57.75 configuring in nsprpub
 0:57.75 running /bin/sh /Users/mstange/code/mozilla/nsprpub/configure --build=x86_64-apple-darwin13.3.0 --enable-application=browser --with-macos-sdk=/Users/mstange/SDKs/MacOSX10.8.sdk --enable-debug --disable-optimize --enable-profiling --enable-dump-painting =/usr/local/bin/ccache --disable-crashreporter --with-dist-prefix=/Users/mstange/code/obj-m-debug/dist --with-mozilla --enable-debug --disable-optimize --enable-64bit AS=$(CC) CC=clang -fcolor-diagnostics CXX=clang++ -fcolor-diagnostics CPP=clang -fcolor-diagnostics -E -isysroot /Users/mstange/SDKs/MacOSX10.8.sdk LD=ld AR=ar RANLIB=ranlib STRIP=strip --cache-file=/Users/mstange/code/obj-m-debug/nsprpub/config.cache
 0:57.84 configure: error: invalid variable name: `'
 0:57.85 *** Fix above errors and then restart with               "/Applications/Xcode.app/Contents/Developer/usr/bin/make -f client.mk build"
 0:57.85 make[2]: *** [configure] Error 1
 0:57.85 make[1]: *** [/Users/mstange/code/obj-m-debug/Makefile] Error 2
 0:57.85 make: *** [build] Error 2
 0:57.88 84 compiler warnings present.

My mozconfig:

. $topsrcdir/browser/config/mozconfig
CC="clang -fcolor-diagnostics"
CXX="clang++ -fcolor-diagnostics"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-m-debug
mk_add_options MOZ_MAKE_FLAGS="-s -j8"
mk_add_options AUTOCLOBBER=1
ac_add_options --with-macos-sdk=/Users/mstange/SDKs/MacOSX10.8.sdk
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --enable-profiling
ac_add_options --enable-dump-painting
ac_add_options --with-ccache=/usr/local/bin/ccache
ac_add_options --disable-crashreporter
hg bisect has identified the regressor: http://hg.mozilla.org/mozilla-central/rev/5c377a5855f4
Blocks: 991035
sed -e 's/--with-ccache\S* *//'
is turning this:
> [...] --enable-dump-painting --with-ccache=/usr/local/bin/ccache --disable-crashreporter
into this:
> [...] --enable-dump-painting =/usr/local/bin/ccache --disable-crashreporter

It looks like \S* is not greedy enough for some reason?
Assignee: nobody → mstange
Severity: normal → blocker
Status: NEW → ASSIGNED
Summary: Build fails with "configure: error: invalid variable name: `'" → Build fails with "configure: error: invalid variable name: `'" when using --with-ccache=...
(In reply to Markus Stange [:mstange] from comment #3)
> sed -e 's/--with-ccache\S* *//'
> is turning this:
> > [...] --enable-dump-painting --with-ccache=/usr/local/bin/ccache --disable-crashreporter
> into this:
> > [...] --enable-dump-painting =/usr/local/bin/ccache --disable-crashreporter
> 
> It looks like \S* is not greedy enough for some reason?

Or perhaps sed doesn't support \S ?
I'm using ccache when building Firefox. I changed my .mozconfig file from using an explicit patch to ccache to just using "ac_add_options --with-ccache" and seems to avoid the issue
Attached patch patchSplinter Review
sed on OS X doesn't know \S or \s or \b. [^ ] works.
This got rs=ted on IRC.

Landed on inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/a39c5f7e0175
Attachment #8488701 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/a39c5f7e0175
https://hg.mozilla.org/mozilla-central/rev/1417bc922c2b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
(In reply to Markus Stange [:mstange] from comment #7)
> Changed to [^ ]*:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/1417bc922c2b

This doesn't strip --with-ccache in building nspr. We need to escape [
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: