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

[netCDF #DMW-679093]: Unable to run make check



> Letting F77=/sw/bin/gfortran did the trick. However I am confused by this:
> 
> parihaka: Yes Mistress 96>> nc-config --all

The "nc_config" command jut shows the configuration for the netCDF-C library.
It's actually irrelevant what F77 or F90 environment variables are set to when
building the netCDF-C library, since building, testing, and installing it don't
require compiling any Fortran.  The only reason it has

> --fc -> /sw/bin/gfortran
> --fflags -> -I/usr/local/include
> --flibs -> -L/usr/local/lib -lnetcdff -lnetcdf -lnetcdf
> --has-f90 -> no

is to make older Makefiles work that depended on a combined C/Fortran library
for netCDF and just used nc-config for finding where the necessary libraries 
were 
installed. It actually calls nf-config to find this information, so the above 
output
reflects some previous netCDF-Fortran installation.

To build the netCDF-Fortran library and test whether setting 
F77=/sw/bin/gfortran
works, it's necessary to rebuild the netCDF-Fortran library after netCDF-C is 
installed. For this, you should also set F90=/sw/bin/gfortran. Just follow the
instructions and examples here:

  http://www.unidata.ucar.edu/netcdf/docs/building_netcdf_fortran.html

If that works and you can install netCDF-Fortran, then nf-config should give the
output you expect, and nc-config, using the new nf-config, should also work as
expected.

> This netCDF 4.3.3.1 has been built with the following features:
> 
> --cc -> /sw/bin/gcc-4
> --cflags -> -I/usr/local/include
> --libs -> -L/usr/local/lib -lnetcdf
> 
> --has-c++ -> no
> --cxx ->
> --has-c++4 -> no
> --cxx4 ->
> 
> --fc -> /sw/bin/gfortran
> --fflags -> -I/usr/local/include
> --flibs -> -L/usr/local/lib -lnetcdff -lnetcdf -lnetcdf
> --has-f90 -> no
> 
> --has-dap -> yes
> --has-nc2 -> yes
> --has-nc4 -> yes
> --has-hdf5 -> yes
> --has-hdf4 -> no
> --has-pnetcdf-> no
> 
> --prefix -> /usr/local
> --includedir-> /usr/local/include
> --version -> netCDF 4.3.3.1
> 
> The only reason I went thru this exercise is that I need f90 support. I use 
> FINK and it did not come with it either, hence this exercise.
> Nowhere in the doco does it tell me how to turn it on. And yet when I built 
> it a few years ago (netcdf-4.2.1.1, netcdf-fortran-4.2, gcc 4.8.1)
> that setting was on. w/out any specific settings.
> What am I missing?

The netCDF-Fortran configure script tests whether the Fortran compiler you 
specify
with F90 (or FC) compiles Fortran-90. In recent releases of netCDF-Fortran2, it 
also
tests whether the compiler supports F2003 and F2008 features, and if so uses 
them.
So using a recent version of gfortran should certainly support F90 features. 
The output
from running configure in the netCDF Fortran config.log should help determine 
why, if
F90 support is not detected. So if rebuilding netCDF-Fortran doesn't provide 
the 
Fortran-90 API, please send us the config.log from that build and we'll try to 
figure
out what's going wrong ...

--Russ

> Thanx
> Gaby
> 
> 
> On 15/09/15 03:17, "Unidata netCDF Support" 
> <address@hidden<mailto:address@hidden>> wrote:
> 
> No luck, your suggestion did not work. It’s weird because installing
> netcdf-c was smooth as.
> I am attaching the makefile as you requested. It’ definitively using the
> packaged libtool,
> but I’ve tried a couple of things myself and this is what I‘ve noticed:
> 1) the sources in the test directories do not all compile. Looking closely
> at the make all output (also attached)
> I see that at some point the wrong libtool is getting called.
> 2) I looked at the option of the libtool when linking (libtool --help
> --mode=link) and -I does not appear to be a valid a option, perhaps the -I
> is meant to be -L? It would make more sense
> 3) I’ve tried to run the main command from the command line, and for one
> thing it does not like the -o option to be where it is. ...
> 
> I've looked at the differences between the top-level Makefile generated when
> you run configure and what we get on an OSX platform.
> 
> The first difference that jumps out at me is the setting of the F77 macro in 
> the
> Makefile, where you have
> 
> F77 =
> FC = /sw/bin/gfortran
> 
> instead of what we see
> 
> F77 = gfortran
> FC = gfortran
> 
> and another Makefile variable setting later in the Makefile, where you have
> 
> ac_ct_F77 =
> ac_ct_FC =
> 
> instead of
> 
> ac_ct_F77 = gfortran
> ac_ct_FC = gfortran
> 
> You could try running "make clean", setting F77 to your gfortran and then
> rerunning configure before make all and make check.
> 
> An easier alternative, since you're evidently using MacPorts and getting its
> gcc and gfortran, would be to install the MacPorts netcdf-fortran package,
> which installs the same versions:
> 
> http://www.macports.org/ports.php?by=name&substr=netcdf
> 
> --Russ
> 
> ... By rearranging the
> order of things I’ve gotten to this:
> parihaka: Yes Mistress 179>>  /bin/sh ../libtool --tag=F77 --mode=link
> f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o
> test_read.o test_write.o util.o f03lib.o ../fortran/libnetcdff.la
> -L../fortran -lnetcdf -o nf_test
> ../libtool: line 2636: func__fatal_error: command not found
> ../libtool: line 2636: func__fatal_error: command not found
> ../libtool: line 2636: func__fatal_error: command not found
> ../libtool: line 2636: func__fatal_error: command not found
> libtool: link: f03lib_f_interfaces.o test_get.o test_put.o nf_error.o
> nf_test.o test_read.o test_write.o util.o f03lib.o -o .libs/nf_test
> -L../fortran -ldl -lm -lz -lcurl
> ../libtool: line 1731: f03lib_f_interfaces.o: command not found
> Which is a lot more reasonable, but fails because the test code was not
> compiled in the first place.
> Hope this all helps
> Gaby
> PS. I’ve tried to use the previous version of necdf-fortran and that’s
> even worse off, cannot even run make all.
> On 14/09/15 07:12, "Unidata netCDF Support"
> <address@hidden<mailto:address@hidden>> wrote:
> >I wrote,
> >
> >> I'll jump in here and guess that the configure script is using the
> >>wrong libtool in creating your Makefiles,
> >> maybe using /usr/bin/libtool (a Mac OSX utility that has nothing to do
> >>with the GNU ./libtool that should
> >> have been in your build directory).  You can check this by running,
> >>from your build directory, the following
> >> two commands:
> >>
> >> $ ./libtool --version
> >> $ libtool --version
> >
> >Though I still think the problem is with libtool, I don't think it has
> >anything to do with
> >/usr/bin/libtool on your system, since the configure script has the
> >following lines
> >
> >  # Always use our own libtool.
> >  LIBTOOL='$(SHELL) $(top_builddir)/libtool'
> >
> >However, I still think remaking the configure script with autoreconf -if
> >(not "autreconf -if" as in
> >my previous response) might fix the problem.
> >
> >> If you have autoconf installed, you might be able to fix this by
> >>running the following command
> >> in your netCDF-Fortran source directory, to remake the configure script:
> >>
> >> $ autoreconf -if
> >>
> >> Then rerun configure, make all, and make check to see if the problem is
> >>fixed.
> >
> >If it doesn't, please send us the nf_test/Makefile, which might help to
> >diagnose the
> >problem.
> >
> >--Russ
> >
> >> On 10/09/15 03:58, "Unidata netCDF Support"
> >> > <address@hidden<mailto:address@hidden>> wrote:
> >> >
> >> > >Hello Gabriella,
> >> > >
> >> > >Can you please provide the 'config.log' file generated when you
> >> > >configured netcdf-fortran? That will provide some additional
> >>information
> >> > >we can use to try to figure this issue out.  Thanks!
> >> > >
> >> > >-Ward
> >> > >
> >> > > Full Name: Gabriella Turek
> >> > >> Email Address: address@hidden<mailto:address@hidden>
> >> > >> Organization: NIWA
> >> > >> Package Version: netcdf-fortran-4.4.2
> >> > >> Operating System: Mac OS 10.10
> >> > >> Hardware:
> >> > >> Description of problem: Compile succeeds, but when I try to run the
> >> > >>tests I get a number of errors:
> >> > >>
> >> > >> Making check in fortran
> >> > >> make[1]: Entering directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/fortran'
> >> > >> make  check-am
> >> > >> make[2]: Entering directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/fortran'
> >> > >> make[2]: Nothing to be done for 'check-am'.
> >> > >> make[2]: Leaving directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/fortran'
> >> > >> make[1]: Leaving directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/fortran'
> >> > >> Making check in nf_test
> >> > >> make[1]: Entering directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/nf_test'
> >> > >> make  nf_test tst_f77_v2 ftst_vars ftst_vars2 ftst_vars3 ftst_vars4
> >> > >>ftst_vars5 ftst_vars6 ftst_types ftst_types2 ftst_types3 ftst_groups
> >> > >>ftst_path ftst_rengrps f90tst_vars tst_types tst_types2
> >>f90tst_vars_vlen
> >> > >>tst_f90_nc4 f90tst_grps f90tst_fill f90tst_fill2 f90tst_vars3
> >> > >>f90tst_vars4 f90tst_vars2 f90tst_path f90tst_rengrps ftst_v2
> >>ftest
> >> > >>tst_f90
> >> > >> make[2]: Entering directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/nf_test'
> >> > >> /sw/bin/gfortran -I../fortran   -I../fortran -g -O2 -c -o
> >> > >>f03lib_f_interfaces.o  f03lib_f_interfaces.f90
> >> > >> DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/include
> >>-I../fortran
> >> > >>  -I../fortran  -c -o test_get.o test_get.F
> >> > >> make[2]: DHAVE_CONFIG_H: Command not found
> >> > >> Makefile:1292: recipe for target 'test_get.o' failed
> >> > >> make[2]: [test_get.o] Error 127 (ignored)
> >> > >> DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/include
> >>-I../fortran
> >> > >>  -I../fortran  -c -o test_put.o test_put.F
> >> > >> make[2]: DHAVE_CONFIG_H: Command not found
> >> > >> Makefile:1292: recipe for target 'test_put.o' failed
> >> > >> make[2]: [test_put.o] Error 127 (ignored)
> >> > >> DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/include
> >>-I../fortran
> >> > >>  -I../fortran  -c -o nf_error.o nf_error.F
> >> > >> make[2]: DHAVE_CONFIG_H: Command not found
> >> > >> Makefile:1292: recipe for target 'nf_error.o' failed
> >> > >> make[2]: [nf_error.o] Error 127 (ignored)
> >> > >> DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/include
> >>-I../fortran
> >> > >>  -I../fortran  -c -o nf_test.o nf_test.F
> >> > >> make[2]: DHAVE_CONFIG_H: Command not found
> >> > >> Makefile:1292: recipe for target 'nf_test.o' failed
> >> > >> make[2]: [nf_test.o] Error 127 (ignored)
> >> > >> DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/include
> >>-I../fortran
> >> > >>  -I../fortran  -c -o test_read.o test_read.F
> >> > >> make[2]: DHAVE_CONFIG_H: Command not found
> >> > >> Makefile:1292: recipe for target 'test_read.o' failed
> >> > >> make[2]: [test_read.o] Error 127 (ignored)
> >> > >> DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/include
> >>-I../fortran
> >> > >>  -I../fortran  -c -o test_write.o test_write.F
> >> > >> make[2]: DHAVE_CONFIG_H: Command not found
> >> > >> Makefile:1292: recipe for target 'test_write.o' failed
> >> > >> make[2]: [test_write.o] Error 127 (ignored)
> >> > >> DHAVE_CONFIG_H -I. -I.. -I../libsrc   -I/usr/local/include
> >>-I../fortran
> >> > >>  -I../fortran  -c -o util.o util.F
> >> > >> make[2]: DHAVE_CONFIG_H: Command not found
> >> > >> Makefile:1292: recipe for target 'util.o' failed
> >> > >> make[2]: [util.o] Error 127 (ignored)
> >> > >> depbase=`echo f03lib.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> >> > >> /sw/bin/gcc-4 -DHAVE_CONFIG_H -I. -I.. -I../libsrc
> >> > >>-I/usr/local/include  -g -O2 -DLONGLONG_IS_LONG -MT f03lib.o -MD
> >>-MP -MF
> >> > >>$depbase.Tpo -c -o f03lib.o f03lib.c &&\
> >> > >> mv -f $depbase.Tpo $depbase.Po
> >> > >> /bin/sh ../libtool  --tag=F77   --mode=link  -I../fortran
> >> > >>-I../fortran   -L/usr/local/lib -o nf_test f03lib_f_interfaces.o
> >> > >>test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o
> >> > >>util.o f03lib.o ../fortran/libnetcdff.la -lnetcdf
> >> > >> Usage: /Users/turekg/netcdf-fortran-4.4.2/libtool [OPTION]...
> >> > >>[MODE-ARG]...
> >> > >> Try 'libtool --help' for more information.
> >> > >> libtool:   error: unrecognised option: '-I../fortran'
> >> > >> Makefile:1251: recipe for target 'nf_test' failed
> >> > >> make[2]: *** [nf_test] Error 1
> >> > >> make[2]: Leaving directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/nf_test'
> >> > >> Makefile:1825: recipe for target 'check-am' failed
> >> > >> make[1]: *** [check-am] Error 2
> >> > >> make[1]: Leaving directory
> >>'/Users/turekg/netcdf-fortran-4.4.2/nf_test'
> >> > >> Makefile:544: recipe for target 'check-recursive' failed
> >> > >> make: *** [check-recursive] Error 1
> >> > >>
> >> > >>
> >> > >>
> >> > >
> >> > >
> >> > >Ticket Details
> >> > >===================
> >> > >Ticket ID: DMW-679093
> >> > >Department: Support netCDF
> >> > >Priority: Normal
> >> > >Status: Closed
> >> > >
> >> >
> >> >
> >> > Dr Gabriella Turek
> >> > Senior Software Engineer
> >> >
> >> > +64-4-386-0819 | 301 Evans Bay Parade, Greta Point, Wellington |
> >>www.niwa.co.nz<http://www.niwa.co.nz>
> >> > [NIWA]<http://www.niwa.co.nz>
> >> > To ensure compliance with legal requirements and to maintain cyber
> >>security standards, NIWA's IT systems are subject to ongoing monitoring,
> >>activity logging and auditing. This monitoring and auditing service may
> >>be provided by third parties. Such third parties can access information
> >>transmitted to, processed by and stored on NIWA's IT systems.
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >> Russ Rew                                         UCAR Unidata Program
> >> address@hidden<mailto:address@hidden>                      
> >> http://www.unidata.ucar.edu
> >>
> >>
> >
> >Russ Rew                                         UCAR Unidata Program
> >address@hidden<mailto:address@hidden>                      
> >http://www.unidata.ucar.edu
> >
> >
> >
> >Ticket Details
> >===================
> >Ticket ID: DMW-679093
> >Department: Support netCDF
> >Priority: Normal
> >Status: Closed
> >
> Dr Gabriella Turek
> Senior Software Engineer
> +64-4-386-0819 | 301 Evans Bay Parade, Greta Point, Wellington | 
> www.niwa.co.nz<http://www.niwa.co.nz>
> [NIWA]<http://www.niwa.co.nz>
> To ensure compliance with legal requirements and to maintain cyber security 
> standards, NIWA's IT systems are subject to ongoing monitoring, activity 
> logging and auditing. This monitoring and auditing service may be provided by 
> third parties. Such third parties can access information transmitted to, 
> processed by and stored on NIWA's IT systems.
> Russ Rew                                         UCAR Unidata Program
> address@hidden<mailto:address@hidden>                      
> http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: DMW-679093
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 
> 
> Dr Gabriella Turek
> Senior Software Engineer
> 
> +64-4-386-0819 | 301 Evans Bay Parade, Greta Point, Wellington | 
> www.niwa.co.nz<http://www.niwa.co.nz>
> [NIWA]<http://www.niwa.co.nz>
> To ensure compliance with legal requirements and to maintain cyber security 
> standards, NIWA's IT systems are subject to ongoing monitoring, activity 
> logging and auditing. This monitoring and auditing service may be provided by 
> third parties. Such third parties can access information transmitted to, 
> processed by and stored on NIWA's IT systems.
> 
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: DMW-679093
Department: Support netCDF
Priority: Normal
Status: Closed