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

961009: install problem: can't find Solaris XDR library in cxx/



Dear Yun He,

> To: address@hidden
> cc: address@hidden
> From: address@hidden (Yun He)
> Subject: netCDF install problem
> Organization: University of Delaware
> Keywords: 199610091657.AA29515

In the above message you wrote:

> I have problem in installing the netCDF.
> The major problem is in "make all", and the error message is:
> Undefined                       first referenced
>  symbol                             in file
> xdr_enum                            ../libsrc/libnetcdf.a(array.o)
> xdr_float                           ../libsrc/libnetcdf.a(cdf.o)
> xdr_int                             ../libsrc/libnetcdf.a(array.o)
> xdr_vector                          ../libsrc/libnetcdf.a(sharray.o)
> xdr_u_long                          ../libsrc/libnetcdf.a(array.o)
> xdr_double                          ../libsrc/libnetcdf.a(cdf.o)
> xdr_long                            ../libsrc/libnetcdf.a(dim.o)
> xdr_opaque                          ../libsrc/libnetcdf.a(array.o)
> ld: fatal: Symbol referencing errors. No output written to nctst
> *** Error code 1
> make: Fatal error: Command failed for target `nctst'
> Current working directory /home1/yunhe/netcdf/netcdf-2.4.3/src/cxx
> *** Error code 1
> make: Fatal error: Command failed for target `cxx/all'
> 
> It looks like xdr problem. But form INSTALL file, it says that 
>  " The "XDR_" macros will be set as appropriate for your system.  If your
>    system has an XDR library, then the "xdr" subdirectory will be ignored.
>    The installation process will, however, build the test routine
>    "xdr/xdrtest" against your XDR library and run it.  This will
>    superficially verify your vendor's XDR implementation.  Systems that we
>    know already have a satisfactory XDR library include Sun (in libc),
>    CRAY/UNICOS, SGI/IRIX (in libsun) and IBM RS6000/AIX. "
> 
> So, what will be my problem?

It looks like we need to modify our installation procedures somehow.  The
configuration script is finding the XDR routines in the default, C
library, and so sets the LD_XDR variable to the empty string.  Apparently,
however, this is the wrong value to have in the C++ makefile `cxx/Makefile'
(possible because the CC compiler doesn''t automatically reference the C
runtime).

The workaroud is to define the LD_XDR variable before running the
`configure' script.  Try the following:

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

    2.  Define the variable LD_XDR in the environment.  Have it
        reference the C runtime library, e.g.

            setenv LD_XDR -lc

        or

            LD_XDR=-lc export LD_XDR

    3.  Re-execute the configure script.

    4.  Re-execute the `make all'.

Please let me know if this helps.

--------
Steve Emmerson   <address@hidden>