[GRASS-user] Installing GRASS on Ubuntu: compilation error

Hi,

I'm trying to install a GRASS7 from SVN into my home directory (I already
have 6.4.3 installed system wide), I'm following the guidelines at

http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7
http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Compile_from_source

However, on running 'make' I get the following error.

If anyone might recognize the likely source of the errors, I'd be grateful.

GRASS GIS 7.0.svn 56683 compilation log
--------------------------------------------------
Started compilation: Thu Jun 13 17:11:56 ICT 2013
--
Errors in:
/home/user/grass7/grass7_trunk/raster/r.external
/home/user/grass7/grass7_trunk/raster/r.in.gdal
/home/user/grass7/grass7_trunk/raster/r.out.gdal
/home/user/grass7/grass7_trunk/vector/v.out.ogr
/home/user/grass7/grass7_trunk/vector/v.in.ogr
/home/user/grass7/grass7_trunk/vector/v.external
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Thu Jun 13 17:12:59 ICT 2013
make: *** [default] Error 1

Running make in the following error directories gives:

~/grass7/grass7_trunk/raster/r.external
/grass7/grass7_trunk/dist.i686-pc-linux-gnu/lib/libgrass_vector.7.0.svn.so:
undefined reference to `OGR_G_GetGeometryType@GDAL_1.8'

*Configure appears to go without a hitch:*

CFLAGS="-g -Wall" LDFLAGS="-s" ./configure --prefix=/home/user/grass7
--with-png=yes --with-libtiff=internal --with-geotiff=internal
--with-jpeg=internal --with-gif=internal --with-ecw=yes --with-expat=yes
--with-sqlite3=yes --with-geos=yes --with-python --with-libz=internal
--with-netcdf --with-sqlite --with-threads=yes --without-grass
--without-ogdi --with-pg=/usr/bin/pg_config --with-xerces=yes
--with-freetype=yes --with-freetype-includes="/usr/include/freetype2/"
--with-pg=/usr/bin/pg_config --with-readline --with-ffmpeg=yes
--with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavformat
/usr/include/libavutil /usr/include/libswscale" --enable-largefile
--with-lapack --with-blas --with-postgres=yes
--with-postgres-includes=/usr/include/postgresql --with-mysql=no
--with-odbc=yes --with-python=yes --with-wxwidgets=/usr/bin/wx-config
--with-tcltk-includes=/usr/include/tcl8.5 --with-sqlite3=yes --with-cairo
--with-geos=/home/rcooper/grass7/bin
--with-gdal=/home/rcooper/grass7/bin/gdal-config --with-motif
--with-motif-includes=/usr/include
--with-proj-share=/home/rcooper/grass7/share/proj --with-cxx --enable-debug

...

GRASS is now configured for: i686-pc-linux-gnu

  Source directory: /home/user/grass7/grass7_trunk
  Build directory: /home/user/grass7/grass7_trunk
  Installation directory: ${prefix}/grass-7.0.svn
  Startup script in directory:${exec_prefix}/bin
  C compiler: gcc -g -Wall
  C++ compiler: c++ -g -O2
  Building shared libraries: yes
  OpenGL platform: X11

  MacOSX application: no
  MacOSX architectures:
  MacOSX SDK:

  BLAS support: yes
  C++ support: yes
  Cairo support: yes
  DWG support: no
  FFMPEG support: yes
  FFTW support: yes
  FreeType support: yes
  GDAL support: yes
  NETCDF support: yes
  GEOS support: yes
  LAPACK support: yes
  Large File support (LFS): yes
  libLAS support: no
  MySQL support: no
  NLS support: no
  ODBC support: yes
  OGR support: yes
  OpenCL support: no
  OpenGL support: yes
  OpenMP support: no
  PNG support: yes
  POSIX thread support: no
  PostgreSQL support: yes
  Readline support: yes
  Regex support: yes
  SQLite support: yes
  TIFF support: yes
  wxWidgets support: yes
  X11 support: yes

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Installing-GRASS-on-Ubuntu-compilation-error-tp5059904.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Configure proceeds without error after removing
--with-gdal=/home/rcooper/grass7/bin/gdal-config

However, I receive the following error re running configure for
gdal-grass-1.4.3 $ ./configure \

--prefix=/home/rcooper/grass7 \
--with-gdal=/home/rcooper/grass7/bin/gdal-config \
--with-grass=/home/rcooper/grass7/grass7_trunk/ \
--with-autoload="/usr/local/lib/gdalplugins/" \
--with-ld-shared="g++ -shared"

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
using user supplied .so link command ... g++ -shared
user supplied gdal-config (/home/rcooper/grass7/bin/gdal-config)
using /usr/local/lib/gdalplugins/ as GDAL shared library autoload directory
checking for G_asprintf in -lgrass_gis... no
configure: error: --with-grass=/home/rcooper/grass7/grass7_trunk/ requested,
but libraries not found! Perhaps you need to set LD_LIBRARY_PATH to include
/home/rcooper/grass7/grass7_trunk//lib?

I believe I can set the PATH by modifying .profile in Ubuntu.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Installing-GRASS-on-Ubuntu-compilation-error-tp5059904p5059973.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hi Richard,

I had the same problem sometime ago it was due to multiple gdal version installed:

/usr/lib/

/usr/local/lib/

please see this thread - http://lists.osgeo.org/pipermail/grass-dev/2013-May/063755.html

···

On Thu, Jun 13, 2013 at 9:23 PM, RichardC <richtcooper@hotmail.com> wrote:

Configure proceeds without error after removing
–with-gdal=/home/rcooper/grass7/bin/gdal-config

However, I receive the following error re running configure for
gdal-grass-1.4.3 $ ./configure \

–prefix=/home/rcooper/grass7
–with-gdal=/home/rcooper/grass7/bin/gdal-config
–with-grass=/home/rcooper/grass7/grass7_trunk/
–with-autoload=“/usr/local/lib/gdalplugins/”
–with-ld-shared=“g++ -shared”
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ANSI C… none needed
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking for ranlib… ranlib
using user supplied .so link command … g++ -shared
user supplied gdal-config (/home/rcooper/grass7/bin/gdal-config)
using /usr/local/lib/gdalplugins/ as GDAL shared library autoload directory
checking for G_asprintf in -lgrass_gis… no
configure: error: --with-grass=/home/rcooper/grass7/grass7_trunk/ requested,
but libraries not found! Perhaps you need to set LD_LIBRARY_PATH to include
/home/rcooper/grass7/grass7_trunk//lib?

I believe I can set the PATH by modifying .profile in Ubuntu.


View this message in context: http://osgeo-org.1560.x6.nabble.com/Installing-GRASS-on-Ubuntu-compilation-error-tp5059904p5059973.html

Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Regards,
Rashad

On Thu, Jun 13, 2013 at 12:35 PM, RichardC <richtcooper@hotmail.com> wrote:

Hi,

I'm trying to install a GRASS7 from SVN into my home directory (I already
have 6.4.3 installed system wide), I'm following the guidelines at

http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7
http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Compile_from_source

However, on running 'make' I get the following error.

If anyone might recognize the likely source of the errors, I'd be grateful.

GRASS GIS 7.0.svn 56683 compilation log
--------------------------------------------------
Started compilation: Thu Jun 13 17:11:56 ICT 2013
--
Errors in:
/home/user/grass7/grass7_trunk/raster/r.external
/home/user/grass7/grass7_trunk/raster/r.in.gdal
/home/user/grass7/grass7_trunk/raster/r.out.gdal
/home/user/grass7/grass7_trunk/vector/v.out.ogr
/home/user/grass7/grass7_trunk/vector/v.in.ogr
/home/user/grass7/grass7_trunk/vector/v.external
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Thu Jun 13 17:12:59 ICT 2013
make: *** [default] Error 1

Running make in the following error directories gives:

~/grass7/grass7_trunk/raster/r.external
/grass7/grass7_trunk/dist.i686-pc-linux-gnu/lib/libgrass_vector.7.0.svn.so:
undefined reference to `OGR_G_GetGeometryType@GDAL_1.8'

*Configure appears to go without a hitch:*

CFLAGS="-g -Wall" LDFLAGS="-s" ./configure --prefix=/home/user/grass7
--with-png=yes --with-libtiff=internal --with-geotiff=internal
--with-jpeg=internal --with-gif=internal --with-ecw=yes --with-expat=yes
--with-sqlite3=yes --with-geos=yes --with-python --with-libz=internal
--with-netcdf --with-sqlite --with-threads=yes --without-grass
--without-ogdi --with-pg=/usr/bin/pg_config --with-xerces=yes
--with-freetype=yes --with-freetype-includes="/usr/include/freetype2/"
--with-pg=/usr/bin/pg_config --with-readline --with-ffmpeg=yes
--with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavformat
/usr/include/libavutil /usr/include/libswscale" --enable-largefile
--with-lapack --with-blas --with-postgres=yes
--with-postgres-includes=/usr/include/postgresql --with-mysql=no
--with-odbc=yes --with-python=yes --with-wxwidgets=/usr/bin/wx-config
--with-tcltk-includes=/usr/include/tcl8.5 --with-sqlite3=yes --with-cairo
--with-geos=/home/rcooper/grass7/bin
--with-gdal=/home/rcooper/grass7/bin/gdal-config

This looks very much like you have a system-wide gdal installation and
a custom gdal installation in /home/rcooper/grass7/. It is nearly
impossible to have two different gdal installations on the same
system. gdal needs to be installed in a standard location such as
/usr/ or /usr/local/. If not, you should read first the manuals of
your compiler and your linker, before you 1) attempt to install gdal
in a non-standard location, 2) compile other software against gdal in
a non-standard location.

You should remove the gdal installation in /home/rcooper/grass7/ and
use the system-wide gdal installation.

Markus M

--with-motif-includes=/usr/include
--with-proj-share=/home/rcooper/grass7/share/proj --with-cxx --enable-debug

...

GRASS is now configured for: i686-pc-linux-gnu

  Source directory: /home/user/grass7/grass7_trunk
  Build directory: /home/user/grass7/grass7_trunk
  Installation directory: ${prefix}/grass-7.0.svn
  Startup script in directory:${exec_prefix}/bin
  C compiler: gcc -g -Wall
  C++ compiler: c++ -g -O2
  Building shared libraries: yes
  OpenGL platform: X11

  MacOSX application: no
  MacOSX architectures:
  MacOSX SDK:

  BLAS support: yes
  C++ support: yes
  Cairo support: yes
  DWG support: no
  FFMPEG support: yes
  FFTW support: yes
  FreeType support: yes
  GDAL support: yes
  NETCDF support: yes
  GEOS support: yes
  LAPACK support: yes
  Large File support (LFS): yes
  libLAS support: no
  MySQL support: no
  NLS support: no
  ODBC support: yes
  OGR support: yes
  OpenCL support: no
  OpenGL support: yes
  OpenMP support: no
  PNG support: yes
  POSIX thread support: no
  PostgreSQL support: yes
  Readline support: yes
  Regex support: yes
  SQLite support: yes
  TIFF support: yes
  wxWidgets support: yes
  X11 support: yes

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Installing-GRASS-on-Ubuntu-compilation-error-tp5059904.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user