[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20040526: building UDUNITS on Linux using gcc: missing pow()
- Subject: 20040526: building UDUNITS on Linux using gcc: missing pow()
- Date: Wed, 26 May 2004 09:16:40 -0600
Marcelo,
> From: Marcelo Barreiro <address@hidden>
> To: address@hidden
> Date: Wed, 26 May 2004 03:58:29 GMT (Tue 21:58 MDT)
> Subject: UDUNITS error while make
> Keywords: 200405260358.i4Q3wWtK004490
The above message contained the following:
> I am trying to install Unudits 1.11.7 in linux 2.4.22 with Mandrake 9.2.
>
> My variables settings are:
>
> export CC=/usr/bin/gcc-3.3.1
> export FC=/usr/bin/g77-3.3.1
> export FFLAGS='-Wno-globals'
> export CXX=/usr/bin/g++-3.3.1
> export CPPFLAGS='-DNDEBUG -Df2cFortran'
> export CFLAGS='-O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'
> export CXXFLAGS='-LANG:std -O'
> export PERL=/usr/bin/perl5.8.1
>
> During make I got the error message:
>
> /usr/bin/gcc-3.3.1 -o udunits -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> udunits.o -L/home/marcelo/bi
> n/udunits-1.11.7/src/lib -ludunits
> -L/home/marcelo/bin/udunits-1.11.7/src/port/misc -ludport
> /home/marcelo/bin/udunits-1.11.7/src/lib/libudunits.a(utlib.o)(.text+0xc7d):
> In function `utRaise':
> : undefined reference to `pow'
> /home/marcelo/bin/udunits-1.11.7/src/lib/libudunits.a(utlib.o)(.text+0x1697):
> In function `utPrint':
> : undefined reference to `log10'
> collect2: ld returned 1 exit status
> make[2]: *** [udunits] Error 1
> make[2]: Leaving directory `/home/marcelo/bin/udunits-1.11.7/src/udunits'
> make[1]: *** [program] Error 2
> make[1]: Leaving directory `/home/marcelo/bin/udunits-1.11.7/src/udunits'
> make: *** [udunits/all] Error 1
>
>
> I found in the archives other people with the same error, so I
> followed what you suggested previously. I did:
...
> export LIBS='-L/usr/lib/libm.a -lm'
>
> and, after 'make distclean', I did ./configure and make
> again. However, I got the same error as before. I am attaching the
> files: config.log, configure.log, make.log, test.log and install.log.
> Any idea of what is happening?
There's a special environment variable (LD_MATH) to tell the build
procedure where the math library is on systems that need such help.
Please try the following:
1. Go to the top-level source-directory.
2. Perform steps 3 through 5 described near the end of the file
INSTALL.
3. Set the environment variable LD_MATH to reference the math
library:
export LD_MATH='-L/usr/lib/libm.a -lm'
4. Perform steps 6 through 9 described near the end of the file
INSTALL.
Please let me know if this helps.
> I really appreciate you help.
> Best regards,
>
> Marcelo
Regards,
Steve Emmerson