Re: 20040308:Building Decoders-3.0.2 on cygwin

NOTE: The decoders mailing list is no longer active. The list archives are made available for historical reasons.

Richard,

Thanks for the complete report, made it much easier to find the problem.
It seems that your netcdf library has a problem because that's where the
ncopts variable is defined. You can look at the variables in the
library using a utility such as nm or ar.

% nm libnetcdf.a | m

...
...
[23]    |       356|      72|FUNC |GLOB |0    |2      |ncopen
[10]    |         4|       4|OBJT |GLOB |0    |3      |ncopts

Also in the log it stated other variables were missing from the
libnetcdf.a   A common way to debug these types of problems is to compile
with the -E option and redirect into a .I file. ie

% cc -E -g -I/upc/netcdf/include -I/upc/udunits/include nc.c > nc.I

extern  int ncopts;

I know the above message is terse, but it gave me a clue to look at the
libraries.  Hope this helps.

Robb...




On Mon, 8 Mar 2004, Unidata Support wrote:

# This file is for customizing the configuation process performed by
# `./configuration'.  This file consists of sh(1) variable-definition lines.
# The value given to those variable by this file will override their default
# values.
#
# You can also customize the configuration process via the environment
# variables seen by ./configure.  For example:
#
#     In csh(1):
#         % setenv CC acc
#         & setenv CFLAGS -g
#         % ./configure
#
#     In sh(1):
#         $ CC=acc CFLAGS=-g ./configure
#
# Variables in this file override the environmental ones.
#
#############################################################################
#
# netCDF header file and library references:
# CPP_NETCDF=/usr/local/netcdf/include
# LD_NETCDF='-L/usr/local/netcdf/lib -lnetcdf'
#
# udunits header file and library references:
# CPP_UDUNITS=-I/usr/local/udunits/include
# LD_UDUNITS='-L/usr/local/udunits/lib -ludunits'
#
# On Linux and BSD systems:
#
# Type of C compiler:
# CC=/usr/bin/gcc
#
# Installation prefix:
# prefix=/usr/local/unidata
#
# Here's a url with additional compiling information:
# 
http://www.unidata.ucar.edu/projects/coohl/mhonarc/MailArchives/decoders/msg00599.html

CPP_NETCDF='-I/usr/local/include'
LD_NETCDF='-L/usr/local/lib -lnetcdf'
CPP_UDUNITS='-I/usr/local/include'
LD_UDUNITS='-L/usr/local/lib -ludunits -ludport'

--------------DD7F721B61B3F1D08147368D
Content-Type: text/plain; charset=us-ascii;
 name="gcc.version"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gcc.version"

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld 
--with-gnu-as --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc 
--libdir=/usr/lib --libexecdir=/usr/sbin --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-languages=c,ada,c++,f77,pascal,java,objc 
--enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls 
--without-included-gettext --enable-interpreter --enable-sjlj-exceptions 
--disable-version-specific-runtime-libs --enable-shared 
--disable-win32-registry --enable-java-gc=boehm --disable-hash-synchronization 
--verbose --target=i686-pc-cygwin --host=i686-pc-cygwin --build=i686-pc-cygwin
Thread model: posix
gcc version 3.3.1 (cygming special)

--------------DD7F721B61B3F1D08147368D
Content-Type: text/plain; charset=us-ascii;
 name="configure.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="configure.log"

creating cache ./config.cache
checking for catman... no
checking for makewhatis... no
checking for /usr/lib/makewhatis... no
checking for manual-page index command...
checking the installation prefix... /usr/local/src/decoders-3.0.2
checking the installation exec-prefix... /usr/local/src/decoders-3.0.2
checking for c89... no
checking for cc... cc
checking how to run the C preprocessor... cc -E
checking the C preprocessor... works
checking for ranlib... ranlib
checking type of operating system... cygwin_nt-5.1
checking for dependency generation mechanism... cc -M
checking for tbl... tbl
checking for neqn... neqn
checking for tar flags... -chof
checking for package version... 3.0
checking for netCDF header-file... -I/usr/local/include
checking for netCDF library... -L/usr/local/lib -lnetcdf
checking for udunits header-file... -I/usr/local/include
checking for udunits library... -L/usr/local/lib -ludunits -ludport -ludport
checking for BSD sockets library...
checking for socket(0,0,0) in default library(s)... yes
checking for RPC library...
checking for clnttcp_create() in default library(s)... no
checking for clnttcp_create() in -lsun... checking for clnttcp_create() in 
-lnsl... checking for clnttcp_create() in -lrpc... yes
checking for BSD sockets library...
checking ulog defines...
updating cache ./config.cache
creating ./config.status
creating Makefile
creating gribtonc/Makefile
creating gribtonc/cdl/Makefile
creating ascii/Makefile
creating metar/Makefile
creating syn/Makefile
creating buoy/Makefile
creating upperair/Makefile
creating ldmConnect/Makefile
creating port/master.mk
creating port/Makefile
expanding `include's in file `Makefile'
expanding `include's in file `gribtonc/Makefile'
expanding `include's in file `gribtonc/cdl/Makefile'
expanding `include's in file `ascii/Makefile'
expanding `include's in file `metar/Makefile'
expanding `include's in file `syn/Makefile'
expanding `include's in file `buoy/Makefile'
expanding `include's in file `upperair/Makefile'
expanding `include's in file `ldmConnect/Makefile'
expanding `include's in file `port/master.mk'
expanding `include's in file `port/Makefile'
rm: cannot unlink `conftest': No such file or directory

--------------DD7F721B61B3F1D08147368D
Content-Type: text/plain; charset=us-ascii;
 name="make.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="make.log"


making `all' in directory /usr/local/src/decoders-3.0.2/src/gribtonc

make[1]: Entering directory `/usr/local/src/decoders-3.0.2/src/gribtonc'
cc -c -g -I/usr/local/include -I/usr/local/include  emalloc.c
cc -c -g -I/usr/local/include -I/usr/local/include  gbds.c
cc -c -g -I/usr/local/include -I/usr/local/include  gbytem.c
cc -c -g -I/usr/local/include -I/usr/local/include  gdes.c
cc -c -g -I/usr/local/include -I/usr/local/include  get_prod.c
cc -c -g -I/usr/local/include -I/usr/local/include  grib1.c
cc -c -g -I/usr/local/include -I/usr/local/include  gribtypes.c
cc -c -g -I/usr/local/include -I/usr/local/include  inetutil.c
inetutil.c: In function `hostbyaddr':
inetutil.c:160: warning: assignment discards qualifiers from pointer target type
inetutil.c: In function `hostent_new':
inetutil.c:423: warning: passing arg 1 of `strcpy' discards qualifiers from 
pointer target type
cc -c -g -I/usr/local/include -I/usr/local/include  levels.c
cc -c -g -I/usr/local/include -I/usr/local/include  params.c
cc -c -g -I/usr/local/include -I/usr/local/include  product_data.c
cc -c -g -I/usr/local/include -I/usr/local/include  quasi.c
cc -c -g -I/usr/local/include -I/usr/local/include  timeunits.c
cc -c -g -I/usr/local/include -I/usr/local/include  user_param.c
cc -c -g  -I/usr/local/include -I/usr/local/include  ulog.c
cc -c -g -I/usr/local/include -I/usr/local/include  centers.c
cc -c -g -I/usr/local/include -I/usr/local/include  gribdump.c
cc -c -g -I/usr/local/include -I/usr/local/include  models.c
cc -g emalloc.o gbds.o gbytem.o gdes.o get_prod.o grib1.o gribtypes.o 
inetutil.o levels.o params.o product_data.o quasi.o timeunits.o user_param.o 
ulog.o centers.o gribdump.o models.o -lrpc -lm  -o gribdump
Info: resolving _h_errno by linking to __imp__h_errno (auto-import)
Info: resolving _opterr by linking to __imp__opterr (auto-import)
Info: resolving _optarg by linking to __imp__optarg (auto-import)
Info: resolving _optind by linking to __imp__optind (auto-import)
cc -c -g -I/usr/local/include -I/usr/local/include  gribtonc.c
cc -c -g -I/usr/local/include -I/usr/local/include  mkdirs_open.c
cc -c -g -I/usr/local/include -I/usr/local/include  nc.c
cc -c -g -I/usr/local/include -I/usr/local/include  ncfloat.c
cc -c -g -I/usr/local/include -I/usr/local/include  nuwg.c
cc -c -g -I/usr/local/include -I/usr/local/include  recs.c
cc -c -g -I/usr/local/include -I/usr/local/include  units.c
cc -g emalloc.o gbds.o gbytem.o gdes.o get_prod.o grib1.o gribtypes.o 
inetutil.o levels.o params.o product_data.o quasi.o timeunits.o user_param.o 
ulog.o gribtonc.o mkdirs_open.o nc.o ncfloat.o nuwg.o recs.o units.o \
      -L/usr/local/lib -lnetcdf -lrpc -L/usr/local/lib -ludunits -ludport 
-ludport -lm  -o gribtonc
nc.o(.text+0x655): In function `cdl_netcdf':
/usr/local/src/decoders-3.0.2/src/gribtonc/nc.c:280: undefined reference to 
`_ncopts'
nc.o(.text+0x1b97): In function `parmname':
/usr/local/src/decoders-3.0.2/src/gribtonc/nc.c:783: undefined reference to 
`_ncopts'
nc.o(.text+0x1c89):/usr/local/src/decoders-3.0.2/src/gribtonc/nc.c:810: 
undefined reference to `_ncopts'
nc.o(.text+0x1cd1):/usr/local/src/decoders-3.0.2/src/gribtonc/nc.c:816: 
undefined reference to `_ncopts'
ncfloat.o(.text+0x11e8): In function `float_nc':
/usr/local/src/decoders-3.0.2/src/gribtonc/ncfloat.c:370: undefined reference 
to `_ncerr'
Info: resolving _h_errno by linking to __imp__h_errno (auto-import)
Info: resolving _opterr by linking to __imp__opterr (auto-import)
Info: resolving _optarg by linking to __imp__optarg (auto-import)
Info: resolving _optind by linking to __imp__optind (auto-import)
collect2: ld returned 1 exit status
make[1]: *** [gribtonc] Error 1
make[1]: Leaving directory `/usr/local/src/decoders-3.0.2/src/gribtonc'
make: *** [gribtonc/all] Error 1

--------------DD7F721B61B3F1D08147368D--


--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically 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.

------- End of Forwarded Message


==============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx                   WWW: http://www.unidata.ucar.edu/
==============================================================================


  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the decoders archives: