bug-libtool
[Top][All Lists]
Advanced

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

bug#17635: Libtool mangling compiler options if they contain double quot


From: fabrizio . ge
Subject: bug#17635: Libtool mangling compiler options if they contain double quotes, causing compilation failure
Date: Thu, 29 May 2014 22:07:22 +0200

Hello,

I am trying to build Portaudio (http://portaudio.com/download.html ,
pa_stable_v19_20140130.tgz). My system: Windows 8, MinGW MSYS, Bash shell
3.1.0, gcc 4.8.0, GNU binutils 2.23.2, GNU Make (mingw32-make) 3.82.90.
Portaudio comes with an ltmain.sh script VERSION="2.4 Debian-2.4-2ubuntu1".


I run configure. The generated Makefile sports the following line:

CFLAGS = -g -O2 -DPA_LITTLE_ENDIAN -I$(top_srcdir)/include
-I$(top_srcdir)/src/common -I$(top_srcdir)/src/os/win -DPA_USE_WMME=0
-DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0
-UPA_USE_WMME -DPA_USE_WMME=1 -mthreads -DPACKAGE_NAME=""
-DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING=""
-DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=".libs/" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1

There seems to be nothing wrong with it. And, yet, when launching make, it seems that libtool mangles with it. Launching compilation with make fails
when compiling the first file. Here's the output:

$ mingw32-make.exe
C:/Users/Fabrizio/Documents/git/bin/sh.exe ./libtool --mode=compile gcc -c
-g -O2 -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/win
-DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0 -UPA_USE_WMME -DPA_USE_WMME=1 -mthreads -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DST
DC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=".libs/" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4
-DSIZEOF_LONG=4 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1
src/common/pa_allocation.c -o src/common/pa_allocation.lo
libtool: compile: gcc -c -g -O2 -DPA_LITTLE_ENDIAN -I./include
-I./src/common -I./src/os/win -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0 -UPA_USE_WMME -DPA_USE_WMME=1 -mthreads "-DPACKAGE_NAME=\" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREP
ORT="" -DPACKAGE_URL="" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=".libs/"
-DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DHAVE_CLOCK_GETTIME=1
-DHAVE_NANOSLEEP=1 src/common/pa_allocation.c -o src/common/pa_allocation.lo"
-DDLL_EXPORT -DPIC -o .libs/pa_allocation.o
gcc.exe: fatal error: no input files
compilation terminated.
makefile:227: recipe for target 'src/common/pa_allocation.lo' failed
mingw32-make: *** [src/common/pa_allocation.lo] Error 1

Notice that -DPACKAGE_NAME="" has been turned into "-DPACKAGE_NAME=\", with the initial double quote left unclosed (the final one does not close that,
it is escaped) and the added closing double quote after -o
src/common/pa_allocation.lo.

I tried launching the following command line, same as the one created by libtool except for the removal of the modifications introduced by libtool

gcc -c -g -O2 -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/win
-DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0
-DPA_USE_WASAPI=0 -UPA_USE_WMME -DPA_USE_WMME=1 -mthreads -DPACKAGE_NAME=""
-DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING=""
-DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=".libs/" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1
src/common/pa_allocation.c -o src/common/pa_allocation.lo -DDLL_EXPORT
-DPIC -o .libs/pa_allocation.o

That worked.

This means that the mangling operated by Libtool is causing the wrong command line to be executed.

Regards,
Fabrizio

Scopri istella, il nuovo motore per il web italiano.
Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video.
Usa istella, vai su http://www.istella.it?wtk=amc138614816829636







reply via email to

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