You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cabal-install does not quote the path in the --with-gcc parameter #1634
According to haskell/network#118 cabal-install does properly quote the path passed to --with-gcc, causing failures on Windows when the path contains a space.
@tibbe
My patch didn't fix the problem. From my reading of the build log, this issue is actually autoconf's fault (or maybe a bug in your configure.ac):
configure:2377: checking for gcc
configure:2404: result: "c:\Program Files (x86)\Haskell Platform\2013.2.0.0\mingw\bin\gcc.exe"
configure:2633: checking for C compiler version
configure:2642: "c:\Program Files (x86)\Haskell Platform\2013.2.0.0\mingw\bin\gcc.exe" --version >&5
./configure: line 2644: "c:\Program: No such file or directory
As you can see, it gets the correct path from Cabal (this actually works even without my patch), but then fails because the path contains spaces.
IIUC, @hvr fixed this in #2946 (we now use ./configure CC=/path/to/gcc instead of ./configure --with-gcc=/path/to/gcc). If it still doesn't work, then it's a bug in Autoconf.
Activity
23Skidoo commentedon Jan 1, 2014
Would be helpful if a build log was provided.
'runConfigureScript': quote the gcc path.
23Skidoo commentedon Jan 1, 2014
I'll try to test my fix with network-2.4.2.1 on Windows.
23Skidoo commentedon Jan 2, 2014
@tibbe
My patch didn't fix the problem. From my reading of the build log, this issue is actually autoconf's fault (or maybe a bug in your
configure.ac):As you can see, it gets the correct path from Cabal (this actually works even without my patch), but then fails because the path contains spaces.
23Skidoo commentedon Jan 3, 2014
I've reverted my patch. One interesting workaround suggested on StackOverflow is to use short path names on Windows.
DemiMarie commentedon Sep 13, 2015
The only solution I know of is to either fix or ditch Autoconf, which has a bad track record with handling spaces in variables.
gbaz commentedon Feb 18, 2016
For the record, I've found the short names solution to work. What a pain :-/
23Skidoo commentedon Feb 18, 2016
IIUC, @hvr fixed this in #2946 (we now use
./configure CC=/path/to/gccinstead of./configure --with-gcc=/path/to/gcc). If it still doesn't work, then it's a bug in Autoconf.23Skidoo commentedon Feb 24, 2016
It doesn't, see #3185.