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

Re: 19980107: unresolved reference: __mth_i_dpowd



Robert,

[It turns out that I'm the one to handle this problem as well.]

> Keywords: 199901071530.IAA21667
> Date: Thu, 07 Jan 1999 10:29:48 -0500
> From: Robert Boucher <address@hidden>
> Organization: Litton-TASC
> To: Steve Emmerson <address@hidden>
> Subject: Re: 19990105: building on Linux 5.1 using pgcc

In the above message, you wrote:

> I am now on the last step, installing Gribtonc.  I got an error when I
> ran the make command in the gribtonc directory.  I have copied below the
> output from configure.log and make.log.
...
> Make.log
...
> 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 ulog.o
> gribtonc.o mkdirs_open.o nc.o ncfloat.o nuwg.o recs.o units.o \
>       -L/data1/netcdf-3.4/lib -lnetcdf  -L/data1/udunits-1.11.7/lib
> - - -ludunits -ludport -lm  -o gribtonc
> /data1/udunits-1.11.7/lib/libudunits.a(utlib.o): In function `utRaise':
> utlib.o(.text+0x1286): undefined reference to `__mth_i_dpowd'
> make: *** [gribtonc] Error 1

I suspect that the UDUNITS library that's being referenced above was
built using the "pgcc" compiler rather than the "cc" compiler and,
consequently, it references the function "__mth_i_dpowd" which the "cc"
compiler doesn't know anything about.

In general, it's a good idea to pick one development environment
(preprocessor, compiler, linker) and stick with it.  Mixing and matching
causes problems just like this.

I see two possible solutions:

    1.  Rebuild and reinstall the UDUNITS package from scratch (i.e. do
        a "make distclean" first) but this time using the "cc" compiler.

    2.  Try referencing the "pgcc" math library in building "gribtonc".
        This can be done by setting the LIBS environment variable before
        executing the configure script.  You should probably first try
        manually executing the above link-line with the appropriate
        reference.

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