Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need 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. Any help is greatly appreciated. Thank you.

Linking C executable ../../../output/lib/qgis/grass/modules/ /usr/lib/grass64/lib/ undefined reference to OSRGetLinearUnits@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference toVSIFree@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference to OSRExportToWkt@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference toOSRGetAttrValue@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference to SetCSVFilenameHook@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference toOSRExportToProj4@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference to OSRIsProjected@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference toOSRNewSpatialReference@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference to OSRExportToPrettyWkt@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference toOSRMorphFromESRI@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference to OSRIsGeographic@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference toOSRMorphToESRI@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference to OSRImportFromProj4@GDAL_1.8' /usr/lib/grass64/lib/ undefined reference toOSRGetUTMZone@GDAL_1.8' /usr/lib/grass64/lib/ 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/ Found GEOS: /usr/lib/ Found GDAL: /usr/local/lib/ (1.9.2) Found Expat: /usr/lib/x86_64-linux-gnu/ Found Spatialindex: /usr/lib/ Found Qwt: /usr/lib/ (5.2.2) Found Sqlite3: /usr/lib/x86_64-linux-gnu/ Found PostgreSQL: /usr/lib/ 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/ Found SIP version: 4.13.2 Found PyQt4 version: 4.9.1

Regards, Shrieky

share|improve this question
up vote 2 down vote accepted

Your GRASS was built against GDAL 1.8

Simply, rebuild GRASS with GDAL 1.9.2

share|improve this answer
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/ 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
If my answer was useful to you plz accept it. =) – Vladimir Dec 5 '12 at 11:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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