[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #GDO-757215]: netcdf-fortran-4.2 make check install fail
- Subject: [netCDF #GDO-757215]: netcdf-fortran-4.2 make check install fail
- Date: Thu, 14 Jun 2012 10:45:14 -0600
Julia,
> Thanks for your quick supply!
> I tried your suggestion, but still the same error occurs, when running "make
> check install" afterwards. (config.log attached again)
> I also did "make clean" before configuring again.
> Any further ideas?
I see from the config.log you sent this output:
> configure:18686: checking for library containing nc_open
> configure:18717: gcc -o conftest.exe -g -O2 -I/usr/local/include -DgFortran
> -L/usr/local/lib conftest.c >&5
> /tmp/cc19sWpU.o: In function `main':
> /cygdrive/c/build/netcdf-fortran-4.2/conftest.c:45: undefined reference to
> `_nc_open'
The reason it's not linking with the installed netCDF library in /usr/local/lib
is the lack of "-lnetcdf" specifying to search libnetcdf for unsatisfied
externals.
One way to handle this is to set the environment variable
LD_LIBRARY_PATH=/usr/local/lib
before you run configure and make check.
Another way that may work is to include it with LDFLAGS, as in
LDFLAGS="-L/usr/local/lib -lnetcdf"
but I don't think you need that if you set LD_LIBRARY_PATH.
--Russ
> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden]
> Sent: quinta-feira, 14 de Junho de 2012 17:10
> To: address@hidden
> Cc: address@hidden
> Subject: [netCDF #GDO-757215]: netcdf-fortran-4.2 make check install fail
>
> Hi Julia,
>
> > I am working on Windows 7 and successfully installed netcdf-4.2 under
> > cygwin. Now I try to install netcdf-fortran-4.2. Configure went
> > alright, but when doing make check install I get following error:
> >
> >
> >
> > Makefile:732: recipe for target `nf_test.exe' failed
> >
> > make[2]: *** [nf_test.exe] Error 1
> >
> > make[2]: Leaving directory `/cygdrive/c/build/netcdf-fortran-4.2/nf_test'
> >
> > Makefile:989: recipe for target `check-am' failed
> >
> > make[1]: *** [check-am] Error 2
> >
> > make[1]: Leaving directory `/cygdrive/c/build/netcdf-fortran-4.2/nf_test'
> >
> > Makefile:422: recipe for target `check-recursive' failed
> >
> > make: *** [check-recursive] Error 1
> >
> >
> >
> > I configured with:
> >
> >
> >
> > CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
> > LD_LIBRARY_PATH=/usr/local/lib ./configure
> >
> >
> >
> > Also I saw the thread [netcdf # LPS-130131] and configured with the
> > suggested changes, but that didn't work either.
> >
> > I attach the config.log file for configuring with
> > CPPFLAGS=-I/usr/local/include,-DgFortran LDFLAGS=-L/usr/local/lib
> > LD_LIBRARY_PATH=/usr/local/lib ./configure
>
> I think the problem with the above is the comma delimiter in CPPFLAGS. On
> Unix systems, you have to use a blank delimiter and quote the combination, as
> in:
>
> CPPFLAGS="-I/usr/local/include -DgFortran" LDFLAGS=-L/usr/local/lib
> LD_LIBRARY_PATH=/usr/local/lib ./configure
>
> I assume the same is needed when using cygwin.
>
> --Russ
>
> Russ Rew UCAR Unidata Program
> address@hidden http://www.unidata.ucar.edu
>
>
>
> Ticket Details
> ===================
> Ticket ID: GDO-757215
> Department: Support netCDF
> Priority: Normal
> Status: Closed
>
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: GDO-757215
Department: Support netCDF
Priority: Normal
Status: Closed