[GRASS-dev] compiling GRASS fails at configure, unable to locate GDAL library

Paulo van Breugel p.vanbreugel at gmail.com
Thu Oct 29 03:29:30 PDT 2015


On Thu, Oct 29, 2015 at 10:52 AM, Markus Neteler <neteler at osgeo.org> wrote:

> On Thu, Oct 29, 2015 at 10:49 AM, Paulo van Breugel
> <p.vanbreugel at gmail.com> wrote:
> > Hi, I am trying to make a fresh install of GRASS master, something I do
> > routinely about every week (on Ubuntu 14.04).
> ...
> > --with-pthread
>
> (not sure if you want that, see other discussions here)
>

Yes, because of that discussion I had added that to see if it would give
any problem. None that I have noticed by the way. I will probably remove it
though.



>
> ...
> >> checking for gdal-config... /usr/local/bin/gdal-config
> >> configure: error: *** Unable to locate GDAL library.
>
> As usual, check config.log for the problem.
>

I do not really understand the log info, but I guess the below is the
relevant part?

configure:6098:9: warning: ignoring return value of 'GDALOpen', declared
with attribute warn_unused_result [-Wunused-result]
 GDALOpen("foo", GA_ReadOnly);
         ^
/usr/bin/ld: warning: libgrass_vector.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_dig2.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_dgl.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_rtree.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_linkm.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_dbmiclient.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_dbmibase.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_raster.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_imagery.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_gproj.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_gis.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_datetime.so, needed by
/usr/local/gdal/lib/libgdal.so, not found (try using -rpath or -rpath-link)
/usr/local/gdal/lib/libgdal.so: undefined reference to `Rast_map_type'
/usr/local/gdal/lib/libgdal.so: undefined reference to
`Rast_get_fp_color_rule'
...
...
/usr/local/gdal/lib/libgdal.so: undefined reference to
`Vect_new_line_struct'
collect2: error: ld returned 1 exit status
configure: failed program was:
#line 6095 "configure"
#include "confdefs.h"
#include <gdal.h>
int main() {
GDALOpen("foo", GA_ReadOnly);
; return 0; }
configure:6118: gcc -o conftest -g -O2  -I/usr/local/gdal/include
-Wl,--export-dynamic  -L/lib64 conftest.c  -L/usr/local/gdal/lib -lgdal
-lproj -lfreexl -lm -L/usr/lib -lgeos_c -lodbc -lodbcinst -lkmldom
-lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser -lexpat
-ljasper -lnetcdf -lhdf5 -lmfhdf -ldf -logdi
-L/usr/local/grass7/grass-7.1.svn/lib -lgrass_vector -lgrass_dig2
-lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase
-lgrass_raster -lgrass_imagery -lgrass_gproj -lgrass_gmath -lgrass_gis
-lgrass_datetime -L/usr/lib -lpq -lz -lpthread -lm -lrt -ldl -lspatialite
-lsqlite3 -lpcre -L/usr/lib/x86_64-linux-gnu -lcurl -lxml2 1>&5
configure: In function 'main':
configure:6114:9: warning: ignoring return value of 'GDALOpen', declared
with attribute warn_unused_result [-Wunused-result]
 GDALOpen("foo", GA_ReadOnly);
         ^
/usr/bin/ld: cannot find -lgrass_vector
/usr/bin/ld: cannot find -lgrass_dig2
/usr/bin/ld: cannot find -lgrass_dgl
/usr/bin/ld: cannot find -lgrass_rtree
/usr/bin/ld: cannot find -lgrass_linkm
/usr/bin/ld: cannot find -lgrass_dbmiclient
/usr/bin/ld: cannot find -lgrass_dbmibase
/usr/bin/ld: cannot find -lgrass_raster
/usr/bin/ld: cannot find -lgrass_imagery
/usr/bin/ld: cannot find -lgrass_gproj
/usr/bin/ld: cannot find -lgrass_gmath
/usr/bin/ld: cannot find -lgrass_gis
/usr/bin/ld: cannot find -lgrass_datetime
collect2: error: ld returned 1 exit status
configure: failed program was:
#line 6111 "configure"
#include "confdefs.h"
#include <gdal.h>
int main() {
GDALOpen("foo", GA_ReadOnly);
; return 0; }







>
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20151029/8660563b/attachment.html>


More information about the grass-dev mailing list