Bug 9418 - WebKit will not build when Space exists in path
Summary: WebKit will not build when Space exists in path
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-12 11:03 PDT by Alexei Svitkine
Modified: 2006-06-24 04:50 PDT (History)
2 users (show)

See Also:


Attachments
fix for JSC (2.40 KB, patch)
2006-06-13 14:00 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff
proposed fix (9.59 KB, patch)
2006-06-15 10:24 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexei Svitkine 2006-06-12 11:03:23 PDT
The build scripts are messed. For example, my WebKit SVN location is /Volumes/The Abyss/WebKit-SVN.

When I type build-webkit (it's in my $PATH), I get the following results:

...

    setenv VERSION_INFO_BUILDER shadowknight
    setenv VERSION_INFO_STRING "\"@(#)PROGRAM:Generate Derived Sources  PROJECT:JavaScriptCore-  DEVELOPER:shadowknight  BUILT:\" __DATE__  \" \" __TIME__ \"\""
    setenv WARNING_CFLAGS "-Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wno-long-double"
    setenv XCODE_APP_SUPPORT_DIR "/Library/Application Support/Apple/Developer Tools"
    setenv YACC /usr/bin/yacc
    /bin/sh -c \"/Volumes/The\ Abyss/WebKit-SVN/WebKitBuild/JavaScriptCore.build/Release/Derived\ Sources.build/Script-65FB3F6509D11E9100F49DEB.sh\"
make: *** No rule to make target `/Volumes/The', needed by `chartables.c'.  Stop.
** BUILD FAILED **
Comment 1 David Kilzer (:ddkilzer) 2006-06-12 11:58:42 PDT
Thanks for taking the time to file this bug!

Please note that this is an Xcode bug, not a WebKit bug, hence I'm closing it as RESOLVED/INVALID.

I'd suggest filing a bug directly with Apple on https://bugreport.apple.com/.  If you're not an Apple Developer Connection (ADC) member, you can sign up for a 100% free "online" ADC membership so that you can log into that web site to file the bug.  (I'm pretty sure this bug is known to Apple, but filing another bug makes the duplicate count go up, which gives the internal bug a higher priority.)
Comment 2 Alexey Proskuryakov 2006-06-13 13:56:50 PDT
AFAIK, the main problem is in GNU make, and it is hard to expect that it will be fixed soon, given that it's been well known for years, if not decades.

On the other hand, it looks like the changes needed to work around this problem are pretty minor, so I'm re-opening this bug.
Comment 3 Alexey Proskuryakov 2006-06-13 14:00:28 PDT
Created attachment 8841 [details]
fix for JSC

I have only looked at JSC so far. Won't be able to take a second look for at least a couple of days, so please feel free to finish the work if it's urgent.
Comment 4 Alexey Proskuryakov 2006-06-15 10:24:21 PDT
Created attachment 8857 [details]
proposed fix

Some of the changes to the project files are unrelated; supposedly, Xcode 2.3 just removes obsolete stuff.
Comment 5 Darin Adler 2006-06-15 19:20:16 PDT
Comment on attachment 8857 [details]
proposed fix

This doesn't look like a gnu make issue to me. It seems to be an Xcode issue, just as ddilzer says. Xcode doesn't use gnu make to build source files.

And it also seems to me that this workaround will cause problems if and when the Xcode team fixes Xcode. I have mixed feelings about whether or not we should land the fix, but I guess I'm leaning toward saying yes.
Comment 6 Alexey Proskuryakov 2006-06-15 21:40:29 PDT
(In reply to comment #5)
> This doesn't look like a gnu make issue to me.

  One problem is that make doesn't handle spaces in VPATH. From release notes for a Win32 port:

"Unlike Unix, Windows 95/NT systems encourage pathnames which contain white space (e.g. C:\Program Files\). These sorts of pathnames are legal under Unix too, but are never encouraged. There is at least one place in make (VPATH/vpath handling) where paths containing white space will simply not work. There may be others too. I chose to not try and port make in such a way so that these sorts of paths could be handled. I offer these suggestions as workarounds:

1. Use 8.3 notation
2. Rename the directory so it does not contain white space."

  Google only gives rather obscure links, but the issue is real, and, of course, not limited to Win32. We use make for derived sources.

> And it also seems to me that this workaround will cause problems if and when
> the Xcode team fixes Xcode.

AFAIK, the known bugs have been fixed in Xcode 2.3, one just needs to quote paths that may contain spaces. So, my patch consists of two parts:
- quote the paths (of course, I did that via UI, and not by hacking the project file);
- create symlinks in DerivedSources to avoid the need to pass absolute paths to make.
Comment 7 Darin Adler 2006-06-22 12:38:38 PDT
Comment on attachment 8857 [details]
proposed fix

Why are additional variables like HEADER_SEARCH_PATHS_QUOTED_1 needed? Otherwise, this looks great!
Comment 8 Alexey Proskuryakov 2006-06-22 13:19:08 PDT
(In reply to comment #7)
> Why are additional variables like HEADER_SEARCH_PATHS_QUOTED_1 needed?

I have no idea, this is internal to Xcode. I've just added quotes around the paths in the UI :-)
Comment 9 Darin Adler 2006-06-22 19:19:49 PDT
Comment on attachment 8857 [details]
proposed fix

r=me
Comment 10 Alexey Proskuryakov 2006-06-24 04:50:48 PDT
Committed revision 15005.

Fixed a recently introduced problem with JSC testapi target. Also added -f flag to ln, to prevent problems when a common build directory is used, and the source path is changed.

We'll need to find a way to test this on the BuildBot - otherwise, I don't expect the fix to last long (heh, the testapi issue appeared while the patch was under review :) ).