Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path with space in configure fails #1802

Closed
DorpsGek opened this issue Feb 25, 2008 · 9 comments
Closed

Path with space in configure fails #1802

DorpsGek opened this issue Feb 25, 2008 · 9 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

mallmonkey opened the ticket and wrote:

When having messed around with the sources and using 'make' again, I get a warning when compiling most files:

neil@neptunium$ make
[..]
[SRC] DEP video/cocoa/wnd_quickdraw.mm
powerpc-apple-darwin9-gcc-4.0.1: Support/OpenTTD": No such file or directory
[..]

The reason for this is that the path to my DSHARED_DIR in CFLAGS is no longer escaped. When I manually execute ./configure, the file "objs/release/Makefile" contains:
CFLAGS = [..] -DSHARED_DIR="/Library/Application Support/OpenTTD" [..]

However, after changing some entry in source.list and executing make, the reconfigure breaks this and "objs/release/Makefile" contains:

CFLAGS = [..] -DSHARED_DIR="/Library/Application Support/OpenTTD" [..]

As you can see, the backslash before the space in "Application Support" is gone.

The reason it breaks, is that for the reconfigure config.cache is executed, and the configure script apparently cannot handle a path with a space in it. When I don't specify the shared-dir myself, the default for Mac OS X is used from config.lib:
shared_dir="/Library/Application Support/OpenTTD"
This works fine, but If you manually run ./configure --shared-dir=/some path with a space it breaks. And that's exactly what happens when config.cache is executed.

I hope I managed to make it clear :-)

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1802
@DorpsGek
Copy link
Member Author

mallmonkey wrote:

Sorry, forgot to change the reported version, this is in r12187.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment3541

@DorpsGek
Copy link
Member Author

peter1138 wrote:

Does this fix it?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment3569

@DorpsGek
Copy link
Member Author

mallmonkey wrote:

No, it doesn't:

niel@neptunium$ ./configure --shared-dir=/Library/Application Support/OpenTTD/
[..]
shared data directory... /Library/Application Support/OpenTTD/
[..]

neil@neptunium$make
[..]
[LANG] Compiling language ukrainian
/bin/sh: line 0: [: too many arguments
[SRC] No such source-file: /Users/neil/dev/openttd/test/objs/release/config.cache.compiler.[c|cpp|mm|rc]
cc -framework Cocoa /Users/neil/dev/openttd/test/objs/release/config.cache.compiler.o -o /Users/neil/dev/openttd/test/objs/release/config.cache.compiler
powerpc-apple-darwin9-gcc-4.0.1: /Users/neil/dev/openttd/test/objs/release/config.cache.compiler.o: No such file or directory
make[1]: *** No rule to make target `ai/ai.d', needed by `ai/ai.o'. Stop.
make: *** [all] Error 2

I changed the patch to use single quotes instead of double quotes, so the 'too many arguments' problem is fixed, and also added some extra quotes around some of the paths, and now it works (see attachment). Note, the paths to the external midi player aren't quoted yet, so more work is needed. I'm also not sure the places I added the extra quoting is the best place for them :-) Also, all those extra quotes are ugly imho ;-)

neil@neptunium$ ./configure --shared-dir=/Library/Application Support/OpenTTD/
[..]
personal home directory... ""Documents/OpenTTD""
shared data directory... ""/Library/Application Support/OpenTTD/""
installation directory... ""/""
[..]

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment3570

@DorpsGek
Copy link
Member Author

peter1138 wrote:

I must admit I'm not particularly keen on that one... Try this?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment3571

@DorpsGek
Copy link
Member Author

mallmonkey wrote:

Yes, works! And much better solution indeed :-)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment3572

@DorpsGek
Copy link
Member Author

peter1138 wrote:

Hmm, not so good as it forces a recompile for me on my laptop :o


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment3582

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 4, 2008

Rubidium wrote:

Does the following work?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment4811

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 4, 2008

mallmonkey wrote:

Yes, I believe it does.

$ ./configure --shared-dir=/Library/Application\ Support/OpenTTD/
[..]
shared data directory... /Library/Application\ Support/OpenTTD/
[..]

$ make
[..]
[LANG] Compiling language ukrainian
[SRC] Compiling and Linking endian_check
[SRC] Testing endianness for target
[..]

And:

make reconfigure
----------------
The system detected that source.list or any configure file is altered.
Going to reconfigure with last known settings...
----------------
[..]
shared data directory... /Library/Application\ Support/OpenTTD/
[..]

In both cases (manually running ./configure and it being automatically done) the path is escaped as it should be.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802#comment4814

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 5, 2008

Rubidium closed the ticket.

Reason for closing: Fixed

In r14440.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1802

@DorpsGek DorpsGek closed this as completed Oct 5, 2008
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Build system labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant