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

[netCDF #TIR-244328]: can't make check for netcdf 4.1.2-beta2-snapshot2010102020



Hi Andre,

> My configuration:
> netcdf 4.1.2-beta2-snapshot2010102020
> Slackware 13.1
> g++ 4.4.4
> gcc 4.4.4
> gfortran 4.4.4
> 
> If I do only "make" netcdf compiles normally.
> If i try to use "make check" the compiler tells me trying to compile nf_test
> components:
> 
> ../fortran/.libs/libnetcdff.so: undefined reference to `nf_set_base_pe_'
> ../fortran/.libs/libnetcdff.so: undefined reference to `nf__open_mp_'
> ../fortran/.libs/libnetcdff.so: undefined reference to `nf_inq_base_pe_'
> ../fortran/.libs/libnetcdff.so: undefined reference to `nf__enddef_'
> ../fortran/.libs/libnetcdff.so: undefined reference to `nf__create_mp_'
> ../fortran/.libs/libnetcdff.so: undefined reference to `nf__open_'
> ../fortran/.libs/libnetcdff.so: undefined reference to `nf__create_'
> 
> And several other fortran functions. It appears that there is no linkage for
> the case.
> 
> I have the same problem if i use --disable-f90
> Do i have to install another fortran compiler for the case ?
> 
> Since i'm not used to fortran i'm posting here expecting that you have the
> possibility to help me in the future.

From the "good_make.txt" file you sent, it appears that the Fortran
test is being compiled with g95 rather than the gfortran compiler that
should be used with gcc:

  libtool: link: g95 -I../fortran -I../f90 -I.. -I../liblib -g -O2 -o 
.libs/nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o 
test_write.o util.o fortlib.o  ../fortran/.libs/libnetcdff.so 
/usr/lib/libgfortran.so -lm ../liblib/.libs/libnetcdf.so /usr/lib/libcurl.so 
/usr/lib/libidn.so /usr/lib/libldap.so /usr/lib/liblber.so /usr/lib/libsasl2.so 
-lresolv -lrt -lssl -lcrypto -ldl -lz

Apparently g95 is being found earlier in your PATH than gfortran, and
that g95 has different conventions for calling C from Fortran than the
gcc/gfortran combination use.

You should either 

 1. change your PATH so that gfortran is found before g95, before
    invoking the configure script, or

 2. specify no Fortran API is desired by configuring with
    --disable-fortran or --disable-f77.  It is not enough to just
    specify --disable-f90, that only says you don't want a Fortran-90
    API but still want an F77 API.

--Russ

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



Ticket Details
===================
Ticket ID: TIR-244328
Department: Support netCDF
Priority: High
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.