We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1575 - Library install with "make install" fails on Win/Cygwin when build path contains space
Summary: Library install with "make install" fails on Win/Cygwin when build path conta...
Status: WAITING
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.0
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-19 09:23 UTC by Andreas Schiffler
Modified: 2014-07-09 13:34 UTC (History)
0 users

See Also:


Attachments
Log from "make -d install" (1.30 MB, application/octet-stream)
2012-08-19 09:23 UTC, Andreas Schiffler
Details
Fixed libtool (258.23 KB, text/plain)
2012-08-19 09:49 UTC, Andreas Schiffler
Details
Log of "make install" on MacOSX with path containing space (11.12 KB, text/plain)
2014-06-20 12:23 UTC, Klemen Sever
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schiffler 2012-08-19 09:23:18 UTC
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.
Comment 1 Andreas Schiffler 2012-08-19 09:49:08 UTC
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.
Comment 2 Andreas Schiffler 2012-08-19 10:04:19 UTC
$ 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@)"
Comment 3 Klemen Sever 2014-06-20 12:23:44 UTC
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.
Comment 4 Sam Lantinga 2014-07-09 08:23:00 UTC
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?
Comment 5 Andreas Schiffler 2014-07-09 13:34:23 UTC
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).