Skip to content

can't build very simple package with latest cabal-install #1241

Closed

Description

@dmwit

See also #1236. For a quick review, I have the following problem:

crabgrass:~% wget http://dmwit.com/tmp.tar.gz && tar xf tmp.tar.gz && cd tmp/foo && cabal install
--2013-03-15 13:49:51--  http://dmwit.com/tmp.tar.gz
Resolving dmwit.com (dmwit.com)... 69.90.123.70
Connecting to dmwit.com (dmwit.com)|69.90.123.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 584 [application/x-gzip]
Saving to: ‘tmp.tar.gz’

100%[=====================================================================================>] 584         --.-K/s   in 0s      

2013-03-15 13:49:51 (50.8 MB/s) - ‘tmp.tar.gz’ saved [584/584]

Warning: The package list for 'hackage.haskell.org' is 17 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
In order, the following will be installed:
foo-0.0 (latest: 1.0) (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
[1 of 1] Compiling Main             ( Setup.hs, dist/setup/Main.o )
Linking ./dist/setup/setup ...
Configuring foo-0.0...
Building foo-0.0...
Preprocessing library foo-0.0...
In-place registering foo-0.0...
setup: foo-0.0: Warning: haddock-interfaces:
/home/dmwit/tmp/foo/dist/doc/html/foo/foo.haddock doesn't exist or isn't a
file
foo-0.0: Warning: haddock-html: /home/dmwit/tmp/foo/dist/doc/html/foo doesn't
exist or isn't a directory
foo-0.0: cannot find libHSfoo-0.0.a on library path (use --force to override)
Failed to install foo-0.0
cabal: Error: some packages failed to install:
foo-0.0 failed during the building phase. The exception was:
ExitFailure 1
zsh: exit 1     cabal install

With the following additional details:

crabgrass:~% cabal --version
cabal-install version 1.17.0
using version 1.17.0 of the Cabal library 
crabgrass:~% uname -a
Linux crabgrass 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64 GNU/Linux
crabgrass:~% grep -v 'password\|--\|^$' ~/.cabal/config
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
remote-repo-cache: /home/dmwit/.cabal/packages
library-profiling: True
documentation: False
doc-index-file: $datadir/doc/index.html
build-summary: /home/dmwit/.cabal/$arch/logs/build.log
remote-build-reporting: anonymous
username: DanielWagner
install-dirs user
  prefix: /home/dmwit/.cabal/$arch
install-dirs global

Activity

  1. 23Skidoo commented on Mar 16, 2013

    @23Skidoo
    Member

    Still can't reproduce:

    $ wget http://dmwit.com/tmp.tar.gz && tar xf tmp.tar.gz && cd tmp/foo && cabal install
    [...]
    Resolving dependencies...
    In order, the following will be installed:
    foo-0.0 (latest: 1.0) (reinstall)
    Warning: Note that reinstalls are always dangerous. Continuing anyway...
    Configuring foo-0.0...
    Building foo-0.0...
    Installed foo-0.0
    

    System config:

    $ uname -a
    Linux blackbox 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:20:02 UTC 2013 i686 athlon i386 GNU/Linux
    
    $ cabal --version
    cabal-install version 1.17.0
    using version 1.17.0 of the Cabal library 
    
    $ grep -v 'password\|--\|^$' ~/.cabal/config
    remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
    remote-repo-cache: /home/cabal-test/.cabal/packages
    world-file: /home/cabal-test/.cabal/world
    library-profiling: True
    documentation: False
    doc-index-file: $datadir/doc/index.html
    build-summary: /home/cabal-test/.cabal/$arch/logs/build.log
    remote-build-reporting: anonymous
    jobs: 2 -- Changing to 1 doesn't make any difference
    install-dirs user
      prefix: /home/cabal-test/.cabal/$arch
    install-dirs global
    

    This is using a freshly built cabal-install from current TOT.

  2. 23Skidoo commented on Mar 20, 2013

    @23Skidoo
    Member

    Managed to reproduce this using the following .cabal file:

    name: issue1244
    Cabal-version: >= 1.2
    version: 1.0
    build-type: Simple
    
    Library
    

    Then I get:

    $ cabal configure && cabal build
    Resolving dependencies...
    Configuring issue1244-1.0...
    Building issue1244-1.0...
    Preprocessing library issue1244-1.0...
    In-place registering issue1244-1.0...
    cabal: issue1244-1.0: Warning: haddock-interfaces:
    /home/cabal-test/issue1244/dist/doc/html/issue1244/issue1244.haddock doesn't
    exist or isn't a file
    issue1244-1.0: Warning: haddock-html:
    /home/cabal-test/issue1244/dist/doc/html/issue1244 doesn't exist or isn't a
    directory
    issue1244-1.0: cannot find libHSissue1244-1.0.a on library path (use --force
    to override)
    
    $ ls
    dist  issue1244.cabal
    
    $ head -1 dist/setup-config
    Saved package config for issue1244-1.0 written by Cabal-1.17.0 using ghc-7.4
    

    System configuration:

    $ ghc-pkg list Cabal --simple-output
    Cabal-1.14.0
    
    $ ghc --version
    The Glorious Glasgow Haskell Compilation System, version 7.4.2
    
    $ cabal --version
    cabal-install version 1.17.0
    using version 1.17.0 of the Cabal library 
    
  3. 23Skidoo commented on Mar 20, 2013

    @23Skidoo
    Member

    Some things I've discovered:

    a) The error is encountered when we invoke ghc-pkg like that:

    ("/home/gman/bin/ghc-7.4.2/bin/ghc-pkg",["update","-","--global","--user",
    "--package-conf=dist/package.conf.inplace","-v2"])
    

    b) In 1.16, cat dist/package.conf.inplace produces

    [InstalledPackageInfo {installedPackageId = InstalledPackageId
    "issue1244-1.0-inplace", sourcePackageId = PackageIdentifier {pkgName =
    PackageName "issue1244", pkgVersion = Version {versionBranch = [1,0],
    versionTags = []}}, license = AllRightsReserved, copyright = "", maintainer =
    "", author = "", stability = "", homepage = "", pkgUrl = "", synopsis = "",
    description = "", category = "", exposed = True, exposedModules = [],
    hiddenModules = [], trusted = False, importDirs = [], libraryDirs = [],
    hsLibraries = [], extraLibraries = [], extraGHCiLibraries = [], includeDirs =
    [], includes = [], depends = [], hugsOptions = [], ccOptions = [], ldOptions =
    [], frameworkDirs = [], frameworks = [], haddockInterfaces =
    ["/home/cabal-test/issue1244/dist/doc/html/issue1244/issue1244.haddock"],
    haddockHTMLs = ["/home/cabal-test/issue1244/dist/doc/html/issue1244"]} ]
    

    However, in the TOT version the contents of that file are just [].

  4. 23Skidoo commented on Mar 20, 2013

    @23Skidoo
    Member

    Input given to ghc-pkg via stdin is also different.

    TOT:

    name: issue1244
    version: 1.0
    id: issue1244-1.0-inplace
    license: AllRightsReserved
    copyright:
    maintainer:
    stability:
    homepage:
    package-url:
    synopsis:
    description:
    category:
    author:
    exposed: True
    exposed-modules:
    hidden-modules:
    trusted: False
    import-dirs:
    library-dirs:
    hs-libraries: HSissue1244-1.0
    extra-libraries:
    extra-ghci-libraries:
    include-dirs:
    includes:
    depends:
    hugs-options:
    cc-options:
    ld-options:
    framework-dirs:
    frameworks:
    haddock-interfaces: /home/cabal-test/issue1244/dist/doc/html/issue1244/issue1244.haddock
    haddock-html: /home/cabal-test/issue1244/dist/doc/html/issue1244
    

    1.16:

    name: issue1244
    version: 1.0
    id: issue1244-1.0-inplace
    license: AllRightsReserved
    copyright:
    maintainer:
    stability:
    homepage:
    package-url:
    synopsis:
    description:
    category:
    author:
    exposed: True
    exposed-modules:
    hidden-modules:
    trusted: False
    import-dirs:
    library-dirs:
    hs-libraries:
    extra-libraries:
    extra-ghci-libraries:
    include-dirs:
    includes:
    depends:
    hugs-options:
    cc-options:
    ld-options:
    framework-dirs:
    frameworks:
    haddock-interfaces: /home/cabal-test/issue1244/dist/doc/html/issue1244/issue1244.haddock
    haddock-html: /home/cabal-test/issue1244/dist/doc/html/issue1244
    
  5. 23Skidoo commented on Mar 20, 2013

    @23Skidoo
    Member

    hs-libraries: HSissue1244-1.0

    Looks like this is what was causing the problem. Bug introduced by @igfoo in 8395c5d. package-conf.inplace is updated by ghc-pkg itself, which is why it was empty when I tested with 1.17.

  6. added 3 commits that reference this issue on Mar 20, 2013
    f6d616e
    7c3ea67
    887dccb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions