[Geotiff] Problem compiling under MinGW/MSYS
Thom DeCarlo
t.r.decarlo at larc.nasa.gov
Wed Jan 25 10:59:18 EST 2006
I have more info on this problem. The word I got from the MinGW/MSYS list is
that -lm is not required in MinGW builds. The math functions are picked up
from the Microsoft libraries. The best way to account for this seems to be
changing the line in configure.in that says:
AC_CHECK_LIB(m,exp,,,)
to be:
AC_SEARCH_LIBS([sqrt],[m])
By doing this and running autoconf (after updating autoconf to version 2.59)
I was able to create a set of Makefiles that did not include any reference
to "-lm".
However, that still didn't fix the linker problems. It seems that there is
something in the makefiles that is forcing the linker to ignore the "normal"
libraries. Now I'm getting piles of "external reference not found" errors.
The things that are not being found are things like sprintf, atoi, atof, and
(most annoyingly) all the math functions, though these are showing up as
referenced from the proj library.
Now, I know the proj library (4.4.9, pulled from CVS last night) compiled
and installed correctly, and the proj utility programs work. So there is
definitely something funky happening within the geotiff makefile.
Does anyone have *any* clue what is going on here?
Thanks,
Thom
--
Thom DeCarlo
---------------------------------
Where are we going and why am I in this handbasket?
> -----Original Message-----
> From: Thom DeCarlo
> Sent: Friday, January 20, 2006 11:32 AM
> To: geotiff at lists.maptools.org
> Subject: [Geotiff] Problem compiling under MinGW/MSYS
>
> I updated my geotiff source from CVS last night and tried to do a
> ./configure and make. The make failed, complaining that it could not find
> "-lm".
>
> The configure ran successfully with these options:
> ./configure --with-jpeg=/usr/local --with-proj=/usr/local
> --with-libtiff=/usr/local --with-zip=/usr/local
> and the config.log says that exp was successfully found in -lm.
>
> The only libm.a that I found in my MinGW/MSYS environment is in /mingw/lib
> and is only 485 bytes in size. When I added "-L/mingw/lib" to the Makefile
> LIBS variable the make spewed many errors about not finding a variety of
> math functions needed by the proj library.
>
> The proj library also needed the math library and compiled successfully.
>
> Can anyone tell me why libgeotiff fails to link with this library? Is
> there
> something wrong with my MinGW installation?
>
> TIA,
> Thom
> --
> Thom DeCarlo
> ---------------------------------
> /~\ The ASCII
> \ / Ribbon Campaign
> X Against HTML
> / \ Email!
>
>
More information about the Geotiff
mailing list