Installing the GODI system on Tiger (Part I)
Synopsis
Given the complexity of the stack described in my previous post, things did not quite go into linear fashion.
However as far as GODI itself is concerned, I just had to overcome a single hurdle for its installation on my system. The rest of the process was surprisingly smooth.
Getting the GODI distribution
From the GODI homepage I downloaded
godi-rocketboost-20080630.tar.gz (which is the version including Ocaml 3.10.2) and unpacked it under my 'Ocamel' directory.
As this software is not installed via 'wizard', one needs to read the README file first.
In the section 'Requirements', it is clearly explained that the installation requires the GNU gcc compiler (which is best provided by the Xcode package engineered by Apple) and also other UNIX tools such as GNU make (which on my Mac is provided by Fink).
As I had already Fink installed on my Mac, the only additional step before starting the Ocaml installation was to install a Tiger-compatible version of the Xcode tools (2.2.1), which is a binary package.
As it is a standard Mac OS tool, gcc is installed under /usr/bin, which location is available by default.
From then on I opened a "Terminal" shell from Applications> Utilities> Terminal.
From Fink I installed the GNU make software.
Fink installs by default any software additional to Mac OS X under the /sw/bin directory, which I also advise to stick to.
In the UNIX world it is common practice that additional software be installed underneath /usr/local/bin, however certain binary packages for Mac OS X already choose to do so, so I think it is best to keep things separate:
-> /usr/bin and /usr/lib for standard Mac OS packages
-> /usr/local/bin and /usr/local/lib for some additional 3rd party software (binary packages)
-> /sw/bin and /sw/lib for Fink packages
(confer the Fink F.A.Q for more details)
Setting up the BASH environment
My "Terminal" being configured with the BASH shell,
I have setup the .bash_profile for my user (ronan) as follows:
# setup GODI/Ocaml home directory
export GODI_HOME=/Users/ronan/Documents/Ocamel/GODI_HOME
export OCAML_HOME=${GODI_HOME}/bin
# setup Fink environment
test -r /sw/bin/init.sh && . /sw/bin/init.sh
# setup PATH (which includes /usr/bin by default)
export PATH=${OCAML_HOME}:${GODI_HOME}/bin:${GODI_HOME}/sbin:/usr/local/bin:${PATH}
The first battle and (single) hurdle
I started the first step of the GODI bootstrap with:
wget: unrecognized option `--no-glob'
Usage: wget [OPTION]... [URL]...
Due to the PATH containing ${GODI_HOME}/bin in priority,
I created the following 'wget' Perl script in ${GODI_HOME}/bin as follows, to intercept the execution of /sw/bin/wget, and substitute the correct options:
#!/usr/bin/perl
# Interceptor for GODI
# for --no-glob, the correct option is --glob=off
# for --no-cookies, correct option is --cookies=off
use strict;
my %corrections = ( "--no-glob" => "--glob=off",
"--no-cookies" => "--cookies=off" );
my @args = qw( /sw/bin/wget );
foreach my $arg (@ARGV) {
$arg = $corrections{$arg} if defined $corrections{$arg};
push(@args, $arg);
}
exec(@args);
After this was done, the first stage of the bootstrap process completed successfully.
The impressive build
End of part I
Given the complexity of the stack described in my previous post, things did not quite go into linear fashion.
However as far as GODI itself is concerned, I just had to overcome a single hurdle for its installation on my system. The rest of the process was surprisingly smooth.
Getting the GODI distribution
From the GODI homepage I downloaded
godi-rocketboost-20080630.tar.gz (which is the version including Ocaml 3.10.2) and unpacked it under my 'Ocamel' directory.
As this software is not installed via 'wizard', one needs to read the README file first.
In the section 'Requirements', it is clearly explained that the installation requires the GNU gcc compiler (which is best provided by the Xcode package engineered by Apple) and also other UNIX tools such as GNU make (which on my Mac is provided by Fink).
As I had already Fink installed on my Mac, the only additional step before starting the Ocaml installation was to install a Tiger-compatible version of the Xcode tools (2.2.1), which is a binary package.
As it is a standard Mac OS tool, gcc is installed under /usr/bin, which location is available by default.
From then on I opened a "Terminal" shell from Applications> Utilities> Terminal.
From Fink I installed the GNU make software.
Fink installs by default any software additional to Mac OS X under the /sw/bin directory, which I also advise to stick to.
In the UNIX world it is common practice that additional software be installed underneath /usr/local/bin, however certain binary packages for Mac OS X already choose to do so, so I think it is best to keep things separate:
-> /usr/bin and /usr/lib for standard Mac OS packages
-> /usr/local/bin and /usr/local/lib for some additional 3rd party software (binary packages)
-> /sw/bin and /sw/lib for Fink packages
(confer the Fink F.A.Q for more details)
Setting up the BASH environment
My "Terminal" being configured with the BASH shell,
I have setup the .bash_profile for my user (ronan) as follows:
# setup GODI/Ocaml home directory
export GODI_HOME=/Users/ronan/Documents/Ocamel/GODI_HOME
export OCAML_HOME=${GODI_HOME}/bin
# setup Fink environment
test -r /sw/bin/init.sh && . /sw/bin/init.sh
# setup PATH (which includes /usr/bin by default)
export PATH=${OCAML_HOME}:${GODI_HOME}/bin:${GODI_HOME}/sbin:/usr/local/bin:${PATH}
The first battle and (single) hurdle
I started the first step of the GODI bootstrap with:
./bootstrap --prefix ${GODI_HOME}and got the following (cryptic) error message:wget: unrecognized option `--no-glob'
Usage: wget [OPTION]... [URL]...
After a bit of investigation I found out that some versions of wget accept only the following options: --glob=off,
--cookies=off
unfortunately this was the case with the version of wget provided by Fink.--cookies=off
Due to the PATH containing ${GODI_HOME}/bin in priority,
I created the following 'wget' Perl script in ${GODI_HOME}/bin as follows, to intercept the execution of /sw/bin/wget, and substitute the correct options:
#!/usr/bin/perl
# Interceptor for GODI
# for --no-glob, the correct option is --glob=off
# for --no-cookies, correct option is --cookies=off
use strict;
my %corrections = ( "--no-glob" => "--glob=off",
"--no-cookies" => "--cookies=off" );
my @args = qw( /sw/bin/wget );
foreach my $arg (@ARGV) {
$arg = $corrections{$arg} if defined $corrections{$arg};
push(@args, $arg);
}
exec(@args);
After this was done, the first stage of the bootstrap process completed successfully.
The impressive build
End of part I
I also had to edit $GODI_HOME/build/mk/defs.cmd.mk to make it to use this perl script instead of /usr/bin/wget
ReplyDelete