[Hackage] #633: Cabal-1.8.0.2 fails to build packages for hugs:
--inplace is not supported with Hugs
Hackage
trac at galois.com
Thu Feb 11 15:28:26 EST 2010
#633: Cabal-1.8.0.2 fails to build packages for hugs: --inplace is not supported
with Hugs
----------------------------+-----------------------------------------------
Reporter: nomeata | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Cabal library | Version: 1.6.0.1
Severity: normal | Keywords:
Difficulty: unknown | Ghcversion:
Platform: |
----------------------------+-----------------------------------------------
For the Debian packages, we use Cabal to build packages for ghc6 and for
hugs. Unfortunately, with Cabal-1.8, the hugs support is broken:
{{{
debian/hlibrary.setup configure --hugs --prefix=/usr -v2 --builddir=dist-
hugs
Configuring binary-0.5.0.2...
Flags chosen: applicative-in-base=True, split-base=True,
bytestring-in-base=True
Dependency array -any: using array
Dependency base >1 && <1: using base
Dependency containers -any: using containers
Using Cabal-1.8.0.2 compiled by ghc-6.12
Using compiler: hugs
Using install prefix: /usr
Binaries installed in: /usr/bin
Libraries installed in: /usr/lib/hugs/packages/binary
Private binaries installed in: /usr/libexec
Data files installed in: /usr/share/binary-0.5.0.2
Documentation installed in: /usr/share/doc/binary-0.5.0.2
No alex found
Using ar found on system at: /usr/bin/ar
No c2hs found
Using cpphs version 1.9 found on system at: /usr/bin/cpphs
Using ffihugs found on system at: /usr/bin/ffihugs
Using gcc version 4.4.3 found on system at: /usr/bin/gcc
Using ghc version 6.12.1 found on system at: /usr/bin/ghc
Using ghc-pkg version 6.12.1 found on system at: /usr/bin/ghc-pkg
No greencard found
Using haddock version 2.6.0 found on system at: /usr/bin/haddock
No happy found
No hmake found
Using hsc2hs version 0.67 found on system at: /usr/bin/hsc2hs
Using hscolour version 1.15 found on system at: /usr/bin/HsColour
Using hugs found on system at: /usr/bin/hugs
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
No pkg-config found
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
debian/hlibrary.setup build --builddir=dist-hugs
Preprocessing library binary-0.5.0.2...
Building binary-0.5.0.2...
Registering binary-0.5.0.2...
hlibrary.setup: --inplace is not supported with Hugs
}}}
The reason seems to be the build function in
./Distribution/Simple/Build.hs:
{{{
build pkg_descr lbi flags suffixes = do
let distPref = fromFlag (buildDistPref flags)
verbosity = fromFlag (buildVerbosity flags)
initialBuildSteps distPref pkg_descr lbi verbosity suffixes
setupMessage verbosity "Building" (packageId pkg_descr)
internalPackageDB <- createInternalPackageDB distPref
withLibLBI pkg_descr lbi $ \lib clbi -> do
info verbosity "Building library..."
buildLib verbosity pkg_descr lbi lib clbi
installedPkgInfo <- generateRegistrationInfo verbosity pkg_descr lib
lbi clbi True{-inplace-} distPref
-- Register the library in-place, so exes can depend
-- on internally defined libraries.
registerPackage verbosity
installedPkgInfo pkg_descr lbi True{-inplace-} internalPackageDB
-- Use the internal package db for the exes.
let lbi' = lbi { withPackageDB = withPackageDB lbi ++
[internalPackageDB] }
withExeLBI pkg_descr lbi' $ \exe clbi -> do
info verbosity $ "Building executable " ++ exeName exe ++ "..."
buildExe verbosity pkg_descr lbi' exe clbi
}}}
Here, the inplace flag is unconditionally set to true. But in
./Distribution/Simple/Register.hs, we have
{{{
registerPackageHugs verbosity installedPkgInfo pkg lbi inplace _packageDb
= do
when inplace $ die "--inplace is not supported with Hugs"
let installDirs = absoluteInstallDirs pkg lbi NoCopyDest
createDirectoryIfMissingVerbose verbosity True (libdir installDirs)
writeUTF8File (libdir installDirs </> "package.conf")
(showInstalledPackageInfo installedPkgInfo)
}}}
I’d be grateful for a quick work-around or patch, as this is holding up
the transition to ghc 6.12 in Debian.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/633>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list