Opened 13 years ago

Closed 9 years ago

Last modified 9 years ago

#916 closed defect (fixed)

[PATCH] Spaces in paths might break SpiderMonkey build

Reported by: Philip Taylor Owned by: ben
Priority: If Time Permits Milestone: Alpha 19
Component: Core engine Keywords: patch
Cc: philip_flohr@… Patch:

Description

Spaces in paths might break the SpiderMonkey build with errors like

Can't open perl script "../build/autoconf/acoutput-fast.pl": No such file or directory
not updating unwritable cache ./config.cache
creating ./config.status
creating Makefile
sed: can't read ../Makefile.in: No such file or directory
...

Ought to test and maybe fix that.

Attachments (1)

0ad_whitespaces_not_allowed.diff (573 bytes ) - added by philip_flohr 12 years ago.

Download all attachments as: .zip

Change History (25)

comment:1 by Kieran P, 13 years ago

Milestone: Alpha 7Alpha 8

comment:2 by Jonathan Waller, 13 years ago

I just encountered this on linux mint 11.

comment:3 by Kieran P, 12 years ago

Milestone: Alpha 8Alpha 9

comment:4 by leper, 12 years ago

Upstream suggests that the sourcedir shouldn't contain spaces. There is an upstream bugreport too.

Fixing this isn't trivial as the autoconf generated Makefiles and the configure script are not really designed to cope with spaces in paths.

comment:5 by Philip Taylor, 12 years ago

Keywords: simple added
Milestone: Alpha 9Backlog

In that case, I think it'd be nice if we could make update-workspaces.sh detect when it's being run in a path with spaces, and complain to the user with a description of the problem and what they should do (i.e. move everything to another path), since the SpiderMonkey output doesn't make it obvious.

by philip_flohr, 12 years ago

comment:6 by philip_flohr, 12 years ago

Cc: philip_flohr@… added
Keywords: review added
Milestone: BacklogAlpha 10
Summary: Spaces in paths might break SpiderMonkey build[PATCH] Spaces in paths might break SpiderMonkey build

comment:7 by philip_flohr, 12 years ago

Keywords: simple review → simple, review

comment:8 by Philip Taylor, 12 years ago

Thanks, this seems to work fine (I've just changed it a bit to expand on the comment and error message).

comment:9 by philip, 12 years ago

Owner: set to philip
Resolution: fixed
Status: newclosed

In 11380:

Fix #916 (complain about spaces in build paths), based on patch from philip_flohr

comment:10 by Kieran P, 12 years ago

Keywords: simple review removed

in reply to:  9 ; comment:11 by historic_bruno, 12 years ago

Replying to philip:

In 11380:

Fix #916 (complain about spaces in build paths), based on patch from philip_flohr

Hmm this solution causes an error on OS X:

readlink: illegal option -- f
usage: readlink [-n] [file ...]

I guess the OS X readlink is slightly different.

I should also mention that this error doesn't cause update-workspaces.sh to fail.

Last edited 12 years ago by historic_bruno (previous) (diff)

comment:12 by Kieran P, 12 years ago

Resolution: fixed
Status: closedreopened

in reply to:  11 comment:13 by historic_bruno, 12 years ago

Replying to historic_bruno:

Replying to philip:

In 11380:

Fix #916 (complain about spaces in build paths), based on patch from philip_flohr

Hmm this solution causes an error on OS X:

readlink: illegal option -- f
usage: readlink [-n] [file ...]

I guess the OS X readlink is slightly different.

I should also mention that this error doesn't cause update-workspaces.sh to fail.

Same problem on FreeBSD.

comment:14 by historic_bruno, 12 years ago

Milestone: Alpha 10Alpha 11

comment:15 by alan, 12 years ago

previously posted this patch in a wrong ticket:(

re-post it here:)

http://trac.wildfiregames.com/attachment/ticket/514/update_workspaces.patch

comment:16 by alan, 12 years ago

Keywords: review added

comment:17 by Kieran P, 12 years ago

Priority: Should HaveIf Time Permits

in reply to:  15 comment:18 by historic_bruno, 12 years ago

Replying to alan:

previously posted this patch in a wrong ticket:(

re-post it here:)

http://trac.wildfiregames.com/attachment/ticket/514/update_workspaces.patch

That patch causes an error on Ubuntu (I haven't looked into why):

./update-workspaces.sh: 18: 0: not found

Also it doesn't work properly on OS X, if I create a new directory "this is a test", copy the patched update-workspaces.sh into it, and then from build/workspaces run ./this\ is\ a\test/update-workspaces.sh, it doesn't detect the spaces in the path (apparently it's using the cwd from where the script was called?). Using the same test case on Ubuntu, the readlink method finds the spaces and throws an error.

Last edited 12 years ago by historic_bruno (previous) (diff)

comment:19 by historic_bruno, 12 years ago

Keywords: patch added; review removed

comment:20 by Kieran P, 12 years ago

Milestone: Alpha 11Backlog

comment:21 by historic_bruno, 11 years ago

Owner: philip removed
Status: reopenednew

comment:23 by ben, 9 years ago

Owner: set to ben
Resolution: fixed
Status: newclosed

In 16767:

Replaces usage of readlink -f in update-workspaces.sh with a perl one-liner, for compatibility with BSD and OS X, fixes #916

comment:24 by historic_bruno, 9 years ago

Milestone: BacklogAlpha 19

I think a perl one-liner is better than trying to duplicate readlink -f's behavior in bash (like most other solutions). I tested with relative and absolute paths containing spaces and also symbolic links to the same, it was able to correctly detect the bad paths.

Note: See TracTickets for help on using tickets.