[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

960128: Install netcdf on linux PC



>From: Youcheng Zhang <address@hidden>
>Organization: .
>To: address@hidden
>Keywords: 199601280711.AA14026

>Dear Sir,
>
>I am trying to install netcdf on my linux PC
>with no luck. I follow the instruction in "INSTALL".
>I invoke the configure script with
>CC=gcc CPPFLAGS= configure --prefix=/usr/local
>When I try to make all (make all > log 2>&1 &)
>I got the message "IOT Trap/Abort".
>Have netcdf been successfully tested on linux ?
>If so , would you please help me to tell how to
>configure and compile netcdf on linux platform.
>
>(I have tried netcdf-232pl4 & netcdf-2.4-beta6)
>
>The system I use is Slackware 3.0 with kernel 1.2.13
>and gcc 2.7.0.
>
>Appreciate !

We received the message I attached below from a user that just
installed the netCDF on Linux.  Perhaps something in his message
can help you get going on your system (we have no Linux system
to test the netCDF installation on).

>Youcheng Zhang
>Dept. Oceanography, TAMU
>address@hidden


>From address@hidden Fri Jan 26 10:26:57 1996
>>Hi,

>>I have just installed the netCDF library (version 2.4pl6) without 
>>any problems! This wasn't the case with earlier versions. Thanks.
>>I didn't install the Fortran part because g77 doesn't recognize 
>>INTEGER*2 (known bug), and I do not have f2c.
>>The C and C++ part are compiled without any problems using gcc,
>>g++, flex and bison. 
>>I have also installed a shared netcdf-library, which is useful
>>when you are running more than one application linked with the 
>>netcdf-library. I have attached a script which compiles a shared
>>netcdf-library and recompiles ncdump and ncgen. It should be used 
>>after the suggested compilation method, NOT followed by a "make 
>>clean".

>>Best regards,
>>Richard van Hees
>>e-mail:address@hidden

#!/bin/sh -x
#
# Date:    20-Jan-96
#
# Purpose: 1) make a shared netCDF library using the gcc compiler
#          2) recompile ncdump and ncgen with the shared library
#
# Use:     Compile the netCDF software
#          I have used: - CC=gcc
#                       - CFLAGS='-O2 -m486 -fPIC'
#                       - CXX=g++
#                       - FC=
#                       - OS=linux
#          Type "make_shared"
#          Install ncdum and ncgen by hand otherwise they are recompiled
#          which the static library!
#
# Note:    only tested on a Linux-PC, gcc 2.7.2, ELF
#               ---> NO FORTRAN SUPPORT!!!  <---
#
# Author:  R.M. van Hees
#          email address@hidden
# 
MAJOR_VERSION="2"
MINOR_VERSION="4"
PATCH_VERSION="6"

SH_NAME="libnetcdf.so"
SH_LIB="${SH_NAME}.${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
SH_BUILD="-shared -Wl,-soname,${SH_NAME}.${MAJOR_VERSION}"
SH_OBJ='array.o attr.o cdf.o dim.o file.o iarray.o error.o globdef.o putget.o 
putgetg.o sharray.o string.o var.o xdrposix.o'

cd libsrc
gcc ${SH_BUILD} -o ${SH_LIB} ${SH_OBJ}
ln -sf ${SH_LIB} ${SH_NAME}.${MAJOR_VERSION}
ln -sf ${SH_NAME}.${MAJOR_VERSION} ${SH_NAME}
cd ..

cd ncdump
rm ncdump
gcc -o ncdump ncdump.o vardata.o dumplib.o -L../libsrc -lnetcdf
strip ncdump
cd ..

cd ncgen
rm ncgen
gcc -o ncgen main.o load.o ncgentab.o escapes.o getfill.o init.o close.o 
genlib.o -L../libsrc -lnetcdf
strip ncgen
cd ..

Tom Yoksas