[Haskell-cafe] OpenSUSE 11.2
Daniel Fischer
daniel.is.fischer at web.de
Sun Feb 28 12:55:39 EST 2010
Am Sonntag 28 Februar 2010 18:30:59 schrieb Andrew Coppin:
> Daniel Fischer wrote:
> > Am Sonntag 28 Februar 2010 17:52:19 schrieb Andrew Coppin:
> >> It also puts the binary in a strange place, but I guess I can live
> >> with that...
> >
> > Which strange place? By default, it should go to ~/.cabal/bin, I
> > think.
>
> Indeed. You'd expect it to be in some system-wide location, but
> apparently not.
>
Why? It could only be in a system-wide location if you installed as root.
Not everybody who wants to install cabal is root/can sudo, so the natural
default is ~/.cabal/bin or ~/bin. Since there are advantages to keep all
cabal stuff in one place separate from whatever, ~/.cabal is preferable.
But if you want to have it system-wide (why would you, with a user cabal,
you don't have to make a complete reinstall if you bork your installation),
you can run
$ ./bootstrap.sh --global
> > Anyway, you should add that to your path, put something like
> >
> >
> > if [ -z `/bin/echo ${PATH} | /usr/bin/grep cabal` ]
> > then
> > export PATH="/home/andrew/.cabal/bin:$PATH"
> > fi
> >
> > in your .bashrc
>
> Uh... what?
>
If the pattern "cabal" is not in your path, prepend ~/.cabal/bin to your
path and export it. Then you can invoke executables in that directory
without giving the path on the command line.
But yes, if you're new to shell-scripting, it all looks geek to you :)
> >> Now, hypothetically, I should have a Linux Haskell system, so I can
> >> actually compile *anything* that's on Hackage.
> >
> > Not really, you'll need to install external libraries (C stuff,
> > mostly) for many packages. But it should be a lot easier than on
> > Windows.
>
> On Linux, it seems you install the development package, rerun Cabal, and
> it it somehow "knows" that the library is installed and how to find in.
Mostly - there are a few standard locations for headers and libraries where
configure looks, but stuff for some packages must be queried for by
pkg-config, only some packages where that's necessary don't come with a .pc
file, oops.
>
> On Windows... well, forget it. It'll never work, so you might as well
> not bother trying.
>
More information about the Haskell-Cafe
mailing list