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

Re: 960501: netcdf-2.4.1 under Linux



>Keywords: 199605012007.AA06514 Linux

Hi,

> When I try to compile netcdf-2.4.1 on Linux PC
> I got the error
> "Segmentation Fault". The details is as follows.
> 
> I add "OS=linux" in Makefile.in, and use
> "CC=gcc CPPFLAGS= CXX=g++ FC="" XDR=/usr/lib/libc.a
> ./configure --prefix=/usr/local" to configure.
> I got some error when try to make all (at the time
> to compile in cxx directory ) because of missing some 
> header files. The error disappears after I make symbolic
> links in /usr/include to these header files in 
> /usr/include/g++-include.
> The "make all" was successful.
> The "make test" was also successful.

Good.  You did the right things to build netCDF for Linux.  We don't have a
Linux platform here yet, so we can't test the result, but the fact that
"make test" worked means you succeeded in building it from the 2.4.1 source
distribution.

> I got some error when try
> "make install" (at the time to make install
> in ncdump directory), and the installation stoped.

Without knowing what the error was, we can't be of much help.

> I manually copy the ncdump and ncgen to /usr/local/bin.

That's fine.  The only other thing you should need to do is manually copy
the libnetcdf.a compiled library to /usr/local/lib/ and the netcdf.h file to
/usr/local/include/ (if that's where you install such things).  The "make
install" step also attempts to copy the "man page" documentation to a man/
directory as the last step.

> When I try to "make clean" I got
> "Segmentation Fault".

That sounds like a problem with the "rm" command or "make", rather than with
the netCDF sources.  If the segmentation fault produces a "core" file, try
to determine what was running that produced the core file.  Often this can
be done by running "file core" to identify the executable.  Also, make sure
that you don't have "rm" aliased to an interactive command, which won't work
very well when invoked from a Makefile (but it shouldn't cause a
segmentation fault).

> I delete libnetcdf.a netcdf.h ncgen ncdump files
> and the whole directory netcdf-2.4.1 then uncompress 
> the netcdf-2.4.1.tar.Z.

It should not be necessary to delete the old files and reget the
distribution.  The "make install" is supposed to install new copies over the
old ones.

> After repeat the configure step and to try to recompile
> it I got "Segmentation fault" at "make all".
> I do the something after reboot computer and reget the 
> netcdf-2.4.1.tar.Z package then try again.
> I still cannot "make all" (Segmentation fault occurs
> as soon as I press the Enter).
> What is wrong? Would you please help me.

If "make all" immediately produces a segmentation fault, it may be that your
"make" executable, or some other file it depends on is corrupted, especially
since this all worked fine the first time you tried it.  Can you invoke
"make" successfully for any other packages?  If not, can you reinstall the
"make" executable?  Can you determine what caused the segmentation fault
from a core file?

I'm sorry I can't pinpoint the problem, but from the symptoms it could be
corrupted disk files, something weird in the environment, a non-standard
PATH setting, or ...

______________________________________________________________________________

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