
OK, I imagined to install OpenSUSE 11.2. However, I can't find a way to make it install either GHC or the Haskell Platform. A quick Google search turns up a folder on download.opensuse.org which is stuffed full of Haskell stuff, yet no ammount of prodding YaST will convince it that it's possible to install anything remotely Haskell-related. (Now I remember why I don't use Linux much...) Does anybody know how to install this stuff on OpenSUSE? Alternatively, does anybody know of an alternative Linux distribution where this kind of thing is likely to work better? (I think I've got a Debian ISO somewhere - but IME everything on Debian is always 8 years old.)

On Wednesday 24. February 2010 21.47.56 Andrew Coppin wrote:
no ammount of prodding YaST will convince it that it's possible to install anything remotely Haskell-related
if you open the software manager and go to configuration → repositories, you should be able to add new software sources. i use the following repository: Server name: download.opensuse.org Directory: /repositories/devel:/languages:/haskell/openSUSE_11.2/ This repository contains GHC 6.12, alex, happy, etc. -- Erlend Hamberg “Everything will be ok in the end. If its not ok, its not the end.” GPG/PGP: 0xAD3BCF19 45C3 E2E7 86CA ADB7 8DAD 51E7 3A1A F085 AD3B CF19

Erlend Hamberg wrote:
if you open the software manager and go to configuration → repositories, you should be able to add new software sources. i use the following repository:
Server name: download.opensuse.org Directory: /repositories/devel:/languages:/haskell/openSUSE_11.2/
This repository contains GHC 6.12, alex, happy, etc.
OK, I'll try that tomorrow and see where I get... Thanks, Andrew.

Am Mittwoch 24 Februar 2010 23:17:46 schrieb Andrew Coppin:
Erlend Hamberg wrote:
if you open the software manager and go to configuration → repositories, you should be able to add new software sources. i use the following repository:
Server name: download.opensuse.org Directory: /repositories/devel:/languages:/haskell/openSUSE_11.2/
This repository contains GHC 6.12, alex, happy, etc.
OK, I'll try that tomorrow and see where I get...
Or, go to http://software.opensuse.org/search/ , type ghc [alex, happy, ...] in the search box, click the search button and 1-click-install.
Thanks, Andrew.

Daniel Fischer wrote:
Am Mittwoch 24 Februar 2010 23:17:46 schrieb Andrew Coppin:
Erlend Hamberg wrote:
if you open the software manager and go to configuration → repositories, you should be able to add new software sources. i use the following repository:
Server name: download.opensuse.org Directory: /repositories/devel:/languages:/haskell/openSUSE_11.2/
This repository contains GHC 6.12, alex, happy, etc.
OK, I'll try that tomorrow and see where I get...
Or, go to http://software.opensuse.org/search/ , type ghc [alex, happy, ...] in the search box, click the search button and 1-click-install.
This works - and adds all the Haskell stuff to the respositories list, apparently. Amusingly, I installed the GHC package, and then discovered that while GHC runs, it won't compile anything. But if you (manually) install GCC as well, *then* it works. (Isn't that the package manager's job? WTF?) Anyway, I'm currently attempting to get cabal-install to work...

Am Sonntag 28 Februar 2010 13:23:11 schrieb Andrew Coppin:
Daniel Fischer wrote:
Or, go to http://software.opensuse.org/search/ , type ghc [alex, happy, ...] in the search box, click the search button and 1-click-install.
This works - and adds all the Haskell stuff to the respositories list, apparently.
Amusingly, I installed the GHC package, and then discovered that while GHC runs, it won't compile anything. But if you (manually) install GCC as well, *then* it works. (Isn't that the package manager's job? WTF?)
Wait, what? That must be the first Linux in history which didn't have gcc installed from the beginning. How on earth did you manage to do that? Another thing, you will want the devel versions of many packages for the header files, so start YaST, search for devel in name, install all you are not almost sure that you don't want.
Anyway, I'm currently attempting to get cabal-install to work...
What's the problem? Downloading the .tar.gz from hackage, unpacking it and running bootstrap.sh *should* get you a working cabal-install with minimum fuss.

Daniel Fischer wrote:
Am Sonntag 28 Februar 2010 13:23:11 schrieb Andrew Coppin:
Amusingly, I installed the GHC package, and then discovered that while GHC runs, it won't compile anything. But if you (manually) install GCC as well, *then* it works. (Isn't that the package manager's job? WTF?)
Wait, what? That must be the first Linux in history which didn't have gcc installed from the beginning. How on earth did you manage to do that?
It's the default install of OpenSUSE 11.2. Nothing special there. What *does* surprise me is that GCC isn't a dependency of the GHC package, given that GHC doesn't appear to work properly without it.
Anyway, I'm currently attempting to get cabal-install to work...
What's the problem? Downloading the .tar.gz from hackage, unpacking it and running bootstrap.sh *should* get you a working cabal-install with minimum fuss.
No "problem", I just haven't finished it yet. Or at least, I hadn't when I posted that message; I've got it going now. Once GHC was actually working, the only additional thing I had to do was install zlib-devel. It also puts the binary in a strange place, but I guess I can live with that... Now, hypothetically, I should have a Linux Haskell system, so I can actually compile *anything* that's on Hackage.

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. 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
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.

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.
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?
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. On Windows... well, forget it. It'll never work, so you might as well not bother trying.

On Sun, Feb 28, 2010 at 6:30 PM, Andrew Coppin
Daniel Fischer wrote:
if [ -z `/bin/echo ${PATH} | /usr/bin/grep cabal` ]
then
export PATH="/home/andrew/.cabal/bin:$PATH" fi
in your .bashrc
Uh... what?
that snippet supposes you have cabal installed in your home directory under the directory ".cabal". The binary file would be in the bin subdirectory of ".cabal" Names that start with a . are hidden files/directories on linux, by the way. So the first line checks if you have "cabal" in your path list. If not, on the 3rd line it supposes your home directory is /home/andrew and adds the cabal binary directory to your path list. David.

David Virebayre wrote:
On Sun, Feb 28, 2010 at 6:30 PM, Andrew Coppin
mailto:andrewcoppin@btinternet.com> wrote: Daniel Fischer wrote:
if [ -z `/bin/echo ${PATH} | /usr/bin/grep cabal` ]
then export PATH="/home/andrew/.cabal/bin:$PATH" fi
in your .bashrc
Uh... what?
that snippet supposes you have cabal installed in your home directory under the directory ".cabal". The binary file would be in the bin subdirectory of ".cabal" Names that start with a . are hidden files/directories on linux, by the way. So the first line checks if you have "cabal" in your path list. If not, on the 3rd line it supposes your home directory is /home/andrew and adds the cabal binary directory to your path list.
Oh, right. So it's checking whether it's already in the search path before adding it. I would have just added it. ;-) [And by the looks of it, I would have got even that wrong...]

Am Sonntag 28 Februar 2010 20:07:28 schrieb Andrew Coppin:
Oh, right. So it's checking whether it's already in the search path before adding it.
Right.
I would have just added it. ;-)
That wouldn't do much harm, you'd just have it several times in your $PATH (which means it'll take a little longer to find things in the places listed after because ~/.cabal/bin is searched multiple times).
[And by the looks of it, I would have got even that wrong...]
Let me guess, you'd have tried ';' as the path-separator?

Am Sonntag 28 Februar 2010 20:40:15 schrieb Andrew Coppin:
Daniel Fischer wrote:
Let me guess, you'd have tried ';' as the path-separator?
I didn't know you have to use "export" for this to work...
You probably wouldn't need export in SUSE, there $HOME/.bashrc is sourced in /etc/profile (I don't expect they changed that from 11.1 to 11.2) and PATH is exported afterwards, so you'd have ~/.cabal/bin in the path of every shell started from the first bash on (and without the test if it's already there, the n-th shell would have n copies of ~/.cabal/bin in its path). But in other setups, without export ~/.cabal/bin might not be in the path of non-bash subshells.

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.

Anyway, I'm currently attempting to get cabal-install to work...
What's the problem? Downloading the .tar.gz from hackage, unpacking it and running bootstrap.sh *should* get you a working cabal-install with minimum fuss.
No "problem", I just haven't finished it yet.
I just retried this and stumbled over a problem. I did a Google search and managed to navigate to here: http://www.haskell.org/cabal/download.html But this gives a download link for cabal-install 0.6.2, which doesn't work. Performing a second Google search and finding the *latest* cabal-install works. (But... why is this page not linking to the latest one? Or to Hackage, where the latest stable version lives...)

Andrew Coppin wrote:
Now, hypothetically, I should have a Linux Haskell system, so I can actually compile *anything* that's on Hackage.
Heh, I forgot how much fun building Gtk2hs is. ;-) The only library I've ever seen that takes more than 11 seconds to build... (Currently at 10 *minutes* and counting!) Oh, and it seems to not want to build with GHC 6.12.1. Is that normal, or did I do something wrong? (It seems to be building just fine with GHC 6.10.4...)

Am Sonntag 28 Februar 2010 22:57:05 schrieb Andrew Coppin:
Andrew Coppin wrote:
Now, hypothetically, I should have a Linux Haskell system, so I can actually compile *anything* that's on Hackage.
Heh, I forgot how much fun building Gtk2hs is. ;-)
But that's not yet on hackage :)
The only library I've ever seen that takes more than 11 seconds to build... (Currently at 10 *minutes* and counting!)
Oh, and it seems to not want to build with GHC 6.12.1. Is that normal,
Yes, as far as I know, there's no gtk2hs release for 6.12 yet.
or did I do something wrong? (It seems to be building just fine with GHC 6.10.4...)
There's a version for 6.10.4, so that ought to build indeed.
participants (4)
-
Andrew Coppin
-
Daniel Fischer
-
David Virebayre
-
Erlend Hamberg