bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cygwin's libtool problem with directory that contains white spaces


From: Ralf Wildenhues
Subject: Re: Cygwin's libtool problem with directory that contains white spaces
Date: Tue, 22 Mar 2005 10:50:42 +0100
User-agent: Mutt/1.4.1i

Hi Jean-Philippe,

* Jean-Philippe Barrette-LaPierre wrote on Mon, Mar 21, 2005 at 06:31:14PM CET:
> I'm experiencing problems with libtool 1.5.10 on Cygwin. I'm trying to 
> compile a project in:
> 
> /home/Jean-Philippe\ Barret/project/curlpp
> 
> In the 'examples' subdirectory, this problem occurs:

*snip*
> /bin/bash ../libtool --silent --mode=link --tag=CXX g++ -I../ -g  -W -Wall 
> -Werror   -I/usr/local/include -g  -W -Wall -Werror   -I/usr/local/include 
> -L../curlpp/ -lcurlpp -static  -o example01.exe  example01.o  -lstdc++ 
> -L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32 -lwinmm -lz
> libtool: link: cannot find the library `'
*snip*

> I investigated the problem and when I call libtool with --debug like 
> this (in the "examples" subdirectory):
> 
> $ /bin/bash ../libtool --debug --silent --mode=link --tag=CXX g++ -I../ -g  
> -W -Wall -Werror   -I/usr/local/include -g  -W -Wall -Werror 
> -I/usr/local/include -L../curlpp/ -lcurlpp -static  -o example01.exe  
> example01.o  -lstdc++ -L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32 -lwinmm 
> -lz
> 
> here's the output:
*snip*

> If you take a look at this line (last 10 lines):
> + deplibs=-L/home/Jean-Philippe
> 
> you can see that this is not correct. It didn't expanded the 
> "-L/home/Jean-Philippe Barret/curlpp/curlpp"
> ("-L../curlpp" on the libtool call) correctly. We should have this line 
> instead:
> 
> + deplibs=-L/home/Jean-Philippe Barret/curlpp/curlpp

No, that is not correct either.  How would you distinguish between
two separate arguments if not by a space?

Hint: we'd need to do quoting here.  (Plus, the bug happens earlier.)

> So, it seems that it doesn't handle correctly a directory with white 
> spaces. I tried with a directory without any whitespace, and it worked 
> perfectly.

Yes.  This is a problem, and I can understand that it is
frustrating, but the facts that the shell uses white space as
argument delimiter, plus people love spaces in path names, are an
unfortunate combination.  What's more is, that this problem is very
hard to solve in a shell libtool.  I'm not saying it's impossible,
it _is_ possible, but it would be a _lot_ of work, and some backwards
incompatibilities.

What I'm trying to say is it's much much easier to just not use white
space in path names.  If you can't avoid them per se, you might be able
to use the old-style name (something like jean-p~1 or so) or create a
link (symlink or hardlink -- IIRC one of them works on cygwin) for the
directory with a different name.

So, in your case (with appropriate permissions):
  cd /home
  mv 'Jean-Philippe Barret' Jean-Philippe
  ln -s Jean-Philippe 'Jean-Philippe Barret'

I would, by the way, have strong doubts about whether other unixy tools
cope with spaces in $HOME.

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]