[GRASS5] GRASS-header-file locations changed?

Frank Warmerdam warmerdam at pobox.com
Tue Feb 14 14:23:43 EST 2006


Glynn Clements wrote:
> I don't think that a simple "grass-config --libs" will suffice. GRASS
> has several identifiable subsystems, some of which can themselves
> require substantial numbers of additional libraries.
 >
> What should "grass-config --libs" output? Just libgis and its
> dependencies (which won't suffice if you need e.g. the vector
> functionality), or all of the libraries?

Glynn,

Well, I'm in favor of these logical subsystems being isolated
and appropriate options created for each.  The current situation
is that the gdal-grass driver configure script has a hardcoded set
of libraries which is almost certain to be wrong each time GRASS
upgrades.


> For the latter option, look at the the dependency list for the OGSF
> library if --with-ffmpeg was used:
> 
> $ ldd /opt/grass-6.1.cvs/lib/libgrass_ogsf.so
> 	libgrass_gis.so => /opt/grass-6.1.cvs/lib/libgrass_gis.so (0x40084000)
> 	libgrass_datetime.so => /opt/grass-6.1.cvs/lib/libgrass_datetime.so (0x40134000)
> 	libz.so.1 => /lib/libz.so.1 (0x40150000)

...

> You don't want to be linking all of those in if you only need libgis.

Most of those are already pulled in as dependencies of other libraries,
and would not need to be listed on a link line.  Currently my configure
has:

     G_RASTLIBS="-lgrass_I"
     G_VECTLIBS="-lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree 
-lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
     LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj 
-lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"

As you can imagine, this is pretty fragile.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the grass-dev mailing list