[Hackage] #177: Include-dirs,
extra-lib-dirs with spaces doesn't work under Windows
Hackage
trac at galois.com
Mon Nov 12 17:13:43 EST 2007
#177: Include-dirs, extra-lib-dirs with spaces doesn't work under Windows
----------------------+-----------------------------------------------------
Reporter: guest | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Cabal | Version: 1.2.2.0
Severity: normal | Keywords:
Difficulty: normal | Ghcversion: 6.6
Platform: Windows |
----------------------+-----------------------------------------------------
Trying to build the HDBC-PostGreSQL database driver[1] revealed some poor
handling of pathames under Windows.
The package requires that the paths to postgre header and libraries files
be added to the .cabal file. My initial attempt was the obvious:
{{{
include-dirs: C:\Program Files\PostgreSQL\8.2\include, C:\Program
Files\PostgreSQL\8.2\include\server, .
extra-lib-dirs: C:\Program Files\PostgreSQL\8.2\include, C:\Program
Files\PostgreSQL\8.2\include\server
}}}
However, the package would not build. The include files "pg_config.h" and
some others were not found. Using single or double quotes did not help.
Finally, I moved the installation to "C:\pgsql" and updated the .cabal
file:
{{{
include-dirs: C:\pgsql\include, C:\pgsql\include\server, .
extra-lib-dirs: C:\pgsql\lib
}}}
And the package built. It seems the spaces in the first path caused the
problem.
For reference, this it the configure output on my machine:
{{{
Configuring HDBC-postgresql-1.0.1.0...
configure: Dependency base-any: using base-2.1.1
configure: Dependency mtl-any: using mtl-1.0.1
configure: Dependency HDBC>=1.0.0: using HDBC-1.0.1
configure: Dependency parsec-any: using parsec-2.0
configure: Using install prefix: C:\Program Files
configure: Binaries installed in: C:\Program Files\Haskell\bin
configure: Libraries installed in: C:\Program Files\Haskell\HDBC-
postgresql-1.0.1.0\ghc-6.6.1
configure: Private binaries installed in: C:\Program Files\HDBC-
postgresql-1.0.1.0
configure: Data files installed in: C:\Program Files\Common Files\HDBC-
postgresql-1.0.1.0
configure: Using compiler: c:\ghc\ghc-6.6.1\bin\ghc.exe
configure: Compiler flavor: GHC
configure: Compiler version: 6.6.1
configure: Using package tool: c:\ghc\ghc-6.6.1\bin\ghc-pkg.exe
configure: Using ar found on system at: c:\ghc\ghc-6.6.1\bin\ar.exe
configure: Using haddock found on system at:
C:\haddock\haddock-0.8\haddock.exe
configure: No pfesetup found
configure: Using ranlib found on system at: c:\MinGW\bin\ranlib.exe
configure: Using runghc found on system at:
c:\ghc\ghc-6.6.1\bin\runghc.exe
configure: Using runhugs found on system at: C:\Program
Files\WinHugs\runhugs.exe
configure: No happy found
configure: No alex found
configure: Using hsc2hs: c:\ghc\ghc-6.6.1\bin\hsc2hs.exe
configure: No c2hs found
configure: No cpphs found
configure: No greencard found
}}}
Feel free to email me at jgbailey AT gmail DOT com for more info.
[1] Version 1.0.1.0 available at http://hackage.haskell.org/cgi-bin
/hackage-scripts/package/HDBC-postgresql-1.0.1.0. HDBC is also required. I
used 1.0.1, available at http://hackage.haskell.org/cgi-bin/hackage-
scripts/package/HDBC-1.0.1.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/177>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list