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

20020627: netCDF 3.5.0 build problems on FreeBSD



John,

> To: address@hidden
> From: "John C. Nordlie" <address@hidden>
> Subject: NetCDF and FreeBSD
> Organization: University of North Dakota
> Keywords: 200206271538.g5RFc8u20598 netCDF FreeBSD

The above message contained the following:

> I'm having some problems trying to get NetCDF to build on our
> new FreeBSD LDM ingestor.  Trying the native build, the configure
> script runs fine, but the make dies with:
> 
> cfortran.h:155: #error "cfortran.h:  Can't find your environment among:
> <list of all supported OS/archs deleted for readibility>
> 
> So, I figured I'd cheat and install a Linux binary version and run
> it with linux compatibility mode.  This allowed me to compile and run
> other packages pretty well, but not completely.  I'm getting some
> error messages in my logs from some decoders (i.e. ua2nc):
> 
> > Can't load
> '/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/NetCDF/NetCDF.so'
> for module NetCDF:
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/NetCDF/NetCDF.so: 
> Undefined
> symbol "_IO_stderr_" at
> /usr/libdata/perl/5.00503/DynaLoader.pm line 169.
> > 
> >  at decoders/ua2nc line 14
> 
> 
> I downloaded the latest decoders and tried to build them.  I got more 
> errors in the make phase (here's a chunk of the output):
> 
> /usr/local/netcdf/lib/libnetcdf.a(v2i.o): In function `nc_advise':
> v2i.o(.text+0x30): undefined reference to `_IO_stderr_'
> v2i.o(.text+0x41): undefined reference to `_IO_stderr_'
> v2i.o(.text+0x5e): undefined reference to `_IO_stderr_'
> v2i.o(.text+0x6b): undefined reference to `_IO_stderr_'
> v2i.o(.text+0x77): undefined reference to `_IO_stderr_'
> /usr/local/netcdf/lib/libnetcdf.a(ncio.o): In function `blksize':
> ncio.o(.text+0x2c): undefined reference to `__fxstat'
> /usr/local/netcdf/lib/libnetcdf.a(ncio.o): In function `fgrow':
> ncio.o(.text+0x62): undefined reference to `__fxstat'

It appears from the above that the compiler that was used to create the
binary netCDF distribution defines the global symbol "_IO_stderr_" and
that this symbol is not defined by your runtime environment.

I suggest that you try rebuilding and reinstalling the netCDF package
from source. This should ensure compatibility. Please try the following:

    1.  Go to the top-level netCDF source directory.

    2.  Perform steps 3 through 5 described near the end of the file
    INSTALL.html.

    3.  Ensure that the environment variable CPPFLAGS contains the
    string "-Df2cFortran" (I'm assuming that you use the GNU C
    compiler).  For example:

        export CPPFLAGS="-Df2cFortran"

    or

        setenv CPPFLAGS "-Df2cFortran"

    This is the step you were missing.

    4.  Perform steps 6 through 9 described near the end of the file
    INSTALL.html.

Please let me know if this helps.

> I was able to build and install the NetCDF-perl package.  This is all
> on a Pentium 4 box running FreeBSD 4.5.
> 
> Any ideas?
> 
> =========================================================================
> ==)----------                   |                           ----------(==
> John Nordlie   N0RNB            |     Regional Weather Information Center 
> address@hidden            |              University of North Dakota 
> 701-777-6112 / 701-777-3888 fax | PO Box 9007, Grand Forks, ND 58202-9007
> http://blizzard.rwic.und.edu/~nordlie/
> ==)----------      #include <std.disclaimer.h>              ----------(==
> =========================================================================

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