ca_install is a package that helps you identify missing components (compilers, tools, libraries etc.) on your system if you want to install software. Sometimes a system does not even have the csh shell, or a missing fortran compiler, or missing development libraries or include files. This package helps you identify those. Many packages will have their own configure (or configure-like) script(s) to help configuring and installing, but this meta package helps in finetuning problems.
Step 0: get the package
To get started, download ca_install. You can either use the unix shell command line:
curl ftp://ftp.astro.umd.edu/progs/carma/ca_install.tar.gz | tar zxf - or wget -O - ftp://ftp.astro.umd.edu/progs/carma/ca_install.tar.gz | tar zxf -
depending on which of the two commonly URL downloaders you have. Or else, use the browser and click on the link above, after which you will probably need to untar this file:
tar zxf ca_install.tar.gz
Then change directory:
It is quite possible this tar file is out of date with CVS, so you can optionally follow this with an update (since we kept the CVS administration files pointed to anonymous logins):
cvs login cvs update
you may get a prompt when asking for a password, but hit enter, the anonymous user is set up with no password.
Step 1: configure to find where programs are
In the ca_install directory you type:
this will produce some output, hopefully nothing disastrous missing. Look over the output and more details about why something may be missing can be found in the config.log file. Send this to Peter if you need more hints on what you can do to install missing components. Or just go on and install the packages you want to install.
Step 2: Hello World
Change to the Hello_World directory, and see if all the tests work to compile and link C and Fortran programs:
cd Hello_World make -i tests
some of the compilations may fail, but if everything works, you should see something like:
Hello World 1 Hello World 2a Hello World 2b Hello World 3 Hello SubWorld 2a Hello SubWorld 2b Hello SubWorld 2a Hello SubWorld 2b Hello SubWorld 1 Hello SubWorld 1
If some of the SubWorld lines are missing, that is not so disastrous, but the Hello World lines should all be there, or else you have some major compiler issues. The SubWorld lines test if Fortran and C can be linked in a number of ways.
If you have added packages or software, go back to step 1 and re-run configure from the start.
Step 2a: Hello World precompiled
If the previous step resulted in horrible deaths, you can try to see if precompiled binaries work:
or if even that results in messages such as FooBar/hello1: No such file or directory you can try and set the ARCH variable to something that we precompiled for you, e.g.
make test2 ARCH=Linux_x86_64
If none of that works, we'll need surgery.
Intermezzo: the missing compilers
On a debian (e.g. Ubuntu) style Linux machine, where often only the C compiler comes installed:
sudo apt-get install gfortran g++
On a redhat (e.g. Fedora) style Linux machine:
yum install gcc-gfortran
On a MAC, use the Xcode DVD to install missing components. Sorry, no easy commandline here. There's also a link off the Apple's developers web page to install these.
If you still had to install some component of the compiler(s), the likelyhood is quite large your distribution is far from complete and will have many things missing. Re-run the configure script again, and carefully look at the missing programs and libraries.
Another neat trick for Linux users is querying their package manager. If you have another machine where you know a file exists that you have missing, how do you figure out what package this is from and how to then install it? There is a difference how different package managers do this. Here's the two main flavors:
On Redhat flavors (SuSe, Centos and Fedora probably work this way)
rpm -qf /usr/include/X11/Xos.h -> xorg-x11-proto-devel-7.4-14.fc11.noarch yum install xorg-x11-proto-devel
On Debian flavors (Ubuntu works this way)
dpkg -S /usr/include/X11/Xos.h -> x11proto-core-dev dpkg -i x11proto-core-dev