| Summary: | Library install with "make install" fails on Win/Cygwin when build path contains space | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Andreas Schiffler <aschiffler> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | WAITING --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| Attachments: |
Log from "make -d install"
Fixed libtool Log of "make install" on MacOSX with path containing space |
||
Created attachment 932 [details]
Fixed libtool
One can repro the issue with
/bin/sh ./libtool --debug --mode=install /usr/bin/install -c build/libSDL2.la /usr/local/lib/libSDL2.la
The problem is caused by incorrect quoting in libtool. The variable $progpath is not correctly wrapped in double quotes in several places.
Fixed libtool attached.
$ diff libtool libtool-fixed 2797c2797 < exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' --- > exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' 8321c8321 < if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then --- > if test "X$ECHO" = "X$SHELL \"$progpath\" --fallback-echo"; then 8323,8324c8323,8324 < [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; < *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; --- > [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL \"$progpath\" --fallback-echo";; > *) qecho="$SHELL `pwd`/\"$progpath\" --fallback-echo";; 8559c8559 < relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" --- > relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" Created attachment 1694 [details]
Log of "make install" on MacOSX with path containing space
I have the same issue when trying to compile SDL2 on a MacOSX v10.9.3.
Andreas, there are a bunch of places in build-scripts/ltmain.sh where $progpath is unquoted. Would the correct fix be to quote all of them? Yes, it is possible that there are other codepaths besides "make install" that also need this fix. The proposed changes below should cover the most common case though (./configure && make && make install). |
Created attachment 931 [details] Log from "make -d install" Running "make install" (or "make install-lib") from /cygdrive/c/Users/Andreas Schiffler/Desktop/Sources/SDL/build fails with: ... libtool: install: ranlib /usr/local/lib/libSDL2.a /bin/sh: /cygdrive/c/Users/Andreas: No such file or directory Makefile:141: recipe for target `install-lib' failed make: *** [install-lib] Error 127 Log from "make -d install" attached.