Stop! Tickets are now managed at GitHub.

Please enter new tickets, and find and edit existing tickets there:

Ticket #72 (closed defect: invalid)

Opened 8 years ago

Last modified 8 years ago

Broken profiling libraries in OS X package

Reported by: atomb Owned by: gregorycollins
Priority: major Milestone:
Component: OSX installer Keywords:


After a fresh install of 2009.2.0.1-beta1 package for OS X on a 1.5.7 system (Leopard), I tried to use cabal-install to install several packages with profiling information. The packages depending on libraries included in the platform, but not included with GHC, failed:

$ ghc-pkg list
    Cabal-, GLUT-, HTTP-4000.0.6, HUnit-,
    OpenGL-, QuickCheck-, array-, base-,
    base-, bytestring-, cgi-3001.1.7.1,
    containers-, directory-, (dph-base-0.3),
    (dph-par-0.3), (dph-prim-interface-0.3), (dph-prim-par-0.3),
    (dph-prim-seq-0.3), (dph-seq-0.3), editline-,
    extensible-exceptions-, fgl-, filepath-,
    (ghc-6.10.3), ghc-prim-, haddock-2.4.2, haskell-src-,
    haskell98-, hpc-, html-, integer-,
    mtl-, network-2.2.1, network-, old-locale-,
    old-time-, packedstring-, parallel-,
    parsec-, pretty-, process-, random-,
    regex-base-, regex-compat-, regex-posix-,
    rts-1.0, stm-, syb-, template-haskell-,
    time-, time-1.1.3, unix-, xhtml-3000.2.0.1,

$ cabal install -p lazysmallcheck
Resolving dependencies...
Downloading lazysmallcheck-0.3...
Configuring lazysmallcheck-0.3...
Preprocessing library lazysmallcheck-0.3...
Building lazysmallcheck-0.3...
[1 of 2] Compiling Test.LazySmallCheck.Generic ( Test/LazySmallCheck/Generic.hs, dist/build/Test/LazySmallCheck/Generic.o )
[2 of 2] Compiling Test.LazySmallCheck ( Test/LazySmallCheck.hs, dist/build/Test/LazySmallCheck.o )
[1 of 2] Compiling Test.LazySmallCheck.Generic ( Test/LazySmallCheck/Generic.hs, dist/build/Test/LazySmallCheck/Generic.p_o )
[2 of 2] Compiling Test.LazySmallCheck ( Test/LazySmallCheck.hs, dist/build/Test/LazySmallCheck.p_o )
ar: creating archive dist/build/libHSlazysmallcheck-0.3.a
ar: creating archive dist/build/libHSlazysmallcheck-0.3_p.a
Installing library in /Users/atomb/.cabal/lib/lazysmallcheck-0.3/ghc-6.10.3
Registering lazysmallcheck-0.3...
Reading package info from "dist/installed-pkg-config" ... done.
Writing new package config file... done.
$ cinstall harpy
Resolving dependencies...
Downloading harpy-0.4.1...
Configuring harpy-0.4.1...
Preprocessing library harpy-0.4.1...
Building harpy-0.4.1...
[1 of 7] Compiling Harpy.X86Disassembler ( Harpy/X86Disassembler.hs, dist/build/Harpy/X86Disassembler.o )
[2 of 7] Compiling Harpy.CodeGenMonad ( Harpy/CodeGenMonad.hs, dist/build/Harpy/CodeGenMonad.o )
[3 of 7] Compiling Harpy.Call       ( Harpy/Call.hs, dist/build/Harpy/Call.o )
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package syb ... linking ... done.
Loading package array- ... linking ... done.
Loading package containers- ... linking ... done.
Loading package packedstring- ... linking ... done.
Loading package pretty- ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package parsec- ... linking ... done.
Loading package mtl- ... linking ... done.
Loading package base- ... linking ... done.
[4 of 7] Compiling Harpy.X86CodeGen ( Harpy/X86CodeGen.hs, dist/build/Harpy/X86CodeGen.o )
[5 of 7] Compiling Harpy.X86Assembler ( Harpy/X86Assembler.hs, dist/build/Harpy/X86Assembler.o )
[6 of 7] Compiling Harpy.X86CGCombinators ( Harpy/X86CGCombinators.hs, dist/build/Harpy/X86CGCombinators.o )
[7 of 7] Compiling Harpy            ( Harpy.hs, dist/build/Harpy.o )

    Could not find module `Control.Monad.Trans':
      Perhaps you haven't installed the profiling libraries for package `mtl-'?
      Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
harpy-0.4.1 failed during the building phase. The exception was:
exit: ExitFailure 1

The dependencies of lazysmallcheck are all included in the GHC installer package. Some of the dependencies of harpy, however, are in the platform installer package. It appears that the packages included as part of the GHC installer package have good profiling information, while the packages included in the platform installer package do not.

If I reinstall mtl and parsec (harpy's other platform dependency) as user packages, with profiling information, then harpy builds correctly.

The strange thing is, there are profiling libraries for mtl and parsec included in the platform. They just don't seem to be usable?

$ ls -l /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.3/mtl-
total 2432
drwxrwxr-x  3 root  admin      102 May  8 09:45 Control
-rw-rw-r--  1 root  admin   322904 May  8 09:45 HSmtl-
-rw-rw-r--  1 root  admin   844576 May  8 09:45 libHSmtl-
-rw-rw-r--  1 root  admin  1316304 May  8 09:45 libHSmtl-

Change History

Changed 8 years ago by atomb

Ah, I see what's happening now. Both the GHC installer package and the platform installer package include mtl. The GHC one has profiling libraries, but the platform one doesn't. But the platform packages override the ones included with GHC. That's why it seemed as though the libraries were installed but broken.

Personally, I would love to have profiling versions of the libraries included by default. Other people may disagree, though.

In the long run, the GHC bundle probably shouldn't include packages included in the platform bundle, but I expect the current beta was produced by just using a readily available GHC installer, which happened to overlap a little with the platform.

Changed 8 years ago by gregorycollins

  • status changed from new to closed
  • resolution set to invalid

Correct, the platform mtl overrides the one shipped with GHC (because "ghc-pkg register" overrides...)

The overlap you speak of seems to be causing several other problems, including triggering a nasty GHC panic bug:

I've posted to the list to collect opinions on whether we should be installing the profiling libraries for the platform for the next version. For now I'm going to close this ticket if that's OK with you, feel free to re-open it otherwise.

Note: See TracTickets for help on using tickets.