[Haskell-cafe] Can I build and install GHC 6.10.1 without previous installed ghc

Wang, Chunye (NSN - CN/Beijing) chunye.wang at nsn.com
Sun Dec 21 22:15:38 EST 2008


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 <tromey at redhat.com>.

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

%sed --version
GNU sed version 4.1.2
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,
to the extent permitted by law.

%diff --version
diff (GNU diffutils) 2.8.1
Copyright (C) 2002 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Written by Paul Eggert, Mike Haertel, David Hayes,
Richard Stallman, and Len Tower.

%python -V
Python 2.3.4


Best Regards 
Chunye Wang <chunye.wang at nsn.com> 



More information about the Haskell-Cafe mailing list