Skip to content

In ghc 7.8.3 on the Mac, for some packages, cabal reinstalls the package instead of telling me I've already installed it. #2108

Closed

Description

@GeorgeCo

In ghc 7.8.3 on the Mac, for some packages cabal reinstalls the package instead of telling me I've already installed it. ghc-pkg check shows I have no issues, e.g.:

bash-3.2$ cabal install cabal-install
Resolving dependencies...
Configuring cabal-install-1.20.0.3...
Building cabal-install-1.20.0.3...
Installed cabal-install-1.20.0.3
Updating documentation index
/Users/gcolpitts/Library/Haskell/share/doc/index.html
bash-3.2$ cabal install cabal-install
Resolving dependencies...
Configuring cabal-install-1.20.0.3...
Building cabal-install-1.20.0.3...
Installed cabal-install-1.20.0.3
Updating documentation index
/Users/gcolpitts/Library/Haskell/share/doc/index.html
bash-3.2$ ghc-pkg check
bash-3.2$

Other packages that have this problem include alex, and an example of a package that doesn't have this problem is vector. Should I file a bug?

bash-3.2$ ghc --info
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts"," -fwrapv")
,("C compiler command","/usr/bin/gcc")
,("C compiler flags"," -m64 -fno-stack-protector")
,("C compiler link flags"," -m64")
,("Haskell CPP command","/usr/bin/gcc")
,("Haskell CPP flags","-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs")
,("ld command","/usr/bin/ld")
,("ld flags"," -arch x86_64")
,("ld supports compact unwind","YES")
,("ld supports build-id","NO")
,("ld supports filelist","YES")
,("ld is GNU ld","NO")
,("ar command","/usr/bin/ar")
,("ar flags","clqs")
,("ar supports at file","NO")
,("touch command","touch")
,("dllwrap command","/bin/false")
,("windres command","/bin/false")
,("libtool command","libtool")
,("perl command","/usr/bin/perl")
,("target os","OSDarwin")
,("target arch","ArchX86_64")
,("target word size","8")
,("target has GNU nonexec stack","False")
,("target has .ident directive","True")
,("target has subsections via symbols","True")
,("Unregisterised","NO")
,("LLVM llc command","llc")
,("LLVM opt command","opt")
,("Project version","7.8.3")
,("Booter version","7.6.3")
,("Stage","2")
,("Build platform","x86_64-apple-darwin")
,("Host platform","x86_64-apple-darwin")
,("Target platform","x86_64-apple-darwin")
,("Have interpreter","YES")
,("Object splitting supported","YES")
,("Have native code generator","YES")
,("Support SMP","YES")
,("Tables next to code","YES")
,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn")
,("Support dynamic-too","YES")
,("Support parallel --make","YES")
,("Dynamic by default","NO")
,("GHC Dynamic","YES")
,("Leading underscore","YES")
,("Debug on","False")
,("LibDir","/Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3")
,("Global Package DB","/Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3/package.conf.d")
]
bash-3.2$ ghc-pkg list
/Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3/package.conf.d:
Cabal-1.18.1.4
GLURaw-1.4.0.1
GLUT-2.5.1.1
HTTP-4000.2.10
HUnit-1.2.5.2
OpenGL-2.9.2.0
OpenGLRaw-1.5.0.0
QuickCheck-2.6
array-0.5.0.0
async-2.0.1.5
attoparsec-0.10.4.0
base-4.7.0.1
bin-package-db-0.0.0.0
binary-0.7.1.0
rts-1.0
bytestring-0.10.4.0
case-insensitive-1.1.0.3
containers-0.5.5.1
deepseq-1.3.0.2
directory-1.2.1.0
fgl-5.5.0.1
filepath-1.3.0.2
(ghc-7.8.3)
ghc-prim-0.3.1.0
hashable-1.2.2.0
haskeline-0.7.1.2
haskell-src-1.0.1.6
(haskell2010-1.1.2.0)
(haskell98-2.0.0.3)
hoopl-3.10.0.1
hpc-0.6.0.1
hscolour-1.20.3
html-1.0.1.2
integer-gmp-0.5.1.0
mtl-2.1.3.1
network-2.4.2.3
old-locale-1.0.0.6
old-time-1.1.0.2
parallel-3.2.0.4
parsec-3.1.5
pretty-1.1.1.1
primitive-0.5.2.1
process-1.2.0.0
random-1.0.1.1
regex-base-0.93.2
regex-compat-0.95.1
regex-posix-0.95.2
split-0.2.2
stm-2.4.2
syb-0.4.1
template-haskell-2.9.0.0
terminfo-0.4.0.0
text-1.1.0.0
time-1.4.2
transformers-0.3.0.0
unix-2.7.0.1
unordered-containers-0.2.4.0
vector-0.10.9.1
xhtml-3000.2.1
zlib-0.5.4.1

/Users/gcolpitts/.ghc/x86_64-darwin-7.8.3/package.conf.d:
Cabal-1.20.0.2
MonadRandom-0.3
aeson-0.6.2.1
auto-update-0.1.1.2
bifunctors-4.1.1.1
blaze-builder-0.3.3.3
cmdargs-0.10.9
comonad-4.2.2
conduit-1.2.0.2
contravariant-1.2
cpphs-1.18.5
data-ordlist-0.4.6.1
distributive-0.4.4
djinn-ghc-0.0.2.2
djinn-lib-0.0.1.2
dlist-0.7.1
either-4.3.1
exceptions-0.6.1
free-4.9
ghc-mod-5.0.1.2
ghc-paths-0.1.0.9
ghc-syb-utils-0.2.2
haskell-src-exts-1.15.0.1
hasktags-0.69.0
hlint-1.9.4
hoogle-4.2.34
http-date-0.0.4
http-types-0.8.5
io-choice-0.0.5
json-0.7
lifted-base-0.2.3.0
mmorph-1.0.4
monad-control-0.3.3.0
monad-journal-0.2.3.2
mwc-random-0.13.2.0
nats-0.2
polyparse-1.9
prelude-extras-0.4
profunctors-4.2.0.1
resourcet-1.1.2.3
safe-0.3.8
scientific-0.3.3.1
semigroupoids-4.2
semigroups-0.15.3
shake-0.13.2
simple-sendfile-0.2.17
streaming-commons-0.1.4.2
strict-0.3.2
stylish-haskell-0.5.10.2
tagged-0.7.2
tagsoup-0.13.2
text-1.2.0.0
transformers-base-0.4.3
transformers-compat-0.3.3.4
uniplate-1.6.12
unix-compat-0.4.1.3
unordered-containers-0.2.5.0
utf8-string-0.3.8
vault-0.3.0.3
vector-0.10.11.0
vector-algorithms-0.6.0.3
void-0.6.1
wai-3.0.1.1
warp-3.0.1.1
yaml-0.8.9.1

bash-3.2$

Activity

  1. 23Skidoo commented on Sep 16, 2014

    @23Skidoo
    Member

    It's a known issue, Cabal doesn't track installed executables. See e.g. #227.

  2. mietek commented on Sep 16, 2014

    @mietek
    Contributor

    #227 is the number of the original Trac issue, which is no longer available. #220 is the GitHub issue number.

    It's unfortunate that issues were imported without respecting or remapping the issue numbers, as many cross-references are broken due to this.

    cc @bos

  3. GeorgeCo commented on Sep 17, 2014

    @GeorgeCo
    Author

    I don't understand why my bug is either of the known issues I have been
    referred to

    As for the first, my problem is not with all executables, it is with some,
    and the other part of the problem which I didn't stress in my original
    report, is that the problematic packages never show up in ghc-pkg list.

    a good package, e.g. hlint does not reinstall after a second cabal install
    and it does show up in ghc-pkg list. A bad package e.g. alex reinstalls
    after a second install and never shows up in ghc-pkg

    Here's the output to show that:

    cabal install -j3 hlint
    Resolving dependencies...
    Downloading haskell-src-exts-1.16.0...
    Configuring haskell-src-exts-1.16.0...
    Building haskell-src-exts-1.16.0...
    Installed haskell-src-exts-1.16.0
    Downloading hlint-1.9.5...
    Configuring hlint-1.9.5...
    Building hlint-1.9.5...
    Installed hlint-1.9.5
    Updating documentation index
    /Users/gcolpitts/Library/Haskell/share/doc/index.html
    bash-3.2$ ghc-pkg check

    bash-3.2$ cabal install -j3 hlint
    Resolving dependencies...
    All the requested packages are already installed:
    hlint-1.9.5
    Use --reinstall if you want to reinstall anyway.

    ghc-pkg list|fgrep hlint
    hlint-1.9.4
    hlint-1.9.5

    bash-3.2$ cabal install -j3 alex
    Resolving dependencies...
    Configuring alex-3.1.3...
    Building alex-3.1.3...
    Installed alex-3.1.3
    Updating documentation index
    /Users/gcolpitts/Library/Haskell/share/doc/index.html
    bash-3.2$ ghc-pkg list|fgrep alex
    bash-3.2$ ghc-pkg check
    bash-3.2$ cabal install -j3 alex
    Resolving dependencies...
    Configuring alex-3.1.3...
    Building alex-3.1.3...
    Installed alex-3.1.3
    Updating documentation index
    /Users/gcolpitts/Library/Haskell/share/doc/index.html

    On Tue, Sep 16, 2014 at 4:04 PM, Miëtek Bak [email protected]
    wrote:

    #227 http://hackage.haskell.org/trac/hackage/ticket/227 is the original
    Trac issue number, which is no longer available. #220
    #220 is the GitHub issue number.

    It's unfortunate that issues were imported without respecting or remapping
    the issue numbes, as many cross-references are broken due to this.

    cc @bos https://github.com/bos

    —
    Reply to this email directly or view it on GitHub
    #2108 (comment).

  4. ttuegel commented on Sep 17, 2014

    @ttuegel
    Member

    Packages only show up in ghc-pkg list if they install a library. Executable-only "packages" aren't really packages from GHC's point of view. hlint installs a library and an executable, but alex installs only an executable. So, hlint is tracked by alex is not; that is why you are only having trouble with some executables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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