
#11042: Template Haskell / GHCi does not respect extra-lib-dirs -------------------------------------+------------------------------------- Reporter: mboes | Owner: trommler Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: 11238 | Blocking: Related Tickets: #10458 #5289 | Differential Rev(s): #12753 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by trommler): * status: new => closed * resolution: => wontfix Comment: Replying to [comment:12 trommler]:
Replying to [comment:10 rwbarton]: 3. To compile the module Template Haskell loads all packages that are specified as dependencies (in the Cabal file or on the ghc command line). Currently this means loading all transitive dependencies of each package to be loaded. Package loading fails because `libz.so` cannot be found in any standard directory because on the system @mboes describes it is installed elsewhere. Actually, package zlib should record the location of libz.so if it is not found in a standard location. GHCi reads the `library-dirs` field that should contain the path to `libz.so`.
In changeset:f41a8a369796985a75dd618b969292e1e7033112 a new field `dynamic-library-dirs` has been introduced for cases where dynamic library development files are in a directory separate from the archive (`.a`) files. I checked the code in `Linker.hs` and it reads the `library-dirs` field from the package database. So I would say this is a packaging error on nix. As I said comment:12 passing `extra-lib-dirs` breaks abstraction and is brittle. Closing this as wontfix, please reopen if you disagree. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11042#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler