Last Comment Bug 707512 - Windows pymake builds using MOZ_OBJDIR set to an MSYS style path, fail with an unclear: "No rule to make target '/c/<objdir>/config.status' needed by ['<command-line>', '/c/<objdir>/config.status']"
: Windows pymake builds using MOZ_OBJDIR set to an MSYS style path, fail with a...
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla11
Assigned To: Ed Morley [:emorley]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-04 08:27 PST by Ed Morley [:emorley]
Modified: 2011-12-19 13:29 PST (History)
4 users (show)
emorley: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Build log (67.16 KB, text/plain)
2011-12-04 08:27 PST, Ed Morley [:emorley]
no flags Details
Patch v1 (1.31 KB, patch)
2011-12-05 19:00 PST, Ed Morley [:emorley]
ted: review+
Details | Diff | Splinter Review
Patch v2 (1.94 KB, patch)
2011-12-07 16:58 PST, Ed Morley [:emorley]
no flags Details | Diff | Splinter Review

Description Ed Morley [:emorley] 2011-12-04 08:27:37 PST
Created attachment 578906 [details]
Build log

When building from topsrcdir (after rm -rf objdir & removing the generated configures from srcdir) using:
"python -OO build/pymake/make.py -s -f client.mk" 
...and specifying the objdir in my /mozconfig:
mk_add_options MOZ_OBJDIR=/c/mozilla/obj-inbound

I get the following error (in addition to that mentioned in bug 707511):
{
No rule to make target '/c/mozilla/obj-inbound/config.status' needed by ['<command-line>', '/c/mozilla/obj-inbound/config.status']
}
(Full log attached)

I like having my objdir one level up from the srcdir, so currently my workaround (and the way I've been building for months, since until now I didn't realise MOZ_OBJDIR was supposed to work in pymake builds) is of course to just build from the objdir, using: "python -OO ../inbound/build/pymake/make.py -s -f ../inbound/client.mk".

Either MOZ_OBJDIR is supposed to work under pymake and this is a bug (or else just another side effect of bug 707511), or else if it's known unavoidably broken, then maybe I can just clarify on the build options/pymake pages and save others the hassle of trying to figure out why things aren't working :-)

- Windows 7 x64 (but building 32 bit)
- MozillaBuild 1.6 final
- MSVC2010
- WinSDK 7.0A
- Inbound tip as of 2011-12-02
- PATH: "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseHg\;c:\Program Files\Java\jdk1.7.0_01\bin\"
- In my .profile:
{
export MOZCONFIG=/c/mozilla/.mozconfig
}
- .mozconfig:
{
mk_add_options MOZ_OBJDIR=/c/mozilla/obj-inbound
mk_add_options MOZ_MAKE_FLAGS="-j3"
ac_add_options --disable-optimize
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --disable-angle
}
Comment 1 Ed Morley [:emorley] 2011-12-04 15:29:56 PST
Ok, turns out things start working if I use:
mk_add_options MOZ_OBJDIR=c:/mozilla/obj-inbound

...which is counter-intuitive given that MozillaBuild lists paths in the /c/mozilla/foo form.

If this behaviour is intentional, then I'll update https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_Objdir instructing windows users to use the correct from + list the error on the troubleshooting page & ideally we can add some kind of error message that is more helpful than that in comment 0.
Comment 2 Benjamin Smedberg AWAY UNTIL 2-AUG-2016 [:bsmedberg] 2011-12-05 13:19:41 PST
Yes, pymake uses windows paths not msys paths. Feel free to make the error message reasonable.
Comment 3 Ed Morley [:emorley] 2011-12-05 18:56:13 PST
Seems obvious in retrospect (such is life!) :-)

Morphing bug to be about adding an explicit error message.
Comment 4 Ed Morley [:emorley] 2011-12-05 19:00:23 PST
Created attachment 579193 [details] [diff] [review]
Patch v1

Adds an explicit error message iff MINGW* && PYMAKE && first character of MOZ_OBJDIR is a "/".

The indentation style in client.mk is slightly varied, so wasn't sure what to match, so went with that ifndef block's existing style. Happy to change it to whatever you'd prefer.
Comment 5 Ted Mielczarek [:ted.mielczarek] 2011-12-06 14:56:55 PST
Comment on attachment 579193 [details] [diff] [review]
Patch v1

Review of attachment 579193 [details] [diff] [review]:
-----------------------------------------------------------------

::: client.mk
@@ +141,5 @@
>  ifndef MOZ_OBJDIR
>    MOZ_OBJDIR = obj-$(CONFIG_GUESS)
> +else
> +# On Windows Pymake builds check MOZ_OBJDIR doesn't start with "/"
> +  ifneq (,$(filter MINGW%,$(shell uname -s)))

Maybe use CONFIG_GUESS here instead of having to shell out again?
Comment 6 Ed Morley [:emorley] 2011-12-07 16:58:25 PST
Created attachment 579900 [details] [diff] [review]
Patch v2

As before, except uses:
> ifneq (,$(findstring mingw,$(CONFIG_GUESS)))
...instead of:
> ifneq (,$(filter MINGW%,$(shell uname -s)))

Also replaces an existing MINGW check that can use CONFIG_GUESS as well, avoid shelling out there too.
Comment 8 Ed Morley [:emorley] 2011-12-09 06:56:14 PST
https://hg.mozilla.org/mozilla-central/rev/fe8612e51e8a

Note You need to log in before you can comment on or make changes to this bug.