bnoordhuis/node-iconv — Issue #25: Make fails when parent directory contains spaces
Author: baalexander
Created: 2012-03-04 03:45:38+00:00
State: open

When using `npm install iconv` in a module with a space in a parent directory (`/Users/baalexander/Foo Bar/node-xmlrpc/`), I get the following make output:

```bash
> iconv@1.1.3 install /Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv
> node-waf build install

Waf: Entering directory `/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/build'
# see https://github.com/bnoordhuis/node-iconv/issues/19
make -C deps/libiconv
builddir="`pwd`"; cd libcharset && make all && make install-lib libdir="$builddir/lib" includedir="$builddir/lib"
cd lib && make all
make[3]: Nothing to be done for `all'.
cd lib && make all
make[3]: Nothing to be done for `all'.
cd lib && make install-lib libdir='/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib' includedir='/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib'
/bin/sh ../build-aux/mkinstalldirs /Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib
mkdir -p -- /Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib
/bin/sh ../libtool --mode=install /usr/bin/install -c -m 644 libcharset.la /Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib/libcharset.la
libtool: install: `Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib/libcharset.la' is not a directory
libtool: install: Try `libtool --help --mode=install' for more information.
make[3]: *** [install-lib] Error 1
make[2]: *** [install-lib] Error 2
make[1]: *** [lib/localcharset.h] Error 2
make: *** [deps/libiconv/lib/.libs/libiconv.a] Error 2
Waf: Leaving directory `/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/build'
'build' finished successfully (0.102s)
Waf: Entering directory `/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/build'
# see https://github.com/bnoordhuis/node-iconv/issues/19
make -C deps/libiconv
builddir="`pwd`"; cd libcharset && make all && make install-lib libdir="$builddir/lib" includedir="$builddir/lib"
cd lib && make all
make[3]: Nothing to be done for `all'.
cd lib && make all
make[3]: Nothing to be done for `all'.
cd lib && make install-lib libdir='/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib' includedir='/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib'
/bin/sh ../build-aux/mkinstalldirs /Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib
/bin/sh ../libtool --mode=install /usr/bin/install -c -m 644 libcharset.la /Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib/libcharset.la
libtool: install: `Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib/libcharset.la' is not a directory
libtool: install: Try `libtool --help --mode=install' for more information.
make[3]: *** [install-lib] Error 1
make[2]: *** [install-lib] Error 2
make[1]: *** [lib/localcharset.h] Error 2
make: *** [deps/libiconv/lib/.libs/libiconv.a] Error 2
Waf: Leaving directory `/Users/baalexander/Foo Bar/node-xmlrpc/node_modules/iconv/build'
'install' finished successfully (0.087s)
```

It looks like libtool or libcharset.la is interpreting only everything in the path after the space (`libtool: install: 'Bar/node-xmlrpc/node_modules/iconv/deps/libiconv/lib/libcharset.la' is not a directory`).

If I try requiring iconv anyways, Node complains it cannot find the Iconv module.

Thanks!