[Hackage] #316: on Windows, include paths with spaces not properly passed to c2hs

Hackage trac at galois.com
Fri Aug 1 02:32:29 EDT 2008


#316: on Windows, include paths with spaces not properly passed to c2hs
----------------------------+-----------------------------------------------
  Reporter:  jwlato         |        Owner:                    
      Type:  defect         |       Status:  new               
  Priority:  normal         |    Milestone:                    
 Component:  Cabal library  |      Version:  1.2.4.0           
  Severity:  normal         |     Keywords:  include-dirs, c2hs
Difficulty:  normal         |   Ghcversion:  6.8.3             
  Platform:  Windows        |  
----------------------------+-----------------------------------------------
 On windows, path names with spaces aren't passed to build tools properly.
 In a new project, with a source file Test.chs

 and a cabal file with (boilerplate excluded)
 {{{
 #!c
   exposed-modules: Test
   build-tools:     c2hs
   include-dirs:    "C:\\Program Files\\include"
 }}}

 then attempting "runhaskell Setup.lhs build -v" indicates that the
 following is executed:
 {{{
 #!c
 c:\Program Files\Haskell\bin\c2hs.exe --include=dist\build
 --cppopts=-D__GLASGOW_HASKELL__=608 --cppopts=-IC:\Program Files\include
     --output-dir=dist\build --output=Test.hs Test.chs
 }}}

 This command fails because c2hs interprets Files\include as a filename to
 process.
 The -IC:\Program Files ... should be quoted to preserve the space in the
 path.

 I have attached a test.cabal and Test.chs file that demonstrate the
 problem.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/316>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list