Can I build and install GHC 6.10.1 without previous installed ghc

Hi All,
I have our own Linux distribution installed in my server.
it is based on RedHat 9.0. Because it is the server, I can
not update it to any other linux distribution
Here is my situation, I have no machine with any version of ghc
installed.
This is what I did
% wget http://haskell.org/ghc/dist/6.10.1/ghc-6.10.1-src.tar.bz2
% wget
http://haskell.org/ghc/dist/6.10.1/ghc-6.10.1-src-extralibs.tar.bz2
% tar -jxf ghc-6.10.1-src-extralibs.tar.bz2
%tar -jxvf ghc-6.10.1-src.tar.bz2
% cd ghc-6.10.1
% sh boot
grep: packages: No such file or directory
Booting .
Booting libraries/base
Booting libraries/directory
/usr/share/aclocal/libgcrypt.m4:23: warning: underquoted definition of
AM_PATH_LIBGCRYPT
run info '(automake)Extending aclocal'
or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal
/usr/share/aclocal/ao.m4:9: warning: underquoted definition of
XIPH_PATH_AO
Booting libraries/editline
Booting libraries/network
Booting libraries/old-time
Booting libraries/process
Booting libraries/regex-posix
Booting libraries/time
Booting libraries/unix
% ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Canonicalised to: x86_64-unknown-linux
checking for ghc... no
checking for ghc-pkg matching ... no
checking for ghc-pkg... no
checking whether ghc has editline package... no
checking for nhc... no
checking for nhc98... no
checking for hbc... no
checking for ld... /usr/local/bin/ld
configure: error: GHC is required unless bootstrapping from .hc files.
I know http://hackage.haskell.org/trac/ghc/wiki/Building/Prerequisites
said that GHC 6.6 is required to build and install the GHC 6.10.1
So I try to follow the instructions
http://hackage.haskell.org/trac/ghc/wiki/Building/Porting.
Because I don't have any ghc installed in any machine. I have to use the
"Porting GHC to a new platform "
%./configure --enable-hc-boot --enable-hc-boot-unregisterised
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Canonicalised to: x86_64-unknown-linux
checking for ghc... no
checking for ghc-pkg matching ... no
checking for ghc-pkg... no
checking whether ghc has editline package... no
checking for nhc... no
checking for nhc98... no
checking for hbc... no
checking for ld... /usr/local/bin/ld
checking for path to top of build tree... ./configure: line 2733: -v0:
command not found
./configure: line 2737: utils/pwd/pwd: No such file or directory
configure: error: cannot determine current directory
I think it is because the utils/pwd/pwd.hs is not compiled and linked
into the ``pwd''.
So I create a bash version of pwd
#!/bin/bash
pwd
And m make it executeble, chmod +x utils/pwd/pwd
Then I try to run the ./configure --enable-hc-boot
--enable-hc-boot-unregisterised again
%./configure --enable-hc-boot --enable-hc-boot-unregisterised again
%cd includes
%make
%cd ..
Finnally, I found I still need ghc is intalled on the host machine.
%perl --version
This is perl, v5.8.5 built for x86_64-linux-thread-multi
Copyright 1987-2004, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to
the
Internet, point your browser at http://www.perl.com/, the Perl Home
Page.
%gcc --version
gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
%make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
%autoconf --version
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
%automake --version
automake (GNU automake) 1.9.2
Written by Tom Tromey

chunye.wang:
Hi All,
I have our own Linux distribution installed in my server. it is based on RedHat 9.0. Because it is the server, I can not update it to any other linux distribution
Here is my situation, I have no machine with any version of ghc installed.
Please use a basic linux binary. http://haskell.org/ghc/download_ghc_6_10_1.html#x86linux Such as "Linux (x86)" -- Don

Hi Don,
I tried to install the ghc 6.8.0 last year but failed for some
reason.
Now I decide to do it again, because I'd like to try
some
examples in <<Real World Haskell>>
Now I remember why I try to install it from source code,
because the binary version has the following problem.
%./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Which we'll further canonicalise into: x86_64-unknown-linux
checking for path to top of build tree... pwd: timer_create: Invalid
argument
configure: error: cannot determine current directory
I know my linux distribution is a private modified version,
which is based on RedHat 9.0
I guess it is pretty old version.
I also installed many other software from source code.
I guess ``timer_create '' is failed because of library
confliction.
Best Regards
Chunye Wang
Hi All,
I have our own Linux distribution installed in my server. it is based on RedHat 9.0. Because it is the server, I can not update it to any other linux distribution
Here is my situation, I have no machine with any version of ghc
installed.
Please use a basic linux binary. http://haskell.org/ghc/download_ghc_6_10_1.html#x86linux Such as "Linux (x86)" -- Don

On Mon, 2008-12-22 at 11:53 +0800, Wang, Chunye (NSN - CN/Beijing) wrote:
I tried to install the ghc 6.8.0 last year but failed for some reason. Now I decide to do it again, because I'd like to try some examples in <<Real World Haskell>> Now I remember why I try to install it from source code, because the binary version has the following problem.
I guess ``timer_create '' is failed because of library confliction.
I suggest you use the binary for ghc-6.8.2 (not 6.8.3) or earlier because those were built on an old Red Hat 9 server and are thus compatible with older versions of glibc and the Linux kernel. If you really need ghc-6.10 (you probably do not if you're just trying examples from the Real World Haskell book) then you can build ghc-6.10.x from source once you have the ghc-6.8.2 binary installed. Duncan

Hi Duncan,
wget
http://haskell.org/ghc/dist/6.8.2/ghc-6.8.2-x86_64-unknown-linux.tar.bz2
tar -jxvf ghc-6.8.2-x86_64-unknown-linux.tar.bz2
cd ghc-6.8.2
./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Which we'll further canonicalise into: x86_64-unknown-linux
checking for path to top of build tree... pwd: timer_create: Invalid
argument
configure: error: cannot determine current directory
Even though I can fixed this by ``cp /bin/pwd utils/pwd/pwd'' , there is
still similar error
``ghc-pkg.bin: timer_create: Invalid argument''
I guess any executable file generates same error message.
Best Regards
Chunye Wang
I tried to install the ghc 6.8.0 last year but failed for some reason.
Now I decide to do it again, because I'd like to try some examples in <<Real World Haskell>> Now I remember why I try to install it from source code, because the binary version has the following problem.
I guess ``timer_create '' is failed because of library confliction.
I suggest you use the binary for ghc-6.8.2 (not 6.8.3) or earlier because those were built on an old Red Hat 9 server and are thus compatible with older versions of glibc and the Linux kernel. If you really need ghc-6.10 (you probably do not if you're just trying examples from the Real World Haskell book) then you can build ghc-6.10.x from source once you have the ghc-6.8.2 binary installed. Duncan

On Mon, 2008-12-22 at 17:53 +0800, Wang, Chunye (NSN - CN/Beijing) wrote:
Hi Duncan,
wget http://haskell.org/ghc/dist/6.8.2/ghc-6.8.2-x86_64-unknown-linux.tar.bz2 tar -jxvf ghc-6.8.2-x86_64-unknown-linux.tar.bz2
Ahh, x86-64. Those have always been built on Fedora Core 5. My only suggestion is to try older ones, eg 6.6.1. That version should still be able to built 6.10.1 from source and should still be usable for the RWH book. Duncan

Ahh, x86-64. Those have always been built on Fedora Core 5. My only suggestion is to try older ones, eg 6.6.1. That version should still be able to built 6.10.1 from source and should still be usable for
Hi Duncan,
Thanks. IT WORKS !
I install 6.6.1, then compile the 6.10.1.
There are some warning message. It seems that it doesn't matter.
Best Regards
Chunye Wang
Duncan
-----Original Message----- From: ext Duncan Coutts [mailto:duncan.coutts@worc.ox.ac.uk] Sent: Monday, December 22, 2008 7:37 PM To: Wang, Chunye (NSN - CN/Beijing) Cc: Haskell-Cafe@haskell.org Subject: RE: [Haskell-cafe] Can I build and install GHC 6.10.1withoutprevious installed ghc On Mon, 2008-12-22 at 17:53 +0800, Wang, Chunye (NSN - CN/Beijing) wrote:
Hi Duncan,
wget http://haskell.org/ghc/dist/6.8.2/ghc-6.8.2-x86_64-unknown-linux.tar.b z2 tar -jxvf ghc-6.8.2-x86_64-unknown-linux.tar.bz2
Ahh, x86-64. Those have always been built on Fedora Core 5. My only suggestion is to try older ones, eg 6.6.1. That version should still be able to built 6.10.1 from source and should still be usable for the RWH book. Duncan

I've recently built 6.10.1 on fairly archaic RHEL servers, both 64 and 32 bit, and the incantation that worked most seamlessly for me was to grab a really old binary release (in my case 6.2 worked) that installs without intervention, and then build up to the latest version (6.10.1) in steps -- I built 6.6 with 6.2, then 6.10.1 with 6.6, and it all worked without a problem. Of course, I'd try 6.6/binary first, but if that doesn't work, all is not lost, older binary releases may still work, and you can then bootstrap from those.
Rob
----- Original Message ----
From: "Wang, Chunye (NSN - CN/Beijing)"
I tried to install the ghc 6.8.0 last year but failed for some reason.
Now I decide to do it again, because I'd like to try some examples in <<Real World Haskell>> Now I remember why I try to install it from source code, because the binary version has the following problem.
I guess ``timer_create '' is failed because of library confliction.
I suggest you use the binary for ghc-6.8.2 (not 6.8.3) or earlier because those were built on an old Red Hat 9 server and are thus compatible with older versions of glibc and the Linux kernel. If you really need ghc-6.10 (you probably do not if you're just trying examples from the Real World Haskell book) then you can build ghc-6.10.x from source once you have the ghc-6.8.2 binary installed. Duncan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
Don Stewart
-
Duncan Coutts
-
Robert Greayer
-
Wang, Chunye (NSN - CN/Beijing)