Cygwin's libtool problem with directory that contains white spaces

Jean-Philippe Barrette-LaPierre jpb@rrette.com
Mon Mar 21 18:58:00 GMT 2005


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:

-------------------------------------------------------------------------------------
Making all in examples
make[2]: Entering directory `/home/Jean-Philippe Barret/curlpp/examples'
/bin/bash ../libtool --silent --mode=link --tag=CXX g++ -I../ -g  -W 
-Wall -Werr
or   -I/usr/local/include -g  -W -Wall -Werror   -I/usr/local/include 
-L../curlp
p/ -lcurlpp -static  -o example01.exe  example01.o  -lstdc++ 
-L/usr/local/lib -l
curl -lssl -lcrypto -lgdi32 -lwinmm -lz
libtool: link: cannot find the library `'
make[2]: *** [example01.exe] Error 1
make[2]: Leaving directory `/home/Jean-Philippe Barret/curlpp/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Jean-Philippe Barret/curlpp'
make: *** [all] Error 2
----------------------------------------------------------------------------------------------

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/includ
e -L../curlpp/ -lcurlpp -static  -o example01.exe  example01.o  -lstdc++ 
-L/usr
/local/lib -lcurl -lssl -lcrypto -lgdi32 -lwinmm -lz

here's the output:

--------------------------------------------------------------------------------------
+ preserve_args= --debug
+ test 29 -gt 0
+ arg=--silent
+ shift
+ optarg=
+ test -n ''
+ show=:
+ preserve_args= --debug --silent
+ test 28 -gt 0
+ arg=--mode=link
+ shift
++ echo X--mode=link
++ /usr/bin/sed -e '1s/^X//' -e 's/[-_a-zA-Z0-9]*=//'
+ optarg=link
+ test -n ''
+ mode=link
+ test 27 -gt 0
+ arg=--tag=CXX
+ shift
++ echo X--tag=CXX
++ /usr/bin/sed -e '1s/^X//' -e 's/[-_a-zA-Z0-9]*=//'
+ optarg=CXX
+ test -n ''
+ set 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
+ shift
+ prev=tag
+ preserve_args= --debug --silent --tag
+ test 27 -gt 0
+ arg=CXX
+ shift
+ optarg=
+ test -n tag
+ tagname=CXX
+ preserve_args= --debug --silent --tag=CXX
+ grep '^# ### BEGIN LIBTOOL TAG CONFIG: CXX$'
+ taglist= CXX
++ /usr/bin/sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: CXX$/,/^# ### 
END LIBTOOL TAG CONFIG: CXX$/p'
+ eval '# ### BEGIN LIBTOOL TAG CONFIG: CXX

# Libtool was configured on host LAPTRON:

# Shell to use when invoking shell scripts.
SHELL="/bin/bash"

# Whether or not to build shared libraries.
build_libtool_libs=yes

# Whether or not to build static libraries.
build_old_libs=no

# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=no

# Whether or not to disallow shared libs when runtime libs are static
allow_libtool_libs_with_static_runtimes=yes

# Whether or not to optimize for fast installation.
fast_install=needless

# The host system.
host_alias=
host=i686-pc-cygwin

# An echo program that does not interpret backslashes.
echo="echo"

# The archiver.
AR="ar"
AR_FLAGS="cru"

# A C compiler.
LTCC="gcc"

# A language-specific compiler.
CC="g++"

# Is the compiler the GNU C compiler?
with_gcc=yes

# An ERE matcher.
EGREP="grep -E"

# The linker used to build libraries.
LD="/usr/i686-pc-cygwin/bin/ld.exe"

# Whether we need hard or soft links.
LN_S="ln -s"

# A BSD-compatible nm program.
NM="/usr/bin/nm -B"

# A symbol stripping program
STRIP="strip"

# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=file

# Used on cygwin: DLL creation program.
DLLTOOL="dlltool"

# Used on cygwin: object dumper.
OBJDUMP="objdump"

# Used on cygwin: assembler.
AS="as"

# The name of the directory that contains temporary libtool files.
objdir=.libs

# How to create reloadable object files.
reload_flag=" -r"
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"

# How to pass a linker flag through the compiler.
wl="-Wl,"

# Object file suffix (normally "o").
objext="o"

# Old archive suffix (normally "a").
libext="a"

# Shared library suffix (normally ".so").
shrext_cmds='\''.dll'\''

# Executable file suffix (normally "").
exeext=""

# Additional compiler flags for building library objects.
pic_flag=" -DPIC"
pic_mode=default

# What is the maximum length of a command?
max_cmd_len=8192

# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"

# Must we lock files when doing compilation ?
need_locks="no"

# Do we need the lib prefix for modules?
need_lib_prefix=no

# Do we need a version for libraries?
need_version=no

# Whether dlopen is supported.
dlopen_support=yes

# Whether dlopen of programs is supported.
dlopen_self=no

# Whether dlopen of statically linked programs is supported.
dlopen_self_static=unknown

# Compiler flag to prevent dynamic linking.
link_static_flag="-static"

# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"

# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec="\${wl}--export-dynamic"

# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec="\${wl}--whole-archive\$convenience 
\${wl}--no-whole-archive"

# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=""

# Library versioning type.
version_type=windows

# Format of library name prefix.
libname_spec="lib\$name"

# List of archive names.  First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec="\$libname.dll.a"

# The coded name of the library, if different from the real name.
soname_spec="\`echo \${libname} | sed -e s/^lib/cyg/\`\`echo \${release} 
| \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"

# Commands used to build and install an old-style archive.
RANLIB="ranlib"
old_archive_cmds="\$AR \$AR_FLAGS 
\$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
old_postuninstall_cmds=""

# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=""

# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=""

# Commands used to build and install a shared archive.
archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs 
\$deplibs \$postdep_objects \$compiler_flags -o \$output_objdir/\$soname 
\${wl}--image-base=0x10000000 \${wl}--out-implib,\$lib"
archive_expsym_cmds="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" 
= xEXPORTS; then
    cp \$export_symbols \$output_objdir/\$soname.def;
      else
    echo EXPORTS > \$output_objdir/\$soname.def;
    cat \$export_symbols >> \$output_objdir/\$soname.def;
      fi~
      \$CC -shared -nostdlib \$output_objdir/\$soname.def 
\$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags 
-o \$output_objdir/\$soname \${wl}--image-base=0x10000000 
\${wl}--out-implib,\$lib"
postinstall_cmds="base_file=\\\`basename \\\${file}\\\`~
      dlpath=\\\`\$SHELL 2>&1 -c '\''. 
\$dir/'\''\\\${base_file}'\''i;echo \\\$dlname'\''\\\`~
      dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
      test -d \\\$dldir || mkdir -p \\\$dldir~
      \$install_prog \$dir/\$dlname \\\$dldir/\$dlname"
postuninstall_cmds="dldll=\\\`\$SHELL 2>&1 -c '\''. \$file; echo 
\\\$dlname'\''\\\`~
      dlpath=\$dir/\\\$dldll~
       \$rm \\\$dlpath"

# Commands used to build a loadable module (assumed same as above if empty)
module_cmds=""
module_expsym_cmds=""

# Commands to strip libraries.
old_striplib="strip --strip-debug"
striplib="strip --strip-unneeded"

# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects="/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtbegin.o"

# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects="/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtend.o"

# Dependencies to place before the objects being linked to create a
# shared library.
predeps=""

# Dependencies to place after the objects being linked to create a
# shared library.
postdeps="-lstdc++ -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 
-lshell32 -lgcc"

# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path="-L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3 
-L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../.."

# Method to check whether dependent libraries are shared objects.
deplibs_check_method="file_magic ^x86 archive import|^x86 DLL"

# Command to use when deplibs_check_method == file_magic.
file_magic_cmd="func_win32_libid"

# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag="unsupported"

# Flag that forces no undefined symbols.
no_undefined_flag=""

# Commands used to finish a libtool library installation in a directory.
finish_cmds=""

# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=""

# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="sed -n -e '\''s/^.*[     
]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[     ][     
]*\\(_\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'\''"

# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e '\''s/^. .* \\(.*\\)\$/extern int 
\\1;/p'\''"

# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address="sed -n -e '\''s/^: \\([^ ]*\\) \$/  
{\\\"\\1\\\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \\([^ ]*\\) \\([^ 
]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'\''"

# This is the shared library runtime path variable.
runpath_var=LD_RUN_PATH

# This is the shared library path variable.
shlibpath_var=PATH

# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=yes

# How to hardcode a shared library path into an executable.
hardcode_action=immediate

# Whether we should hardcode library paths into libraries.
hardcode_into_libs=no

# Flag to hardcode $libdir into a binary during linking.
# This must work even if $libdir does not exist.
hardcode_libdir_flag_spec="-L\$libdir"

# If ld is used when linking, flag to hardcode $libdir into
# a binary during linking. This must work even if $libdir does
# not exist.
hardcode_libdir_flag_spec_ld=""

# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=""

# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=no

# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=no

# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=

# Set to yes if building a shared library automatically hardcodes DIR 
into the library
# and all subsequent libraries and executables linked against it.
hardcode_automatic=no

# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX 
COMPILER_PATH LIBRARY_PATH"

# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=unknown

# Compile-time system search path for libraries
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"

# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib /usr/lib"

# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""

# Set to yes if exported symbols are required.
always_export_symbols=no

# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe 
| \$SED -e '\''/^[BCDGRS] /s/.* \\\\([^ ]*\\\\)/\\\\1 DATA/;/^.* 
__nm__/s/^.* __nm__\\\\([^ ]*\\\\) [^ ]*/\\\\1 DATA/;/^I /d;/^[AITW] 
/s/.* //'\'' | sort | uniq > \$export_symbols"

# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=""

# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=""

# Symbols that must always be exported.
include_expsyms=""

# ### END LIBTOOL TAG CONFIG: CXX'
++ SHELL=/bin/bash
++ build_libtool_libs=yes
++ build_old_libs=no
++ build_libtool_need_lc=no
++ allow_libtool_libs_with_static_runtimes=yes
++ fast_install=needless
++ host_alias=
++ host=i686-pc-cygwin
++ echo=echo
++ AR=ar
++ AR_FLAGS=cru
++ LTCC=gcc
++ CC=g++
++ with_gcc=yes
++ EGREP=grep -E
++ LD=/usr/i686-pc-cygwin/bin/ld.exe
++ LN_S=ln -s
++ NM=/usr/bin/nm -B
++ STRIP=strip
++ MAGIC_CMD=file
++ DLLTOOL=dlltool
++ OBJDUMP=objdump
++ AS=as
++ objdir=.libs
++ reload_flag= -r
++ reload_cmds=$LD$reload_flag -o $output$reload_objs
++ wl=-Wl,
++ objext=o
++ libext=a
++ shrext_cmds=.dll
++ exeext=
++ pic_flag= -DPIC
++ pic_mode=default
++ max_cmd_len=8192
++ compiler_c_o=yes
++ need_locks=no
++ need_lib_prefix=no
++ need_version=no
++ dlopen_support=yes
++ dlopen_self=no
++ dlopen_self_static=unknown
++ link_static_flag=-static
++ no_builtin_flag= -fno-builtin
++ export_dynamic_flag_spec=${wl}--export-dynamic
++ whole_archive_flag_spec=${wl}--whole-archive$convenience 
${wl}--no-whole-archive
++ thread_safe_flag_spec=
++ version_type=windows
++ libname_spec=lib$name
++ library_names_spec=$libname.dll.a
++ soname_spec=`echo ${libname} | sed -e s/^lib/cyg/``echo ${release} | 
$SED -e s/[.]/-/g`${versuffix}${shared_ext}
++ RANLIB=ranlib
++ old_archive_cmds=$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs~$RANLIB 
$oldlib
++ old_postinstall_cmds=$RANLIB $oldlib~chmod 644 $oldlib
++ old_postuninstall_cmds=
++ old_archive_from_new_cmds=
++ old_archive_from_expsyms_cmds=
++ archive_cmds=$CC -shared -nostdlib $predep_objects $libobjs $deplibs 
$postdep_objects $compiler_flags -o $output_objdir/$soname 
${wl}--image-base=0x10000000 ${wl}--out-implib,$lib
++ archive_expsym_cmds=if test \"x\`$SED 1q $export_symbols\`\" = 
xEXPORTS; then
    cp $export_symbols $output_objdir/$soname.def;
      else
    echo EXPORTS > $output_objdir/$soname.def;
    cat $export_symbols >> $output_objdir/$soname.def;
      fi~
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags -o 
$output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib
++ postinstall_cmds=base_file=\`basename \${file}\`~
      dlpath=\`$SHELL 2>&1 -c '. $dir/'\${base_file}'i;echo \$dlname'\`~
      dldir=$destdir/\`dirname \$dlpath\`~
      test -d \$dldir || mkdir -p \$dldir~
      $install_prog $dir/$dlname \$dldir/$dlname
++ postuninstall_cmds=dldll=\`$SHELL 2>&1 -c '. $file; echo \$dlname'\`~
      dlpath=$dir/\$dldll~
       $rm \$dlpath
++ module_cmds=
++ module_expsym_cmds=
++ old_striplib=strip --strip-debug
++ striplib=strip --strip-unneeded
++ predep_objects=/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtbegin.o
++ postdep_objects=/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtend.o
++ predeps=
++ postdeps=-lstdc++ -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 
-lshell32 -lgcc
++ compiler_lib_search_path=-L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3 
-L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../..
++ deplibs_check_method=file_magic ^x86 archive import|^x86 DLL
++ file_magic_cmd=func_win32_libid
++ allow_undefined_flag=unsupported
++ no_undefined_flag=
++ finish_cmds=
++ finish_eval=
++ global_symbol_pipe=sed -n -e 's/^.*[     
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[     ][     
]*\(_\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p'
++ global_symbol_to_cdecl=sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'
++ global_symbol_to_c_name_address=sed -n -e 's/^: \([^ ]*\) $/  
{\"\1\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \([^ ]*\) \([^ ]*\)$/  {"\2", 
(lt_ptr) \&\2},/p'
++ runpath_var=LD_RUN_PATH
++ shlibpath_var=PATH
++ shlibpath_overrides_runpath=yes
++ hardcode_action=immediate
++ hardcode_into_libs=no
++ hardcode_libdir_flag_spec=-L$libdir
++ hardcode_libdir_flag_spec_ld=
++ hardcode_libdir_separator=
++ hardcode_direct=no
++ hardcode_minus_L=no
++ hardcode_shlibpath_var=
++ hardcode_automatic=no
++ variables_saved_for_relink=PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX 
COMPILER_PATH LIBRARY_PATH
++ link_all_deplibs=unknown
++ sys_lib_search_path_spec=/usr/lib /lib/w32api /lib /usr/local/lib
++ sys_lib_dlsearch_path_spec=/lib /usr/lib
++ fix_srcfile_path=
++ always_export_symbols=no
++ export_symbols_cmds=$NM $libobjs $convenience | $global_symbol_pipe | 
$SED -e '/^[BCDGRS] /s/.* \\([^ ]*\\)/\\1 DATA/;/^.* __nm__/s/^.* 
__nm__\\([^ ]*\\) [^ ]*/\\1 DATA/;/^I /d;/^[AITW] /s/.* //' | sort | 
uniq > $export_symbols
++ extract_expsyms_cmds=
++ exclude_expsyms=
++ include_expsyms=
+ prev=
+ prevopt=
+ continue
+ test 26 -gt 0
+ arg=g++
+ shift
+ optarg=
+ test -n ''
+ nonopt=g++
+ break
+ test -n ''
+ exec_cmd=
+ test -z ''
+ test -z link
+ test -n ''
+ generic_help=Try `libtool --help' for more information.
+ help=Try `libtool --help --mode=link' for more information.
+ modename=libtool: link
+ allow_undefined=yes
+ libtool_args=g++
+ base_compile=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
+ compile_command=g++
+ finalize_command=g++
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
++ pwd
+ lib_search_path=/home/Jean-Philippe Barret/curlpp/examples
+ inst_prefix_dir=
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ func_infer_tag 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
+ test -n ' CXX'
+ test -z CXX
+ test X-static = X-all-static
+ test -z ' -DPIC'
+ build_libtool_libs=no
+ build_old_libs=yes
+ prefer_static_libs=yes
+ break
+ test -n ''
+ test 25 -gt 0
+ arg=-I../
+ shift
+ qarg=-I../
+ libtool_args=g++ -I../
+ test -n ''
+ prevarg=-I../
++ echo X-I../
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-I../
+ test -n -I../
+ compile_command=g++ -I../
+ finalize_command=g++ -I../
+ test 24 -gt 0
+ arg=-g
+ shift
+ qarg=-g
+ libtool_args=g++ -I../ -g
+ test -n ''
+ prevarg=-g
++ echo X-g
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-g
+ test -n -g
+ compile_command=g++ -I../ -g
+ finalize_command=g++ -I../ -g
+ test 23 -gt 0
+ arg=-W
+ shift
+ qarg=-W
+ libtool_args=g++ -I../ -g -W
+ test -n ''
+ prevarg=-W
++ echo X-W
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-W
+ test -n -W
+ compile_command=g++ -I../ -g -W
+ finalize_command=g++ -I../ -g -W
+ test 22 -gt 0
+ arg=-Wall
+ shift
+ qarg=-Wall
+ libtool_args=g++ -I../ -g -W -Wall
+ test -n ''
+ prevarg=-Wall
++ echo X-Wall
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-Wall
+ test -n -Wall
+ compile_command=g++ -I../ -g -W -Wall
+ finalize_command=g++ -I../ -g -W -Wall
+ test 21 -gt 0
+ arg=-Werror
+ shift
+ qarg=-Werror
+ libtool_args=g++ -I../ -g -W -Wall -Werror
+ test -n ''
+ prevarg=-Werror
++ echo X-Werror
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-Werror
+ test -n -Werror
+ compile_command=g++ -I../ -g -W -Wall -Werror
+ finalize_command=g++ -I../ -g -W -Wall -Werror
+ test 20 -gt 0
+ arg=-I/usr/local/include
+ shift
+ qarg=-I/usr/local/include
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include
+ test -n ''
+ prevarg=-I/usr/local/include
++ echo X-I/usr/local/include
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-I/usr/local/include
+ test -n -I/usr/local/include
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include
+ test 19 -gt 0
+ arg=-g
+ shift
+ qarg=-g
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g
+ test -n ''
+ prevarg=-g
++ echo X-g
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-g
+ test -n -g
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g
+ test 18 -gt 0
+ arg=-W
+ shift
+ qarg=-W
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W
+ test -n ''
+ prevarg=-W
++ echo X-W
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-W
+ test -n -W
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W
+ test 17 -gt 0
+ arg=-Wall
+ shift
+ qarg=-Wall
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W 
-Wall
+ test -n ''
+ prevarg=-Wall
++ echo X-Wall
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-Wall
+ test -n -Wall
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall
+ test 16 -gt 0
+ arg=-Werror
+ shift
+ qarg=-Werror
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W 
-Wall -Werror
+ test -n ''
+ prevarg=-Werror
++ echo X-Werror
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-Werror
+ test -n -Werror
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror
+ test 15 -gt 0
+ arg=-I/usr/local/include
+ shift
+ qarg=-I/usr/local/include
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W 
-Wall -Werror -I/usr/local/include
+ test -n ''
+ prevarg=-I/usr/local/include
++ echo X-I/usr/local/include
++ /usr/bin/sed -e '1s/^X//' -e 's/\([\\`\\"$\\\\]\)/\\\1/g'
+ arg=-I/usr/local/include
+ test -n -I/usr/local/include
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include
+ test 14 -gt 0
+ arg=-L../curlpp/
+ shift
+ qarg=-L../curlpp/
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W 
-Wall -Werror -I/usr/local/include -L../curlpp/
+ test -n ''
+ prevarg=-L../curlpp/
++ echo X-L../curlpp/
++ /usr/bin/sed -e '1s/^X//' -e 's/^-L//'
+ dir=../curlpp/
++ cd ../curlpp/
++ pwd
+ absdir=/home/Jean-Philippe Barret/curlpp/curlpp
+ test -z '/home/Jean-Philippe Barret/curlpp/curlpp'
+ dir=/home/Jean-Philippe Barret/curlpp/curlpp
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp
+ lib_search_path=/home/Jean-Philippe Barret/curlpp/examples 
/home/Jean-Philippe Barret/curlpp/curlpp
+ dllsearchpath=:/home/Jean-Philippe Barret/curlpp/curlpp
+ continue
+ test 13 -gt 0
+ arg=-lcurlpp
+ shift
+ qarg=-lcurlpp
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W 
-Wall -Werror -I/usr/local/include -L../curlpp/ -lcurlpp
+ test -n ''
+ prevarg=-lcurlpp
+ test X-lcurlpp = X-lc
+ test X-lcurlpp = X-lm
+ test X-lcurlpp = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp
+ continue
+ test 12 -gt 0
+ arg=-static
+ shift
+ qarg=-static
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W 
-Wall -Werror -I/usr/local/include -L../curlpp/ -lcurlpp -static
+ test -n ''
+ prevarg=-static
+ continue
+ test 11 -gt 0
+ arg=-o
+ shift
+ qarg=-o
+ libtool_args=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g -W 
-Wall -Werror -I/usr/local/include -L../curlpp/ -lcurlpp -static -o
+ test -n ''
+ prevarg=-o
+ prev=output
+ test -n -o
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include -o
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include -o
+ test 10 -gt 0
+ arg=example01.exe
+ shift
+ qarg=example01.exe
+ libtool_args=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
+ test -n output
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include -o @OUTPUT@
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include -o @OUTPUT@
+ eval 'output="$arg"'
++ output=example01.exe
+ prev=
+ continue
+ test 9 -gt 0
+ arg=example01.o
+ shift
+ qarg=example01.o
+ libtool_args=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
+ test -n ''
+ prevarg=example01.o
+ objs= example01.o
+ test -n example01.o
+ compile_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include -o @OUTPUT@ example01.o
+ finalize_command=g++ -I../ -g -W -Wall -Werror -I/usr/local/include -g 
-W -Wall -Werror -I/usr/local/include -o @OUTPUT@ example01.o
+ test 8 -gt 0
+ arg=-lstdc++
+ shift
+ qarg=-lstdc++
+ libtool_args=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++
+ test -n ''
+ prevarg=-lstdc++
+ test X-lstdc++ = X-lc
+ test X-lstdc++ = X-lm
+ test X-lstdc++ = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++
+ continue
+ test 7 -gt 0
+ arg=-L/usr/local/lib
+ shift
+ qarg=-L/usr/local/lib
+ libtool_args=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
+ test -n ''
+ prevarg=-L/usr/local/lib
++ echo X-L/usr/local/lib
++ /usr/bin/sed -e '1s/^X//' -e 's/^-L//'
+ dir=/usr/local/lib
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib
+ lib_search_path=/home/Jean-Philippe Barret/curlpp/examples 
/home/Jean-Philippe Barret/curlpp/curlpp /usr/local/lib
+ dllsearchpath=:/home/Jean-Philippe Barret/curlpp/curlpp:/usr/local/lib
+ continue
+ test 6 -gt 0
+ arg=-lcurl
+ shift
+ qarg=-lcurl
+ libtool_args=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
+ test -n ''
+ prevarg=-lcurl
+ test X-lcurl = X-lc
+ test X-lcurl = X-lm
+ test X-lcurl = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl
+ continue
+ test 5 -gt 0
+ arg=-lssl
+ shift
+ qarg=-lssl
+ libtool_args=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
+ test -n ''
+ prevarg=-lssl
+ test X-lssl = X-lc
+ test X-lssl = X-lm
+ test X-lssl = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl
+ continue
+ test 4 -gt 0
+ arg=-lcrypto
+ shift
+ qarg=-lcrypto
+ libtool_args=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
+ test -n ''
+ prevarg=-lcrypto
+ test X-lcrypto = X-lc
+ test X-lcrypto = X-lm
+ test X-lcrypto = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto
+ continue
+ test 3 -gt 0
+ arg=-lgdi32
+ shift
+ qarg=-lgdi32
+ libtool_args=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
+ test -n ''
+ prevarg=-lgdi32
+ test X-lgdi32 = X-lc
+ test X-lgdi32 = X-lm
+ test X-lgdi32 = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32
+ continue
+ test 2 -gt 0
+ arg=-lwinmm
+ shift
+ qarg=-lwinmm
+ libtool_args=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
+ test -n ''
+ prevarg=-lwinmm
+ test X-lwinmm = X-lc
+ test X-lwinmm = X-lm
+ test X-lwinmm = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32 -lwinmm
+ continue
+ test 1 -gt 0
+ arg=-lz
+ shift
+ qarg=-lz
+ libtool_args=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
+ test -n ''
+ prevarg=-lz
+ test X-lz = X-lc
+ test X-lz = X-lm
+ test X-lz = X-lc_r
+ deplibs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32 -lwinmm -lz
+ continue
+ test 0 -gt 0
+ test -n ''
+ test no = yes
+ oldlibs=
++ echo Xexample01.exe
++ /usr/bin/sed -e '1s/^X//' -e 's%^.*/%%'
+ outputname=example01.exe
+ libobjs_save=
+ test -n PATH
+ eval 'shlib_search_path=`$echo' '"X${PATH}"' '|' '$Xsed' -e ''\''s/:/' 
'/g'\''`'
+++ echo 
X/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem
+++ /usr/bin/sed -e '1s/^X//' -e 's/:/ /g'
++ shlib_search_path=/usr/local/bin /usr/bin /bin /usr/X11R6/bin 
/cygdrive/c/WINNT/system32 /cygdrive/c/WINNT /cygdrive/c/WINNT/System32/Wbem
+ eval 'sys_lib_search_path="/usr/lib' /lib/w32api /lib '/usr/local/lib"'
++ sys_lib_search_path=/usr/lib /lib/w32api /lib /usr/local/lib
+ eval 'sys_lib_dlsearch_path="/lib' '/usr/lib"'
++ sys_lib_dlsearch_path=/lib /usr/lib
++ echo Xexample01.exe
++ /usr/bin/sed -e '1s/^X//' -e 's%/[^/]*$%%'
+ output_objdir=example01.exe
+ test Xexample01.exe = Xexample01.exe
+ output_objdir=.libs
+ test '!' -d .libs
+ linkmode=prog
+ duplicate_compiler_generated_deps=yes
+ specialdeplibs=
+ libs=
+ test X = Xyes
+ libs= -L/home/Jean-Philippe
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32 -lwinmm
+ test X = Xyes
+ libs= -L/home/Jean-Philippe Barret/curlpp/curlpp -lcurlpp -lstdc++ 
-L/usr/local/lib -lcurl -lssl -lcrypto -lgdi32 -lwinmm -lz
+ test prog = lib
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no
+ notinst_deplibs=
+ notinst_path=
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes=conv scan dlopen dlpreopen link
+ test prog,conv = lib,link
+ test prog,conv = prog,scan
+ test prog = prog
+ test conv = dlopen
+ lib=
+ found=no
+ test conv = conv
+ deplibs=-L/home/Jean-Philippe
+ continue
+ lib=
+ found=no
+ test no = yes
+ test -f ''
+ echo 'libtool: link: cannot find the library `'\'''
libtool: link: cannot find the library `'
+ exit 1
--------------------------------------------------------------------------------------------

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

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.

--
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/



More information about the Cygwin mailing list