[GRASSLIST:5431] Mac libraries

Hello everybody,

Maybe can I help with the last problems refered to Mac libraries. However
first of all should I tell you that I'm using the grass5pre4 sources and I
haven't fink installed on my computer.

The problems wich arise during the configure process usually can be resolved
this way:

./configure --with-tcltk-libs=/the_path_until_the_libraries

in my case

./configure --with-tcltk-libs=/usr/local/lib because I had put them there.

I don't use tcltk8.3 or tcltk8.4 because the 8.0 which can be downloaded
from grass servers still works without problems. Moreover, I have deleted
from my Mac the 8.4 which I had installed to avoid problems with versions.
My advice is not to have many versions of tcltk arround.

And some days ago I suffered a similar problem with my tiff library, which I
had put in /usr/local/lib. The configure didn't find it although I put
--with-tiff-libs=/usr/local/lib. Finally I did
    cd /usr/local/lib
    ranlib libtiff.a
    ./configure --with-tiff-libs=/usr/local/lib

After that I had no more problems and the configure script reached to end
and grass compiles.

I suspect that grass doesn't like libraries.dylib and prefers libraries.a
(my tiff and tcltk libraries are .a). I will do a little research on this...

Finally, if you want to get or recompile the tiff or tcltk libraries you can
find them throw the grass page
(http://grass.itc.it/grass5/source/REQUIREMENTS.html). As Glynn Clements has
written, grass is a program which runs throw X11 and it doesn't like the tcl
or the openGL libraries provided by Apple in /system/library, which are
written for Quartz. You must say to configure script to use the libraries
you have installed elsewhere (Apple's X11 implementation has "good" openGL
libraries in /usr/x11r6/lib)

Hope this helps,

Quim Soler

Quim Soler i Subils wrote:

I suspect that grass doesn't like libraries.dylib and prefers libraries.a
(my tiff and tcltk libraries are .a). I will do a little research on this...

The GRASS build process doesn't care about the type of library. It
uses the linker's "-l" switch, which references libraries by the
library name (e.g. "-ltiff" for the "tiff" library); the rest is up to
the linker.

However, the Mac's linker has exactly the opposite problem: it prefers
dynamic libraries (.dylib) over static libraries (.a), regardless of
the library search path (the linker's -L switches). E.g. -ledit will
find the Mac's libedit.dylib rather than GRASS' own libedit.a,
regardless of which -L switches are used.

For this reason, GRASS 5.0.0 won't build on MacOS X without some
changes (renaming GRASS' libedit to libgedit). This is fixed in 5.0.1;
however, it remains as a potential source of problems in the future.
If you install a .dylib which has the same name as one of GRASS' own
libraries, the .dylib will be used instead.

--
Glynn Clements <glynn.clements@virgin.net>