
Hello, I doing work using Linux. The wrong version (for me) of the unix package seems to be visible. I see possibilities to use ghc-pkg to suppress the unix package that I don't want(2.3.0.0) but that seems dangerious. Details are below . What should I do? Regards, vasili When I do:
ghci :m System.Posix
I am getting the wrong version of the Unix package. I know this to be true because I did ghc-pkg latest unix and got unix-2.3.0.0 I want unix.2.2.0.0 because this version has changes that I made to the unix package. libHSunix-2.2.0.0.a is installed under /usr/local/lib/unix-2.2.0.0/ghc-6.8.2 I did a "nm -a libHSunix-2.2.0.0.a" and found symbols that I added.

"Galchin, Vasili"
ghci :m System.Posix
I am getting the wrong version of the Unix package. I know this to be true because I did ghc-pkg latest unix
and got unix-2.3.0.0
I want unix.2.2.0.0 because this version has changes that I made
Naturally, you'll get 2.3.0.0, since it has the highest version number! Either rename your modified version to 2.4 (or similar), specify the exact version in your *application's* cabal file, or use "ghc-pkg hide" to hide version 2.3.0.0 from view. -k -- If I haven't seen further, it is by standing in the footprints of giants

Ketil Malde
Either rename your modified version to 2.4 (or similar), specify the exact version in your *application's* cabal file,
..or you could compile your application specifying the package explicitly, using "-package unix-2.2.0.0" (and all the other packages, normally supplied by Cabal or ghc --make).
or use "ghc-pkg hide" to hide version 2.3.0.0 from view.
-k -- If I haven't seen further, it is by standing in the footprints of giants

On Fri, Apr 11, 2008 at 3:11 AM, Ketil Malde
"Galchin, Vasili"
writes: ghci :m System.Posix
I am getting the wrong version of the Unix package. I know this to be true because I did ghc-pkg latest unix
and got unix-2.3.0.0
I want unix.2.2.0.0 because this version has changes that I made
Naturally, you'll get 2.3.0.0, since it has the highest version number!
Either rename your modified version to 2.4 (or similar), specify the exact version in your *application's* cabal file, or use "ghc-pkg hide" to hide version 2.3.0.0 from view.
Actually, I'm pretty sure that Cabal does not take the visibility states of packages into account when selecting packages to fulfill dependencies, so ghc-pkg hide will not actually work. -Brent

Right I am just trying to rebuild the unix package. No matter what version
is present in the unix.cabal file,
runhaskell Setup.hs configure
produces an error concerning unix-2.3.0.0
Starting to get really frustrated over this. I just want to build a Unix
package test case .. and now I can't even build the unix package itself.
ghc-pkg seems to be at the center of this problem because the problem seems
to have to deal with the package database.
1) On Linux(Ubuntu) where is the package database?
2) If ghc-pkg is indeed a Haskell program, how can I get the source to
better understand the problem I am encountering on my own?
On Fri, Apr 11, 2008 at 9:33 AM, Brent Yorgey
On Fri, Apr 11, 2008 at 3:11 AM, Ketil Malde
wrote: "Galchin, Vasili"
writes: ghci :m System.Posix
I am getting the wrong version of the Unix package. I know this to be true because I did ghc-pkg latest unix
and got unix-2.3.0.0
I want unix.2.2.0.0 because this version has changes that I made
Naturally, you'll get 2.3.0.0, since it has the highest version number!
Either rename your modified version to 2.4 (or similar), specify the exact version in your *application's* cabal file, or use "ghc-pkg hide" to hide version 2.3.0.0 from view.
Actually, I'm pretty sure that Cabal does not take the visibility states of packages into account when selecting packages to fulfill dependencies, so ghc-pkg hide will not actually work.
-Brent

On Fri, Apr 11, 2008 at 4:45 PM, Galchin, Vasili
Right I am just trying to rebuild the unix package. No matter what version is present in the unix.cabal file,
runhaskell Setup.hs configure
produces an error concerning unix-2.3.0.0
Have you tried doing a 'runhaskell Setup.hs clean' first? You should also try unregistering the unix-2.3 package (ghc-pkg unregister unix-2.3.0.0).
Starting to get really frustrated over this. I just want to build a Unix package test case .. and now I can't even build the unix package itself.
ghc-pkg seems to be at the center of this problem because the problem seems to have to deal with the package database.
1) On Linux(Ubuntu) where is the package database?
The global package database should be somewhere like /usr/lib/ghc-6.6.1/package.conf on my system it is in /usr/local/lib/ghc-6.8.2/package.conf. The local (user) package database is in something like ~/.ghc/i386-linux-version/package.conf.
2) If ghc-pkg is indeed a Haskell program, how can I get the source to better understand the problem I am encountering on my own?
It is part of the ghc source, in utils/ghc-pkg. -Brent
participants (3)
-
Brent Yorgey
-
Galchin, Vasili
-
Ketil Malde