[Hackage] #365: new cabal-install ignores prefix settings in my config file, fails every install

Hackage trac at galois.com
Mon Sep 29 12:43:28 EDT 2008


#365: new cabal-install ignores prefix settings in my config file, fails every
install
---------------------------------+------------------------------------------
  Reporter:  guest               |        Owner:       
      Type:  defect              |       Status:  new  
  Priority:  normal              |    Milestone:       
 Component:  cabal-install tool  |      Version:       
  Severity:  normal              |     Keywords:       
Difficulty:  normal              |   Ghcversion:  6.8.3
  Platform:  Linux               |  
---------------------------------+------------------------------------------
 Installing xhtml-3000.2.0.1 with cabal fails because it tries to write to
 /usr/local, to which it doesn't have access. This shouldn't happen because
 my whole ghc installation lives in ~/usr and cabal is configured to put
 stuff there. A manual build (using ./Setup configure --prefix=... + build
 + install) works.

 Oops. I just noticed that installing ''any'' package with cabal fails.
 It's just that xhtml is the first out-of-date package on my system. The
 last thing I did before was 'cabal upgrade cabal-install', which installed
 a new Cabal and cabal-install. Now every package (with verbose=2) says
 stuff like
 {{{
 Using Cabal-1.4.0.2 compiled by ghc-6.8
 Using compiler: ghc-6.8.3
 Using install prefix: /usr/local
 Binaries installed in: /usr/local/bin
 Libraries installed in: /usr/local/lib/cabal-install-0.5.2/ghc-6.8.3
 Private binaries installed in: /usr/local/libexec
 Data files installed in: /usr/local/share/cabal-install-0.5.2
 Documentation installed in: /usr/local/share/doc/cabal-install-0.5.2
 }}}

 So it seems like the new cabal ignores my ~/.cabal/config file since
 specifying a --prefix on the command line works fine.

 Here's a sample run:
 {{{
 % cabal upgrade --dry-run
 Resolving dependencies...
 In order, the following would be installed:
 xhtml-3000.2.0.1
 cgi-3001.1.7.0

 % cabal upgrade
 Resolving dependencies...
 'xhtml-3000.2.0.1' is cached.
 Configuring xhtml-3000.2.0.1...
 Preprocessing library xhtml-3000.2.0.1...
 Building xhtml-3000.2.0.1...
 [ 1 of 15] Compiling Text.XHtml.BlockTable ( Text/XHtml/BlockTable.hs,
 dist/build/Text/XHtml/BlockTable.o )
 [ 2 of 15] Compiling Text.XHtml.Internals ( Text/XHtml/Internals.hs,
 dist/build/Text/XHtml/Internals.o )
 [ 3 of 15] Compiling Text.XHtml.Transitional.Elements (
 Text/XHtml/Transitional/Elements.hs,
 dist/build/Text/XHtml/Transitional/Elements.o )
 [ 4 of 15] Compiling Text.XHtml.Transitional.Attributes (
 Text/XHtml/Transitional/Attributes.hs,
 dist/build/Text/XHtml/Transitional/Attributes.o )
 [ 5 of 15] Compiling Text.XHtml.Frameset.Attributes (
 Text/XHtml/Frameset/Attributes.hs,
 dist/build/Text/XHtml/Frameset/Attributes.o )
 [ 6 of 15] Compiling Text.XHtml.Strict.Attributes (
 Text/XHtml/Strict/Attributes.hs, dist/build/Text/XHtml/Strict/Attributes.o
 )
 [ 7 of 15] Compiling Text.XHtml.Frameset.Elements (
 Text/XHtml/Frameset/Elements.hs, dist/build/Text/XHtml/Frameset/Elements.o
 )
 [ 8 of 15] Compiling Text.XHtml.Strict.Elements (
 Text/XHtml/Strict/Elements.hs, dist/build/Text/XHtml/Strict/Elements.o )
 [ 9 of 15] Compiling Text.XHtml.Extras ( Text/XHtml/Extras.hs,
 dist/build/Text/XHtml/Extras.o )
 [10 of 15] Compiling Text.XHtml.Strict ( Text/XHtml/Strict.hs,
 dist/build/Text/XHtml/Strict.o )
 [11 of 15] Compiling Text.XHtml.Frameset ( Text/XHtml/Frameset.hs,
 dist/build/Text/XHtml/Frameset.o )
 [12 of 15] Compiling Text.XHtml.Table ( Text/XHtml/Table.hs,
 dist/build/Text/XHtml/Table.o )

 Text/XHtml/Table.hs:31:20: Warning: Defined but not used: `fn'
 [13 of 15] Compiling Text.XHtml.Debug ( Text/XHtml/Debug.hs,
 dist/build/Text/XHtml/Debug.o )

 Text/XHtml/Debug.hs:34:17: Warning: Defined but not used: `c'
 [14 of 15] Compiling Text.XHtml.Transitional ( Text/XHtml/Transitional.hs,
 dist/build/Text/XHtml/Transitional.o )
 [15 of 15] Compiling Text.XHtml       ( Text/XHtml.hs,
 dist/build/Text/XHtml.o )
 /usr/bin/ar: creating dist/build/libHSxhtml-3000.2.0.1.a
 cabal: Error: some packages failed to install:
 cgi-3001.1.7.0 depends on xhtml-3000.2.0.1 which failed to install.
 xhtml-3000.2.0.1 failed during the final install step. The exception was:
 /usr/local/share/doc/xhtml-3000.2.0.1: createDirectory: permission denied
 (Permission denied)

 % cabal --version
 cabal-install version 0.5.2
 using version 1.4.0.2 of the Cabal library

 % cat ~/.cabal/config
 repos: hackage.haskell.org:http://hackage.haskell.org/packages/archive
 cachedir: "/home/mauke/.cabal/packages"
 hackage-username: ""
 hackage-password: ""
 compiler: ghc
 user-install: False
 user-prefix: "/home/mauke/usr/local"
 global-prefix: "/home/mauke/usr/local"

 % type cabal ghc
 cabal is /home/mauke/usr/local/bin/cabal
 ghc is /home/mauke/usr/local/bin/ghc

 % ghc --version
 The Glorious Glasgow Haskell Compilation System, version 6.8.3

 }}}

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


More information about the cabal-devel mailing list