[GRASS-dev] [grass-code I][293] configure shouldn't use gdal-config --dep-libs for GDAL linking (GDALLIBS)

grass-codei at wald.intevation.org grass-codei at wald.intevation.org
Wed Feb 14 13:36:39 EST 2007


code I item #293, was opened at 2007-02-14 12:36
Status: Open
Priority: 3
Submitted By: William Kyngesburye (kyngchaos)
Assigned to: Nobody (None)
Summary: configure shouldn't use gdal-config --dep-libs for GDAL linking (GDALLIBS) 
Issue type: None
Issue status: None
GRASS version: CVS HEAD
GRASS component: build
Operating system: MacOS X
Operating system version: 10.4
GRASS CVS checkout date, if applies (YYMMDD): 070212


Initial Comment:
configure has:

    GDAL_LIBS=`"$GDAL_CONFIG" --libs`
    GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
...
  GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"

If configured properly, gdal-config --libs should have all that's needed for linking GDAL.  From the gdal-config docs:

--libs: The libraries and link directives required to use GDAL.

the --dep-libs is not even mentioned there.  As far as I can see, it contains the libs used to build the GDAL library, and may contain static libs.  In a binary distribution of GDAL, the user might not have those static libs and then get link errors when building GRASS.  So far I've been dealing with the static dep problem by editing gdal-config and removing static libs, but this is an annoying hack.

Depending on the platform, either the GDAL dependencies have embedded paths (ie OSX), or LD_LIBRARY_PATH is used to find needed shared libraries (ie Linux).

I'm not sure if a static libgdal is possible, or practical (because of the support data files needed), but linking a static libgdal would need the deplibs to be specified.

----------------------------------------------------------------------

You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=293&group_id=21




More information about the grass-dev mailing list