Opened 7 years ago

Closed 7 years ago

#1029 closed bug (invalid)

ghc fails to find installed user package even though "ghc-pkg list" shows it

Reported by: xoltar Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.4.2
Keywords: ghc-pkg package --user Cc:
Operating System: FreeBSD Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Building haskell-cgi (Bjorn Bringert's) requires the xhtml package. I built and installed that package (with setup install --user, since I don't have root access on this box), and ghc-pkg list shows it in place. "./setup configure" in the haskell-cgi tree finds the xhtml package. However, when I go to "./setup build", it can't find the Text.Html module within the xhtml package. Perhaps there's something I'm doing wrong with the user packages settings?

[me@xoltar ~/src/haskell-cgi]$ ./setup build
Preprocessing library cgi-compat-2006.10.28...
Building cgi-compat-2006.10.28...
Chasing modules from: Network.NewCGI,Network.CGI.Monad,Network.CGI.Protocol,Netw
ork.CGI.Compat,Network.CGI.Cookie,Network.CGI.Multipart,Network.CGI.RFC822Header
s
Could not find module `Text.XHtml':

use -v to see a list of the files searched for
(imported from ./Network/NewCGI.hs)

[me@xoltar ~/src/haskell-cgi]$ ghc-pkg list
/usr/local/lib/ghc-6.4.2/package.conf:

Cabal-1.1.4, HUnit-1.1, QuickCheck?-1.0, base-1.0, (concurrent-1.0),
(data-1.0), fgl-5.2, haskell-src-1.0, haskell98-1.0,
(hssource-1.0), (lang-1.0), mtl-1.0, (net-1.0), network-1.0,
parsec-1.0, (posix-1.0), readline-1.0, rts-1.0, stm-1.0,
template-haskell-1.0, (text-1.0), unix-1.0, (util-1.0)

/home/private/.ghc/i386-freebsd-6.4.2/package.conf:

fps-0.8, xhtml-2006.9.13

[me@xoltar ~/src/haskell-cgi]$ ./setup build -v
Preprocessing library cgi-compat-2006.10.28...
Building cgi-compat-2006.10.28...
/usr/local/bin/ghc -package-name cgi-compat --make -fallow-overlapping-instances

-fallow-undecidable-instances -O2 -Wall -hide-all-packages -i -idist/build/auto

gen -i. -odir dist/build -hidir dist/build -package base-1.0 -package network-1.
0 -package parsec-1.0 -package mtl-1.0 -package xhtml-2006.9.13 -package fps-0.8

Network.NewCGI Network.CGI.Monad Network.CGI.Protocol Network.CGI.Compat Networ

k.CGI.Cookie Network.CGI.Multipart Network.CGI.RFC822Headers
Chasing modules from: Network.NewCGI,Network.CGI.Monad,Network.CGI.Protocol,Netw
ork.CGI.Compat,Network.CGI.Cookie,Network.CGI.Multipart,Network.CGI.RFC822Header
s
Could not find module `Text.XHtml':

use -v to see a list of the files searched for
(imported from ./Network/NewCGI.hs)

[me@xoltar ~/src/haskell-cgi]$

Change History (5)

comment:1 Changed 7 years ago by xoltar

Sorry about the formatting, should have marked it as preformatted...

comment:2 Changed 7 years ago by Lemmih

Can you use Text.XHtml from ghci?

comment:3 Changed 7 years ago by xoltar

No, and that gives a little more informative error message:

[me@xoltar /home/htdocs]$ ghci -package xhtml
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base-1.0 ... linking ... done.
Loading package haskell98-1.0 ... linking ... done.
Loading package xhtml-2006.9.13 ... ghc-6.4.2: can't load .so/.DLL for: HSxhtml-
2006.9.13 (Shared object "libHSxhtml-2006.9.13.so" not found, required by "ghc-6
.4.2")
[me@xoltar /home/htdocs]$

comment:4 Changed 7 years ago by xoltar

Ah, got it. The problem is that when I initially configured the packages, I did:

./setup --prefix=~/ghc

and apparently using ~/ghc doesn't work at all, and though "./setup install" happily claims to be doing the work of installing to ~/ghc, it doesn't actually even create a directory.

However, if I provide an explicit path:

./setup --prefix=/home/private/ghc

then everything works fine. Thanks for your help.

comment:5 Changed 7 years ago by Lemmih

  • Resolution set to invalid
  • Status changed from new to closed

Perhaps we should create a Cabal ticket for this.

Note: See TracTickets for help on using tickets.