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

20000922: problem installing netCDF under Linux: no "linux/errno.h"



Francisco,

> To: address@hidden
> From: "Francisco Teixeira" <address@hidden>
> Subject: problem installing netCDF under Linux
> Organization: Institute of Geology and Mining, Portugal
> Keywords: 200009220903.e8M93bb27655

The above message contained the following:

> Excuse me if this is not the right place to post this question:

This is the right place.

> PROBLEM:
> My machine is an Intel Pentium III with Linux RedHat 6.2.
> I am trying to install GMT 3.3.4.
> I have been trying to install NetCDF 3.4 without success.
> 
> I used the following parameters in the 'configure' file:
>    CC=/usr/bin/gcc
>    CPPFLAGS=-DNDEBUG
>    CFLAGS=-g
>    FC=/usr/bin/g77
>    FFLAGS='-g -w'
>    CXX=/usr/bin/g++
>    (also tried with CPPFLAGS= )
> 
>    #./configure
>    compilers checking phase passes OK
>    # make
>    /usr/include/bits/errno.h: 25: linux/errno.h : no such file
> 
> As a matter of fact the file does not exist (the subdirectory linux/ is 
> inexistent);
> the same filename exists at /usr/include/sys/errno.h but trying to use this 
> file doesn't work (undeclared constants appear).
> 
I have been reading several FAQs, etc., but apparently there's no answer to 
> my problem.
> I have installed autoconf-2.13.5 RPM from the RedHat 6.2 CD and run it to 
> generate 'configure'.
> The same problems.
> 
> I got a RPM for the netcdf3.4 specfile and tried builting the package using
>    #rpm -bb netcdf-3.4.spec
> The operation fails. Following is part of the output:
> 
> creating libsrc/ncconfig.h
> + make
> make[1]: Entering directory `/usr/src/redhat/BUILD/netcdf-3.4/src'
> 
> Making `all' in directory /usr/src/redhat/BUILD/netcdf-3.4/src/libsrc
> 
> make[2]: Entering directory `/usr/src/redhat/BUILD/netcdf-3.4/src/libsrc'
> cc -c -O2 -m486 -fno-strength-reduce -I.  -DNDEBUG -Df2cFortran attr.c
> In file included from /usr/include/errno.h:36,
>             from netcdf.h:39,
>             from nc.h:16,
>            from attr.c:8:
> /usr/include/bits/errno.h:25: linux/errno.h: No such file or directory
> make[2]: *** [attr.o] Error 1
> make[2]: Leaving directory `/usr/src/redhat/BUILD/netcdf-3.4/src/libsrc'
> make[1]: *** [subdir_target] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/netcdf-3.4/src'
> make: *** [libsrc/all] Error 2
> Bad exit status from /var/tmp/rpm-tmp.84695 (%build)

The above indicates that the C compiler couldn't find the header-file
"linux/errno.h" that its own header-file "/usr/include/errno.h"
references.  This indicates a problem with the C installation (a C
implementation must be able to find all the header files that it
references).  I would show this problem to your system administrator,
complain to the vendor (RedHat), and/or reinstall the C implementation.

> 
> QUESTIONS:
> Am I missing something ? Doing something wrong ?

The problem lies with the C implementation.

> Is this a problem of my Linux version or a netcdf s/w problem ?

It's not a netCDF problem.

> Do you know of any RPM for the netcdf3.4 library that really works?

Sorry, no.

> Any suggestion to solve this problem ?
> 
> Thanks.
> Francisco.
> 
> __________________________________________
> Francisco Curado Teixeira
> Departamento de Geologia Marinha - Instituto Geológico e Mineiro
> Marine Geology Department - Institute of Geology and Mining
> E-mail: address@hidden / address@hidden
> Tel. 351-214718922 / 21 3620792   Fax.351-214718941
> Apartado 7586 * 2720 ALFRAGIDE * PORTUGAL

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>