[GRASSLIST:5433] Re: Mac libraries

Glynn Clements glynn.clements at virgin.net
Sat Feb 1 13:36:49 EST 2003


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 at virgin.net>




More information about the grass-user mailing list