[Gdal-dev] GNU Compile of GDAL on Solaris

Gregory Yetman gyetman at ciesin.columbia.edu
Wed Apr 19 11:18:11 EDT 2006


Hi,

I've compiled and used GDAL on cygwin; now I need to set it up on our 
Sun box so we can call it from some scripts. I am novice at GNU
compiling, my apologies in advance if this is a simple question but my 
searches of the list archives haven't turned up anything on the compile
error I've encountered.

Running configure seems to work fine, but when I run gmake I get a 
missing library (math.h):

GNUmakefile:44: warning: overriding commands for target `libgdal.la'
GNUmakefile:40: warning: ignoring old commands for target `libgdal.la'
(cd port; gmake)
gmake[1]: Entering directory `/ufs/local1/data/gregy/gdal/gdal-1.3.1/port'
/bin/sh ../libtool --mode=compile g++ -Wall  -O2   -I../port  -c -o
cpl_conv.o cpl_conv.cpp
  g++ -Wall -O2 -I../port -c cpl_conv.cpp  -fPIC -DPIC -o .libs/cpl_conv.o
In file included from cpl_port.h:181,
                  from cpl_conv.h:124,
                  from cpl_conv.cpp:172:
/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/include/math.h:5:
math.h: No such file or directory
gmake[1]: *** [cpl_conv.o] Error 1
gmake[1]: Leaving directory `/ufs/local1/data/gregy/gdal/gdal-1.3.1/port'
gmake: *** [port-target] Error 2

I did some digging, apparently the math.h library has been replaced with 
a .so file on Solaris. There is a math.h file in:

/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/include/

but it is a wrapper. The contents are:

#ifndef _MATH_H_WRAPPER
#ifdef __cplusplus
# define exception __math_exception
#endif
#include_next <math.h>
#ifdef __cplusplus
# undef exception
#endif
#define _MATH_H_WRAPPER
#endif /* _MATH_H_WRAPPER */

but it's obviously not working.

Any suggestions welcome!

Thanks,

Greg

-- 
--------------------------------------------------------------------
Gregory Yetman
Center for International Earth Science Information Network (CIESIN)
Columbia University
URL: http://www.ciesin.columbia.edu/
e-mail: gyetman (at) ciesin.columbia.edu
--------------------------------------------------------------------





More information about the Gdal-dev mailing list