delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/22/10:22:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: endor.wiss-staff: wildenhu set sender to Ralf DOT Wildenhues AT gmx DOT de using -f
Date: Tue, 22 Mar 2005 10:50:42 +0100
From: Ralf Wildenhues <Ralf DOT Wildenhues AT gmx DOT de>
To: Jean-Philippe Barrette-LaPierre <jpb AT rrette DOT com>
Cc: bug-libtool AT gnu DOT org, cygwin AT cygwin DOT com
Subject: Re: Cygwin's libtool problem with directory that contains white spaces
Message-ID: <20050322095042.GE2797@iam.uni-bonn.de>
Mail-Followup-To: Jean-Philippe Barrette-LaPierre <jpb AT rrette DOT com>, bug-libtool AT gnu DOT org, cygwin AT cygwin DOT com
References: <423F04E2 DOT 7090703 AT rrette DOT com>
Mime-Version: 1.0
In-Reply-To: <423F04E2.7090703@rrette.com>
User-Agent: Mutt/1.4.1i
Organization: Department of Numerical Simulation, University of Bonn

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019