Skip to content

cabal-install does not quote the path in the --with-gcc parameter #1634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tibbe opened this issue Dec 31, 2013 · 8 comments
Closed

cabal-install does not quote the path in the --with-gcc parameter #1634

tibbe opened this issue Dec 31, 2013 · 8 comments
Milestone

Comments

@tibbe
Copy link
Member

tibbe commented Dec 31, 2013

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.

@23Skidoo
Copy link
Member

23Skidoo commented Jan 1, 2014

Would be helpful if a build log was provided.

23Skidoo added a commit that referenced this issue Jan 1, 2014
@23Skidoo
Copy link
Member

23Skidoo commented Jan 1, 2014

I'll try to test my fix with network-2.4.2.1 on Windows.

@23Skidoo
Copy link
Member

23Skidoo commented 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):

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.

@23Skidoo
Copy link
Member

23Skidoo commented Jan 3, 2014

I've reverted my patch. One interesting workaround suggested on StackOverflow is to use short path names on Windows.

@DemiMarie
Copy link

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
Copy link
Collaborator

gbaz commented Feb 18, 2016

For the record, I've found the short names solution to work. What a pain :-/

@23Skidoo
Copy link
Member

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.

@23Skidoo
Copy link
Member

If it still doesn't work, then it's a bug in Autoconf.

It doesn't, see #3185.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants