Skip to content

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

Closed

Description

@tibbe

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.

Activity

  1. 23Skidoo commented on Jan 1, 2014

    @23Skidoo
    Member

    Would be helpful if a build log was provided.

  2. 23Skidoo commented on Jan 1, 2014

    @23Skidoo
    Member

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

  3. 23Skidoo commented on Jan 2, 2014

    @23Skidoo
    Member

    @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.

  4. 23Skidoo commented on Jan 3, 2014

    @23Skidoo
    Member

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

  5. added this to the milestone on Apr 23, 2015
  6. DemiMarie commented on Sep 13, 2015

    @DemiMarie

    The only solution I know of is to either fix or ditch Autoconf, which has a bad track record with handling spaces in variables.

  7. gbaz commented on Feb 18, 2016

    @gbaz
    Collaborator

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

  8. 23Skidoo commented on Feb 18, 2016

    @23Skidoo
    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.

  9. 23Skidoo commented on Feb 24, 2016

    @23Skidoo
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions