howto compile for linux x86_64

Kristian Nilssen knilssen at WEATHER3000.COM
Thu Apr 19 19:10:15 EDT 2007


After a lot of mucking about I've finally got gradsc & gradsnc to
compile (and not segmetation fault) on a 64bit fedora 4 box. This is
roughly how I did it. Perhaps people could add to this thread with their
experiences...

1. download grads-1.9b4-linuxRH9.tar.gz
2. tar -zxvf grads-1.9b4-linuxRH9.tar.gz
3. cd grads-1.9b4
4. ./configure --prefix=/opt/grads --with-readline --with-printim
--with-lats --with-nc --without-hdf --without-dods
    (this won't work - can't find any of the libs for readline, netcdf,
etc).
5. download grads-1.9b3-supplibs-linuxRH9.tar.gz
6. tar -zxvf grads-1.9b3-supplibs-linuxRH9.tar.gz
7. It seems all the stuff in the supplibs is 32 bit. We need 64...
8.    cp /usr/lib64/libpng.a supplibs/lib
    cp /usr/lib64/libz.a supplibs/lib
    cp /usr/lib64/libreadline.a supplibs/lib
    cp /usr/lib64/libgd.a supplibs/lib
    cp /usr/lib64/netcdf-3/libnetcdf.a supplibs/lib
    cp /opt/unidata/udunits/lib/libudunits.a supplibs/lib
9. ./configure --prefix=/opt/grads --with-readline --with-printim
--with-lats --with-nc --without-hdf --without-dods
    (this should work now and find readline and netcdf)
10. add this code into gxhpng.c or you may get errors about missing
gdCompareInt function...

int gdCompareInt(const void *a, const void *b);

int gdCompareInt(const void *a, const void *b)
    {
        return (*(const int *)a) - (*(const int *)b);
    }

11. make
12. make install
13. if you screw anything up, do a 'make distclean'
14. download an untar data.tar.Z
15. export PATH=$PATH:/opt/grads/bin
16. export GADDIR=/opt/grads/data
17. export GASCRP=/opt/grads/script

regrads, (ho ho ho)
Kristian.



More information about the gradsusr mailing list