1

I need a few customizations over grass and would use qgis gui for accessing grass. I am building qgis with grass enabled (WITH_GRASS=TRUE). While I am doing that I get the following.

Linking C executable ../../../output/lib/qgis/grass/modules/qgis.g.info
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRGetLinearUnits@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `VSIFree@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRExportToWkt@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRGetAttrValue@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `SetCSVFilenameHook@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRExportToProj4@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRIsProjected@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRNewSpatialReference@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRExportToPrettyWkt@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRMorphFromESRI@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRIsGeographic@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRMorphToESRI@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRImportFromProj4@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRGetUTMZone@GDAL_1.8'
/usr/lib/grass64/lib/libgrass_gproj.so: undefined reference to `OSRDestroySpatialReference@GDAL_1.8'
collect2: ld returned 1 exit status

***
GDAL 1.9.2, released 2012/10/08
GRASS version: GRASS GIS 6.4.2
Python: 2.7.3
Platform: Ubuntu 12.04.1 LTS / x86_64
***
The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
QGIS version: 1.8.0 QGIS (10000)
Found GRASS: /usr/lib/grass64 (6.4.2)
Touch support disabled
Looking for openpty
Looking for openpty - not found
Looking for openpty
Looking for openpty - found
Found Proj: /usr/local/lib/libproj.so
Found GEOS: /usr/lib/libgeos_c.so
Found GDAL: /usr/local/lib/libgdal.so (1.9.2)
Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so
Found Spatialindex: /usr/lib/libspatialindex.so
Found Qwt: /usr/lib/libqwt-qt4.so (5.2.2)
Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so
Found PostgreSQL: /usr/lib/libpq.so
Looking for Q_WS_X11
Looking for Q_WS_X11 - found
Looking for Q_WS_WIN
Looking for Q_WS_WIN - not found.
Looking for Q_WS_QWS
Looking for Q_WS_QWS - not found.
Looking for Q_WS_MAC
Looking for Q_WS_MAC - not found.
Found Qt4: /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake (found suitable version "4.8.1", required is "4.4.0")
Pedantic compiler settings enabled
Found PythonInterp: /usr/bin/python (found version "2.7.3")
Found Python executable: /usr/bin/python
Found Python version: 2.7.3
Found Python library: /usr/lib/libpython2.7.so
Found SIP version: 4.13.2
Found PyQt4 version: 4.9.1
2

Your GRASS was built against GDAL 1.8

Simply, rebuild GRASS with GDAL 1.9.2

  • I believe having only one library version of gdal 1.9.2 presently. I remember compiling gdal1.8 sometime back and have overwritten using gdal 1.9.2. Do you think there might be some 1.8 version traces which grass is identifying ? Also I have explicitly mentioned --with-gdal=/usr/local/bin/gdal-config which refers to 1.9.2 and built the grass-6.4.2 which now sits in /usr/local/grass-6.4.2 . I have configured GRASS_INCLUDE_DIR, GRASS_PREFIX, and LIB_PATH to look at /usr/local/grass-6.4.2/lib/libgrass_gproj.so. But some reason it says Found GRASS: /usr/lib/grass64 (6.4.2). – Srikanth Dec 5 '12 at 10:16
  • I have renamed /usr/lib/grass64 to grass64_old. Then its says "Could not find GRASS" – Srikanth Dec 5 '12 at 10:17
  • Your GRASS libs are linked to GDAL 1.8. It is obvious. Of course, you could link the libs back to GDAL 1.9.2 but I would not advise to do that. Again, recompile your GRASS with GDAL 1.9.2. It should solve the problem. – Vladimir Dec 5 '12 at 10:28
  • I have removed /usr/lib/grass64 completly and compiled using 1.9.2. Worked. Thank you. – Srikanth Dec 5 '12 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.