[GRASS-user] Error trying to compile grass 7 w/libLAS Debian Jessie

Hello dear list

I’m trying to compile grass 7 from source on Debian Jessie with libLAS support, here’s what I’ve tried:

I’ve installed liblas-bin and liblas-dev (1.8.0) from debian repositories

Downloaded grass source code:

wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz
tar xzf grass-7.0.0.tar.gz
cd grass-7.0.0

But when I run
./configure … --with-liblas=yes

I get:


checking for liblas-config… /usr/bin/liblas-config
configure: error: *** Unable to locate libLAS library.

Here’s the config.log:

configure:6164: checking whether to use libLAS
configure:6181: checking for liblas-config
configure:6238: gcc -o conftest -g -Wall -Werror-implicit-function-declaration -
fno-common -Wextra -Wunused -g -O2 -fstack-protector-strong -Wformat -Werror=fo
rmat-security -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include/gdal -I/usr/inc
lude/geotiff -I/usr/include/i386-linux-gnu -Wl,–export-dynamic conftest.c -L/
usr/lib -llas -llas_c -L/usr/lib/i386-linux-gnu /usr/lib/i386-linux-gnu/libboost
_program_options.so /usr/lib/i386-linux-gnu/libboost_thread.so /usr/lib/libgdal.
so /usr/lib/libgeotiff.so /usr/lib/i386-linux-gnu/libtiff.so 1>&5
gcc: error: /usr/lib/libgeotiff.so: No such file or directory
configure: failed program was:
#line 6231 “configure”
#include “confdefs.h”
#include <liblas/capi/liblas.h>
int main() {
LASReader_Create(“foo”);
; return 0; }
configure:6253: gcc -o conftest -g -Wall -Werror-implicit-function-declaration -
fno-common -Wextra -Wunused -g -O2 -fstack-protector-strong -Wformat -Werror=fo
rmat-security -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include/gdal -I/usr/inc
lude/geotiff -I/usr/include/i386-linux-gnu -Wl,–export-dynamic conftest.c -L/
usr/lib -llas -llas_c -L/usr/lib/i386-linux-gnu /usr/lib/i386-linux-gnu/libboost
_program_options.so /usr/lib/i386-linux-gnu/libboost_thread.so /usr/lib/libgdal.
so /usr/lib/libgeotiff.so /usr/lib/i386-linux-gnu/libtiff.so 1>&5
gcc: error: /usr/lib/libgeotiff.so: No such file or directory
configure: failed program was:
#line 6246 “configure”
#include “confdefs.h”
#include <liblas/capi/liblas.h>
int main() {
LASReader_Create(“foo”);
; return 0; }

I tried checking out from SVN too:

svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0 grass-7.0.svn
cd grass-7.0.svn
./configure … --with-liblas=yes

And I get the same error

I found a ticket (http://trac.osgeo.org/grass/ticket/2065) about this but it’s marked as fixed…

Can someone please guide me as to how to bypass this error?

The full configure options are:

CFLAGS=“-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused” CXXFLAGS=“-g -Wall”
./configure
–prefix=/usr/local
–with-gdal
–with-proj --with-proj-share=/usr/share
–with-glw --with-nls --with-readline
–with-cxx --enable-largefile
–with-freetype --with-freetype-includes=/usr/include/freetype2
–with-sqlite --with-cairo --with-python=/usr/bin/python-config
–with-wxwidgets --with-geos --with-blas
–with-lapack-includes=/usr/lib/lapack --with-liblas=yes
–with-netcdf=/usr/bin/nc-config --with-odbc=yes
–with-openmp=yes --with-pthread=yes --with-postgres=yes
–with-postgres-includes=/usr/include/postgresql
–with-postgres-libs=/usr/lib/postgresql
–with-mysql=yes --with-mysql-includes=/usr/include/mysql
–with-mysql-libs=/usr/lib/mysql

​Thanks!​

···

César Augusto Ramírez Franco

Laboratorio de Sistemas Complejos Naturales

Escuela de Geociencias

Facultad de Ciencias

Universidad Nacional de Colombia - Sede Medellín

Teléfono: (57-4) 430 9369 - 300 459 6085

On Wed, Jun 24, 2015 at 5:08 PM, César Augusto Ramírez Franco <
caesarivs@gmail.com> wrote:

Hello dear list

I'm trying to compile grass 7 from source on Debian Jessie with libLAS
support, here's what I've tried:

I've installed liblas-bin and liblas-dev (1.8.0) from debian repositories

Downloaded grass source code:
wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz
tar xzf grass-7.0.0.tar.gz
cd grass-7.0.0

But when I run
./configure ... --with-liblas=yes

I get:

...
checking for liblas-config... /usr/bin/liblas-config
configure: error: *** Unable to locate libLAS library.

What

    which liblas-config

says? For me on Ubuntu 15.04 it says /usr/bin/liblas-config. So it should
work. Although I explicitly call

    --with-liblas-config=/usr/bin/liblas-config

but it is probably not necessary.

Here's the config.log:

configure:6164: checking whether to use libLAS
configure:6181: checking for liblas-config
configure:6238: gcc -o conftest -g -Wall
-Werror-implicit-function-declaration -
fno-common -Wextra -Wunused -g -O2 -fstack-protector-strong -Wformat
-Werror=fo
rmat-security -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include/gdal
-I/usr/inc
lude/geotiff -I/usr/include/i386-linux-gnu -Wl,--export-dynamic
conftest.c -L/
usr/lib -llas -llas_c -L/usr/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu/libboost
_program_options.so /usr/lib/i386-linux-gnu/libboost_thread.so
/usr/lib/libgdal.
so /usr/lib/libgeotiff.so /usr/lib/i386-linux-gnu/libtiff.so 1>&5
gcc: error: /usr/lib/libgeotiff.so: No such file or directory
configure: failed program was:
#line 6231 "configure"
#include "confdefs.h"
#include <liblas/capi/liblas.h>
int main() {
LASReader_Create("foo");
; return 0; }
configure:6253: gcc -o conftest -g -Wall
-Werror-implicit-function-declaration -
fno-common -Wextra -Wunused -g -O2 -fstack-protector-strong -Wformat
-Werror=fo
rmat-security -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/include/gdal
-I/usr/inc
lude/geotiff -I/usr/include/i386-linux-gnu -Wl,--export-dynamic
conftest.c -L/
usr/lib -llas -llas_c -L/usr/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu/libboost
_program_options.so /usr/lib/i386-linux-gnu/libboost_thread.so
/usr/lib/libgdal.
so /usr/lib/libgeotiff.so /usr/lib/i386-linux-gnu/libtiff.so 1>&5
gcc: error: /usr/lib/libgeotiff.so: No such file or directory
configure: failed program was:
#line 6246 "configure"
#include "confdefs.h"
#include <liblas/capi/liblas.h>
int main() {
LASReader_Create("foo");
; return 0; }

I tried checking out from SVN too:

svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0
grass-7.0.svn
cd grass-7.0.svn
./configure ... --with-liblas=yes

And I get the same error

I found a ticket (http://trac.osgeo.org/grass/ticket/2065) about this but
it's marked as fixed...

Can someone please guide me as to how to bypass this error?

The full configure options are:

CFLAGS="-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra
-Wunused" CXXFLAGS="-g -Wall" \
./configure \
   --prefix=/usr/local \
   --with-gdal \
   --with-proj --with-proj-share=/usr/share \
   --with-glw --with-nls --with-readline \
   --with-cxx --enable-largefile \
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \
   --with-sqlite --with-cairo --with-python=/usr/bin/python-config \
   --with-wxwidgets --with-geos --with-blas \
   --with-lapack-includes=/usr/lib/lapack --with-liblas=yes \
   --with-netcdf=/usr/bin/nc-config --with-odbc=yes \
   --with-openmp=yes --with-pthread=yes --with-postgres=yes \
   --with-postgres-includes=/usr/include/postgresql \
   --with-postgres-libs=/usr/lib/postgresql \
   --with-mysql=yes --with-mysql-includes=/usr/include/mysql \
   --with-mysql-libs=/usr/lib/mysql

​Thanks!​

--
*César Augusto Ramírez Franco*
Laboratorio de Sistemas Complejos Naturales
Escuela de Geociencias
Facultad de Ciencias
Universidad Nacional de Colombia - Sede Medellín
Teléfono: (57-4) 430 9369 - 300 459 6085

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

​Hello Vaclav, thanks for your quick reply​

What

    which liblas-config

says?

​It's the same for me​:

$ which liblas-config
/usr/bin/liblas-config

For me on Ubuntu 15.04 it says /usr/bin/liblas-config. So it should work.

Although I explicitly call

​​
    --with-liblas-config=/usr/bin/liblas-config

but it is probably not necessary.

​I tried explicitly calling the path to no avail, I'm still getting the
same error :confused:

Maybe it has something to do with the CFLAGS I'm using? Or something else
on my ./configure stack?

I'm based off the one at the wiki:
http://grasswiki.osgeo.org/wiki/Compile_and_Install#GRASS_7_on_Debian_Jessie

On the ticket I found it says: "Adding the LIBLAS_INC to CFLAGS solved this"

How do I do that?

I also tried the 7.0.1RC1 and got the same error, so I'm kind of sure
somethin on my ./configure stack is wrong, here's the one I'm using:

CFLAGS="-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra
-Wunused" \
CXXFLAGS="-g -Wall" \
./configure \
   --prefix=/usr/local \
   --with-gdal \
   --with-proj --with-proj-share=/usr/share \
   --with-glw --with-nls --with-readline \
   --with-cxx --enable-largefile \
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \
   --with-sqlite --with-cairo --with-python=/usr/bin/python-config \
   --with-wxwidgets --with-geos --with-blas \
   --with-lapack-includes=/usr/lib/lapack --with-liblas=yes \
   --with-netcdf=/usr/bin/nc-config --with-odbc=yes \
   --with-openmp=yes --with-pthread=yes --with-postgres=yes \
   --with-postgres-includes=/usr/include/postgresql \
   --with-postgres-libs=/usr/lib/postgresql \
   --with-mysql=yes --with-mysql-includes=/usr/include/mysql \
   --with-mysql-libs=/usr/lib/mysql

Thanks again

--
*César Augusto Ramírez Franco*
Laboratorio de Sistemas Complejos Naturales
Escuela de Geociencias
Facultad de Ciencias
Universidad Nacional de Colombia - Sede Medellín
Teléfono: (57-4) 430 9369 - 300 459 6085

On Wed, Jun 24, 2015 at 10:30 PM, César Augusto Ramírez Franco <
caesarivs@gmail.com> wrote:

On the ticket I found it says: "Adding the LIBLAS_INC to CFLAGS solved
this"

How do I do that?

I also tried the 7.0.1RC1 and got the same error, so I'm kind of sure
somethin on my ./configure stack is wrong, here's the one I'm using:

CFLAGS="-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra
-Wunused" \

CFLAGS="-g -Wall ... $(liblas-config --includes)"

But this is not the right solution. I would say that the configure script
should take care of that and I thought we already went through this and
fixed it at one point. Look to the configure file and see:

grep -i liblas configure

I'm looking at trunk but it should be same for all 7 versions.

2015-06-24 22:03 GMT-05:00 Vaclav Petras <wenzeslaus@gmail.com>:

···

​This didn’t work either​

I can’t tell if there’s anything wrong​, ​I get this:

​$ grep -i liblas configure
–with-liblas[=path/liblas-config]
enable libLAS support (liblas-config with path,
e.g. ‘–with-liblas=/usr/local/bin/liblas-config’,

Check whether --with-liblas or --without-liblas was given.

if test “${with_liblas+set}” = set; then
withval=“$with_liblas”
with_liblas=“no”

libLAS option

echo $ac_n “checking whether to use libLAS”“… $ac_c” 1>&6
echo “configure:6164: checking whether to use libLAS” >&5
LIBLAS_LIBS=
LIBLAS_CFLAGS=
USE_LIBLAS=
if test “basename xx/$with_liblas” = “liblas-config” ; then
LIBLAS_CONFIG=“$with_liblas”
if test “$with_liblas” = “no” ; then

Extract the first word of “liblas-config”, so it can be a program name with args.

set dummy liblas-config; ac_word=$2
case “$LIBLAS_CONFIG” in
ac_cv_path_LIBLAS_CONFIG=“$LIBLAS_CONFIG” # Let the user override the test with a path.
ac_cv_path_LIBLAS_CONFIG=“$LIBLAS_CONFIG” # Let the user override the test with a dos path.
ac_cv_path_LIBLAS_CONFIG=“$ac_dir/$ac_word”
test -z “$ac_cv_path_LIBLAS_CONFIG” && ac_cv_path_LIBLAS_CONFIG=“no”
LIBLAS_CONFIG=“$ac_cv_path_LIBLAS_CONFIG”
if test -n “$LIBLAS_CONFIG”; then
echo “$ac_t”“$LIBLAS_CONFIG” 1>&6
if test “$LIBLAS_CONFIG” = “no” ; then
{ echo “configure: error: *** couldn’t find liblas-config” 1>&2; exit 1; }
if test “$LIBLAS_CONFIG” != “” ; then
LIBLAS_LIBS="$LIBLAS_CONFIG" --libs
LIBLAS_CFLAGS="$LIBLAS_CONFIG" --cflags
LIBLAS_INC="$LIBLAS_CONFIG" --includes
USE_LIBLAS=1
LIBLAS=
LIBS=“$LIBS $LIBLAS_LIBS”
CFLAGS=“$CFLAGS $LIBLAS_CFLAGS”
CPPFLAGS=“$CPPFLAGS $LIBLAS_INC”
#include <liblas/capi/liblas.h>
#include <liblas/capi/liblas.h>
{ echo “configure: error: *** Unable to locate libLAS library.” 1>&2; exit 1; }
#define HAVE_LIBLAS 1
s%@LIBLAS_CONFIG@%$LIBLAS_CONFIG%g
s%@LIBLAS_LIBS@%$LIBLAS_LIBS%g
s%@LIBLAS_CFLAGS@%$LIBLAS_CFLAGS%g
s%@LIBLAS_INC@%$LIBLAS_INC%g
s%@USE_LIBLAS@%$USE_LIBLAS%g
echo " libLAS support: if test -n "${USE_LIBLAS}" ; then echo yes ; else echo no ; fi"

​The fact that I’m getting the same error on 7.0.0, 7.0.svn and 7.0.1RC1 makes me think there must be something I’m doing wrong, or maybe the problem is in the liblas-bin and liblas-dev packages on debian ​repos.

On Wed, Jun 24, 2015 at 10:30 PM, César Augusto Ramírez Franco <caesarivs@gmail.com> wrote:

On the ticket I found it says: “Adding the LIBLAS_INC to CFLAGS solved this”

How do I do that?

I also tried the 7.0.1RC1 and got the same error, so I’m kind of sure somethin on my ./configure stack is wrong, here’s the one I’m using:

CFLAGS=“-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused” \

​​
CFLAGS=“-g -Wall … $(liblas-config --includes)”

But this is not the right solution. I would say that the configure script should take care of that and I thought we already went through this and fixed it at one point. Look to the configure file and see:

grep -i liblas configure

I’m looking at trunk but it should be same for all 7 versions.

César Augusto Ramírez Franco

Laboratorio de Sistemas Complejos Naturales

Escuela de Geociencias

Facultad de Ciencias

Universidad Nacional de Colombia - Sede Medellín

Teléfono: (57-4) 430 9369 - 300 459 6085

2015-06-25 1:09 GMT-05:00 César Augusto Ramírez Franco <caesarivs@gmail.com>:

···

​Well, I just tried compiling libLAS from source:

wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2
tar xjf libLAS-1.8.0.tar.bz2
mkdir libLAS-1.8.0/makefiles
cd libLAS-1.8.0/makefiles
cmake -G “Unix Makefiles” …/

make
make install

Tried ./configure … --with-liblas=yes

And it worked

There must be something wrong with the packages on debian jessie repo

​The fact that I’m getting the same error on 7.0.0, 7.0.svn and 7.0.1RC1 makes me think there must be something I’m doing wrong, or maybe the problem is in the liblas-bin and liblas-dev packages on debian ​repos.

César Augusto Ramírez Franco

Laboratorio de Sistemas Complejos Naturales

Escuela de Geociencias

Facultad de Ciencias

Universidad Nacional de Colombia - Sede Medellín

Teléfono: (57-4) 430 9369 - 300 459 6085

On Thu, Jun 25, 2015 at 2:35 AM, César Augusto Ramírez Franco <
caesarivs@gmail.com> wrote:

2015-06-25 1:09 GMT-05:00 César Augusto Ramírez Franco <
caesarivs@gmail.com>:

​The fact that I'm getting the same error on 7.0.0, 7.0.svn and 7.0.1RC1
makes me think there must be something I'm doing wrong, or maybe the
problem is in the liblas-bin and liblas-dev packages on debian ​repos.

​Well, I just tried compiling libLAS from source:

wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2
tar xjf libLAS-1.8.0.tar.bz2
mkdir libLAS-1.8.0/makefiles
cd libLAS-1.8.0/makefiles
cmake -G "Unix Makefiles" ../
make
make install

Tried ./configure ... --with-liblas=yes

And it worked

There must be something wrong with the packages on debian jessie repo

In case you are sure, you had all the required packages installed before,
you should report it to the maintainers. This should just work.

The package that has to be installed is liblas-c-dev, not liblas-dev. I tried with that one and it compiled succesfully. Thanks!!!

···

On Thu, Jun 25, 2015 at 2:35 AM, César Augusto Ramírez Franco caesarivs@gmail.com wrote:

2015-06-25 1:09 GMT-05:00 César Augusto Ramírez Franco caesarivs@gmail.com:

​Well, I just tried compiling libLAS from source:

wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2
tar xjf libLAS-1.8.0.tar.bz2
mkdir libLAS-1.8.0/makefiles
cd libLAS-1.8.0/makefiles
cmake -G “Unix Makefiles” …/

make
make install

Tried ./configure … --with-liblas=yes

And it worked

There must be something wrong with the packages on debian jessie repo

​The fact that I’m getting the same error on 7.0.0, 7.0.svn and 7.0.1RC1 makes me think there must be something I’m doing wrong, or maybe the problem is in the liblas-bin and liblas-dev packages on debian ​repos.

In case you are sure, you had all the required packages installed before, you should report it to the maintainers. This should just work.

On Thu, Jun 25, 2015 at 4:59 PM, César Augusto Ramírez Franco <
caesarivs@gmail.com> wrote:

The package that has to be installed is liblas-c-dev, not liblas-dev. I
tried with that one and it compiled succesfully. Thanks!!!

Good. That makes sense. libLAS is C++ but GRASS uses its C interface. The
Ubuntu compile guide for GRASS contains this information, perhaps you can
extend the Debian one, or link there the Ubuntu page.

http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu

Already done on http://grasswiki.osgeo.org/wiki/Compile_and_Install#GRASS_7_on_Debian_Jessie, that’s the way it worked best for me.

Cheers

···

2015-06-25 21:16 GMT-05:00 Vaclav Petras <wenzeslaus@gmail.com>:

On Thu, Jun 25, 2015 at 4:59 PM, César Augusto Ramírez Franco <caesarivs@gmail.com> wrote:

The package that has to be installed is liblas-c-dev, not liblas-dev. I tried with that one and it compiled succesfully. Thanks!!!

Good. That makes sense. libLAS is C++ but GRASS uses its C interface. The Ubuntu compile guide for GRASS contains this information, perhaps you can extend the Debian one, or link there the Ubuntu page.

http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu

César Augusto Ramírez Franco

Laboratorio de Sistemas Complejos Naturales

Escuela de Geociencias

Facultad de Ciencias

Universidad Nacional de Colombia - Sede Medellín

Teléfono: (57-4) 430 9369 - 300 459 6085