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

Re: 960502: netCDF for Linux



>Organization: Geophysical Department, Utrecht University
>Keywords: 199605021020.AA25647

Hi Torild,

> Do you have configure/makefiles available for a Linux installation or
> could you provide me with an address of somebody who has implemented
> netCDF on Linux?  Thanks.

We don't have access to a Linux platform here on which to test our configure
file, yet, but our next minor release (version 2.4.2, probably released
early next week) will include a netcdf/fortran/linux.m4 file used for
implementing the Fortran interface.  If you don't really need the Fortran
interface (specify FC="" to configure), you may find that the current
version works fine with the existing configure file.  All the problems users
have reported with Linux and the latest netCDF relate to various Fortran
compilers.

I've appended email from another user at the University of Utrecht who
succeeded in porting the 2.4 beta release of netCDF to Linux.  I hope this
helps.

--Russ

______________________________________________________________________________

Russ Rew                                           UCAR Unidata Program
address@hidden                              http://www.unidata.ucar.edu


To: Richard van Hees <address@hidden>
Subject: Re: 960126: shared netCDF library on Linux 
In-Reply-To: Your message of "Sat, 27 Jan 1996 17:41:57 MST."              
<address@hidden> 
Date: Mon, 29 Jan 1996 08:04:03 -0700
From: Russ Rew <address@hidden>

>Organization: University of Utrecht (The Netherlands)
>Keywords: 199601260826.AA05869 netCDF Linux

Hi Richard,

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

Great, thanks for letting us know this worked.  We don't have a Linux
platform to test on, so this is useful to know.

> 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".

Thanks for the script.  At one time, we tried to distribute versions of
Makefiles that made shared libraries on all platforms that supported them,
but there were so many different ways to do this that we ultimately gave up
on trying to support building the netCDF libraries as shared libraries by
default.  But having your message in our e-mail support archive may help
someone else who needs to do this on Linux.

--Russ

______________________________________________________________________________

Russ Rew                                           UCAR Unidata Program
address@hidden                              http://www.unidata.ucar.edu

> #!/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 ..
> 
> - --------------73865C1E390B--
> 
> 
> ------- End of Forwarded Message
>