Installation of Haskell Platform on CentOS 5.5

Hi. I've spent some time trying to setup the Haskell Platform on CentOS 5.5: # cat /proc/version Linux version 2.6.18-028stab070.14 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Nov 18 16:04:02 MSK 2010 I've compiled from source, similar to what is done here: http://www.haskell.org/pipermail/haskell-cafe/2010-April/076489.html Installation of GHC 7.0.2 failed: # ./configure --prefix=/usr/haskell-platform-2011.2.0.0/ checking for path to top of build tree... utils/ghc-pwd/dist/build/tmp/ghc-pwd: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by utils/ghc-pwd/dist/build/tmp/ghc-pwd) utils/ghc-pwd/dist/build/tmp/ghc-pwd: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by utils/ghc-pwd/dist/build/tmp/ghc-pwd) configure: error: cannot determine current directory I had to use GHS 6.12.3 which compiled without errors. However when I tried installing the Haskell Platform I ran into problems. Briefly, this is what I did and what happened trying to "make" it: wget http://hackage.haskell.org/platform/2010.2.0.0/haskell-platform-2010.2.0.0.t... unpack... ./configure --prefix=/usr/haskell-platform-2010.2.0.0/ make # make scripts/build.sh ************************************************** Scanning system for any installed Haskell Platform components... Found:None. New packages to install: None! All done. ************************************************** Building "/usr/haskell-platform-2010.2.0.0/bin/ghc" "--make" "Setup" "-o" "Setup" "-package" "Cabal-1.8.0.6" Linking Setup ... collect2: ld terminated with signal 15 [Terminated] Error: Compiling the Setup script failed make: *** [build.stamp] Error 2 I first thought it was related to the fact that Cabal was using the /tmp directory for executables, but the alias trick (alias cabal="TMPDIR=/foo cabal") did not help. Anyone have got any ideas on what might be causing this? Can it me any missing dependencies? I've gone through the list described at http://www.vex.net/~trebla/haskell/haskell-platform.xhtml and used "yum install" to get the software mentioned. Regards, Frode

frode k
Installation of GHC 7.0.2 failed: # ./configure --prefix=/usr/haskell-platform-2011.2.0.0/ checking for path to top of build tree... utils/ghc-pwd/dist/build/tmp/ghc-pwd: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by utils/ghc-pwd/dist/build/tmp/ghc-pwd) utils/ghc-pwd/dist/build/tmp/ghc-pwd: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by utils/ghc-pwd/dist/build/tmp/ghc-pwd) configure: error: cannot determine current directory
I eventually gave up on this, too. Shame, I'd really like to use a newer GHC - did anybody succeed in compiling it on Red Hat or CentOS? -k -- If I haven't seen further, it is by standing in the footprints of giants

On Thu, Mar 17, 2011 at 07:52:01AM +0100, Ketil Malde wrote:
frode k
writes: Installation of GHC 7.0.2 failed: # ./configure --prefix=/usr/haskell-platform-2011.2.0.0/ checking for path to top of build tree... utils/ghc-pwd/dist/build/tmp/ghc-pwd: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by utils/ghc-pwd/dist/build/tmp/ghc-pwd) utils/ghc-pwd/dist/build/tmp/ghc-pwd: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by utils/ghc-pwd/dist/build/tmp/ghc-pwd) configure: error: cannot determine current directory
I eventually gave up on this, too. Shame, I'd really like to use a newer GHC - did anybody succeed in compiling it on Red Hat or CentOS?
-k
The ghc7 binaries are compiled against a newer version of glibc than is available on RHEL/CentOS. It works fine if you compile ghc7 from source yourself (you can use 6.12 for that).

Tristan Ravitch
The ghc7 binaries are compiled against a newer version of glibc than is available on RHEL/CentOS. It works fine if you compile ghc7 from source yourself (you can use 6.12 for that).
Did it? I tried to do that, but I got errors about needing -fPIC. I tried to mess with CFLAGS, but couldn't make it work out. According to somebody on #haskell (I apologize for forgetting whom), the problem was really a too old GCC version. -k -- If I haven't seen further, it is by standing in the footprints of giants

*** GHC 7
The ghc7 binaries are compiled against a newer version of glibc than is available on RHEL/CentOS. It works fine if you compile ghc7 from source yourself (you can use 6.12 for that).
| Did it? I tried to do that, but I got errors about needing -fPIC. I | tried to mess with CFLAGS, but couldn't make it work out. According to | somebody on #haskell (I apologize for forgetting whom), the problem was | really a too old GCC version. It's a shame it's so hard to setup Haskell on CentOS. I guess compiling GHC 7 from source takes a lot of time (?). It would be nice to know if anyone at all has managed. *** HASKELL PLATFORM
Building "/usr/haskell-platform-2010.2.0.0/bin/ghc" "--make" "Setup" "-o" "Setup" "-package" "Cabal-1.8.0.6" Linking Setup ... collect2: ld terminated with signal 15 [Terminated]
Error: Compiling the Setup script failed make: *** [build.stamp] Error 2
Does anyone know why the Haskell Platform won't install though? 2010.2.0.0 should work with GHC 6.12. The "collect2: ld" error message above gives no meaning to me. Has anyone succeeded installing the Haskell Platform on CentOS 5.5? [k]

*** CABAL By the way, I encounter the same error when trying to install Cabal manually: [1 of 1] Compiling Main ( Setup.lhs, Setup.o ) Linking Setup ... collect2: ld terminated with signal 15 [Terminated] Error during cabal-install bootstrap: Compiling the Setup script failed [k]

---------------------------------------------------------------------------------------------- collect2: ld terminated with signal 15 // PROBLEM SOLVED ---------------------------------------------------------------------------------------------- *** HASKELL PLATFORM Building "/usr/haskell-platform-2010.2.0.0/bin/ghc" "--make" "Setup" "-o" "Setup" "-package" "Cabal-1.8.0.6" Linking Setup ... collect2: ld terminated with signal 15 [Terminated] Error: Compiling the Setup script failed make: *** [build.stamp] Error 2 *** CABAL [1 of 1] Compiling Main ( Setup.lhs, Setup.o ) Linking Setup ... collect2: ld terminated with signal 15 [Terminated] Error during cabal-install bootstrap: Compiling the Setup script failed ****************************************************************************** UPDATE // collect2: ld problem solved : caused by lack of RAM ****************************************************************************** It seems like the problems described above was caused by the system running out of memory. Initially I had only 512 MB of RAM on my server, but after an upgrade to 2 GB RAM the installation went fine without any problems at all. I realised this running "top" and seeing all the memory being consumed by GHC. I ran into a couple of new problems trying to install the Platform, so I have not fully succeeded yet, but I am a lot closer... (Note: I also installed GCC 4.4 (as mentioned by Mr Peterson) before I retried installing Cabal and the Haskell Platform , but I do not think that affected the build / compile process at all, since GHC and not GCC is used here. And GCC 4.4 is also installed next to 4.1 that presumably would be used by default (or am I wrong about this?)) [k]

frode k
(Note: I also installed GCC 4.4 (as mentioned by Mr Peterson) before I retried installing Cabal and the Haskell Platform , but I do not think that affected the build / compile process at all, since GHC and not GCC is used here. And GCC 4.4 is also installed next to 4.1 that presumably would be used by default (or am I wrong about this?))
I got gcc44 (RHEL package) installed, but the suggested (by ./configure --help) "./configure CC=gcc44" doesn't seem to do anything, this seems to be a documentation bug. I made a link from ~/bin/gcc to the gcc44 binary, and that let the configure script find it, at least. Running 'make -j 8 install' crashed with an error, in order to make sense of the output (which tends to be hard to read when running make with parallelism), I reran, this time without -j. But then it ran to completion... Although the install process still has room for improvement, especially on archaic^Wconservative systems, I'm now the happy owner of a GHC 7.0.2 installation. Now, time to install libraries... -k PS: I guess I should report the issues I encountered on trac, but somehow the trac interface never made sense to me, and my searches always seem to result in heaps of completely unrelated stuff. -- If I haven't seen further, it is by standing in the footprints of giants

On Mon, Mar 21, 2011 at 5:57 PM, Ketil Malde
I got gcc44 (RHEL package) installed, but the suggested (by ./configure --help) "./configure CC=gcc44" doesn't seem to do anything, this seems to be a documentation bug.
The command should be "-with-gcc". I've used the following command to configure the installation: ./configure --prefix=/usr/haskell/2011.2.0.0/ --with-gcc=/usr/bin/gcc44 I've at this stage also finally managed to install GHC 7.0.2. However when I downloaded and tried to install the Haskell Platform 2011.2.0.0 I ran into more problems. It seems like this happen when installing Cabal / transformers. I get the error message (full output further down): Implicit import declaration: Could not find module `Prelude': Perhaps you haven't installed the profiling libraries for package `base'? Use -v to see a list of the files searched for. I've searched but so far haven't found any solution to this issue. Any idea how to solve this? How can I install profiling libraries for package 'base'? [k] ----- entire output ----- # make scripts/build.sh ************************************************** Scanning system for any installed Haskell Platform components... Found:None. New packages to install: None! All done. ************************************************** Building transformers-0.2.2.0 "/usr/haskell/2011.2.0.0/bin//ghc" "--make" "Setup" "-o" "Setup" "-package" "Cabal-1.10.1.0" [1 of 1] Compiling Main ( Setup.hs, Setup.o ) Linking Setup ... "./Setup" "configure" "--package-db=../../packages/package.conf.inplace" "--prefix=/usr/haskell/2011.2.0.0" "--with-compiler=/usr/haskell/2011.2.0.0/bin//ghc" "--with-hc-pkg=/usr/haskell/2011.2.0.0/bin//ghc-pkg" "--with-hsc2hs=/usr/haskell/2011.2.0.0/bin//hsc2hs" "--enable-library-profiling" "--ghc-pkg-option=--package-conf=../../packages/package.conf.inplace" Configuring transformers-0.2.2.0... "./Setup" "build" Preprocessing library transformers-0.2.2.0... Building transformers-0.2.2.0... [ 1 of 21] Compiling Data.Functor.Product ( Data/Functor/Product.hs, dist/build/Data/Functor/Product.o ) [ 2 of 21] Compiling Data.Functor.Constant ( Data/Functor/Constant.hs, dist/build/Data/Functor/Constant.o ) [ 3 of 21] Compiling Data.Functor.Compose ( Data/Functor/Compose.hs, dist/build/Data/Functor/Compose.o ) [ 4 of 21] Compiling Data.Functor.Identity ( Data/Functor/Identity.hs, dist/build/Data/Functor/Identity.o ) [ 5 of 21] Compiling Control.Monad.Trans.Class ( Control/Monad/Trans/Class.hs, dist/build/Control/Monad/Trans/Class.o ) [ 6 of 21] Compiling Control.Monad.IO.Class ( Control/Monad/IO/Class.hs, dist/build/Control/Monad/IO/Class.o ) [ 7 of 21] Compiling Control.Monad.Trans.Cont ( Control/Monad/Trans/Cont.hs, dist/build/Control/Monad/Trans/Cont.o ) [ 8 of 21] Compiling Control.Monad.Trans.Error ( Control/Monad/Trans/Error.hs, dist/build/Control/Monad/Trans/Error.o ) [ 9 of 21] Compiling Control.Monad.Trans.Identity ( Control/Monad/Trans/Identity.hs, dist/build/Control/Monad/Trans/Identity.o ) [10 of 21] Compiling Control.Monad.Trans.List ( Control/Monad/Trans/List.hs, dist/build/Control/Monad/Trans/List.o ) [11 of 21] Compiling Control.Monad.Trans.Maybe ( Control/Monad/Trans/Maybe.hs, dist/build/Control/Monad/Trans/Maybe.o ) [12 of 21] Compiling Control.Monad.Trans.Reader ( Control/Monad/Trans/Reader.hs, dist/build/Control/Monad/Trans/Reader.o ) [13 of 21] Compiling Control.Monad.Trans.RWS.Lazy ( Control/Monad/Trans/RWS/Lazy.hs, dist/build/Control/Monad/Trans/RWS/Lazy.o ) [14 of 21] Compiling Control.Monad.Trans.RWS ( Control/Monad/Trans/RWS.hs, dist/build/Control/Monad/Trans/RWS.o ) [15 of 21] Compiling Control.Monad.Trans.RWS.Strict ( Control/Monad/Trans/RWS/Strict.hs, dist/build/Control/Monad/Trans/RWS/Strict.o ) [16 of 21] Compiling Control.Monad.Trans.State.Lazy ( Control/Monad/Trans/State/Lazy.hs, dist/build/Control/Monad/Trans/State/Lazy.o ) [17 of 21] Compiling Control.Monad.Trans.State ( Control/Monad/Trans/State.hs, dist/build/Control/Monad/Trans/State.o ) [18 of 21] Compiling Control.Monad.Trans.State.Strict ( Control/Monad/Trans/State/Strict.hs, dist/build/Control/Monad/Trans/State/Strict.o ) [19 of 21] Compiling Control.Monad.Trans.Writer.Lazy ( Control/Monad/Trans/Writer/Lazy.hs, dist/build/Control/Monad/Trans/Writer/Lazy.o ) [20 of 21] Compiling Control.Monad.Trans.Writer ( Control/Monad/Trans/Writer.hs, dist/build/Control/Monad/Trans/Writer.o ) [21 of 21] Compiling Control.Monad.Trans.Writer.Strict ( Control/Monad/Trans/Writer/Strict.hs, dist/build/Control/Monad/Trans/Writer/Strict.o ) Implicit import declaration: Could not find module `Prelude': Perhaps you haven't installed the profiling libraries for package `base'? Use -v to see a list of the files searched for. Error: Building the transformers-0.2.2.0 package failed make: *** [build.stamp] Error 2

frode k
The command should be "-with-gcc".
Ah, thanks, missed that, I guess.
Implicit import declaration: Could not find module `Prelude': Perhaps you haven't installed the profiling libraries for package `base'? Use -v to see a list of the files searched for.
At least for me, the supplied base was installed with profiling already, and I just profiled a program, just to make sure. I also have transformers-0.2.2.0 installed (probably got pulled in by some other program). I haven't bothered with the Platform, but just cabal-install'ed stuff as and when it became necessary. -k -- If I haven't seen further, it is by standing in the footprints of giants

Thanks a lot for all assistance and help. I'm now as well finally running GHC 7.0.2. I spent some time documenting all the steps I made here: http://klevstul.posterous.com/haskell-ghc-702-on-centos-55 Cheers, Frode [k]

On Fri, Mar 18, 2011 at 08:23:10AM +0100, Ketil Malde wrote:
Tristan Ravitch
writes: The ghc7 binaries are compiled against a newer version of glibc than is available on RHEL/CentOS. It works fine if you compile ghc7 from source yourself (you can use 6.12 for that).
Did it? I tried to do that, but I got errors about needing -fPIC. I tried to mess with CFLAGS, but couldn't make it work out. According to somebody on #haskell (I apologize for forgetting whom), the problem was really a too old GCC version.
Now that you mention it, I did have to switch to a newer gcc for the x86_64 build. I ended up using 4.5. That part is annoying; I wasn't able to coax the default 4.1.2+patches into generating correct position-independent code either.

I have 7.0.2 building from source, using a binary version of GHC 6.12.3, and
the GCC 4.4 (gcc44 package from CentOS). GCC 4.1(gcc package) that ships
with CentOS 5.5. gave me the "relocation error" already detailed at the
bottom of http://hackage.haskell.org/trac/ghc/wiki/Building/Troubleshooting.
It would be really neat to have CentOS supported out of the gate, rather
than having to install a bootstrapping ghc, to then compile latest ghc, to
finally compile latest haskell-platform. Does anyone know of a trusted
third-party repo that packages ghc or even better, the haskell-platform for
CentOS? I found (http://pkgs.org/centos-5-rhel-5/nogin-random-x86_64/) but I
know nothing about who is packaging them.
cheers,
-kirk
On Fri, Mar 18, 2011 at 7:40 AM, Tristan Ravitch
On Fri, Mar 18, 2011 at 08:23:10AM +0100, Ketil Malde wrote:
Tristan Ravitch
writes: The ghc7 binaries are compiled against a newer version of glibc than is available on RHEL/CentOS. It works fine if you compile ghc7 from source yourself (you can use 6.12 for that).
Did it? I tried to do that, but I got errors about needing -fPIC. I tried to mess with CFLAGS, but couldn't make it work out. According to somebody on #haskell (I apologize for forgetting whom), the problem was really a too old GCC version.
Now that you mention it, I did have to switch to a newer gcc for the x86_64 build. I ended up using 4.5. That part is annoying; I wasn't able to coax the default 4.1.2+patches into generating correct position-independent code either.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk2DbucACgkQJklRJNuIcWQWjACfcn8B8FFUA0gEMsny2fnGIMoq wTkAn3O2Qh+0MkJ8uWS3uy4gz1A3xqgj =cDjP -----END PGP SIGNATURE-----
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- ⑆gmail.com⑆necrobious⑈
participants (4)
-
frode k
-
Ketil Malde
-
Kirk Peterson
-
Tristan Ravitch