#2065 closed defect (fixed)
grass70 not detecting latest source build of libLAS (1.7.0)
Reported by: | rashadkm | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | Compiling | Version: | svn-trunk |
Keywords: | liblas | Cc: | epifanio |
CPU: | All | Platform: | Linux |
Description
when compiling grass70 from source using the config below with libLAS enabled. I am getting an error
./configure --with-freetype-includes=/usr/include/freetype2 --with-postgres-includes=/usr/pgsql-9.2/include/ --with-postgres --with-readline --with-nls --with-blas --with-lapack --with-wxwidgets --with-sqlite --with-geos --with-mysql-includes=/usr/include/mysql --with-mysql --with-netcdf --with-liblas=/home/rashad/local/bin/liblas-config --with-freetype
Config output:
checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc -Wall -g ) works... yes checking whether the C compiler (gcc -Wall -g ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for Cygwin environment... no checking for mingw32 environment... no checking for executable suffix... no checking for full floating-point support... yes checking for pwd... /usr/bin/pwd checking for source directory... /home/rashad/repos/grass/grass70 checking for build directory... /home/rashad/repos/grass/grass70 checking for svnversion... /usr/bin/svnversion checking for MacOSX App... no checking for MacOSX architectures... no checking for MacOSX SDK... no checking how to build libraries... shared checking for additional include dirs... checking for additional library dirs... checking for a BSD compatible install... /usr/bin/install -c checking for flex... flex checking for yywrap in -lfl... no checking for bison... bison -y checking for ranlib... ranlib checking for ar... ar checking for env... env checking for perl... /usr/bin/perl checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for limits.h... yes checking for termio.h... yes checking for termios.h... yes checking for unistd.h... yes checking for values.h... yes checking for f2c.h... no checking for g2c.h... no checking for sys/ioctl.h... yes checking for sys/mtio.h... yes checking for sys/resource.h... yes checking for sys/time.h... yes checking for sys/timeb.h... yes checking for sys/types.h... yes checking for sys/utsname.h... yes checking for libintl.h... yes checking for iconv.h... yes checking for langinfo.h... yes checking whether time.h and sys/time.h may both be included... yes checking for off_t... yes checking for uid_t in sys/types.h... yes checking return type of signal handlers... void checking for Cygwin environment... no checking for ftime... yes checking for gethostname... yes checking for gettimeofday... yes checking for lseek... yes checking for nice... yes checking for time... yes checking for uname... yes checking for seteuid... yes checking for setpriority... yes checking for setreuid... yes checking for setruid... no checking for drand48... yes checking for putenv... yes checking for setenv... yes checking for nanosleep... yes checking whether setpgrp takes no argument... yes checking for long long int... yes checking for W11... no checking for X... libraries , headers checking for dnet_ntoa in -ldnet... no checking for dnet_ntoa in -ldnet_stub... no checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for library containing cuserid... none required checking for asprintf... yes checking for atan... no checking for atan in -lm... yes checking for dlsym... no checking for dlsym in -ldl... yes checking for iconv... yes checking for socket... yes checking for location of zlib includes... checking for zlib.h... yes checking for location of zlib library... checking for deflate in -lz... yes checking for location of External PROJ.4 includes... checking for proj_api.h... yes checking External PROJ.4 version... 480 checking for location of External PROJ.4 library... checking for pj_get_def in -lproj... yes checking for location of External PROJ.4 data files... configure: warning: *** External PROJ.4 directory not specified; default will be used checking for /usr/local/share/proj/epsg... no configure: warning: *** Unable to locate PROJ data files. checking for nad2bin... /usr/bin/nad2bin checking whether to use regex... yes checking for location of regex includes... checking for regex.h... yes checking for location of regex library... checking for regcomp... yes checking whether to use Readline... yes checking for location of Readline includes... checking for readline/readline.h... yes checking for readline/history.h... yes checking for location of Readline library... checking for readline in -lreadline... yes checking for add_history in -lhistory... yes checking whether to use GDAL... yes checking for gdal-config... /usr/bin/gdal-config checking whether to use libLAS... yes checking for liblas-config... /home/rashad/local/bin/liblas-config configure: error: *** Unable to locate libLAS library.
I had downloaded libLAS from [1] and installed in ~/local and liblas-config exists here ~/local/bin/liblas-config. but grass configure always fails. Below is the output from config.log
configure:6088: checking for gdal-config configure:6150: gcc -o conftest -Wall -g -I/usr/include/gdal -Wl,--export-dynamic conftest.c -L/usr/lib64 -lgdal 1>&5 configure: In function 'main': configure:6146:9: warning: ignoring return value of 'GDALOpen', declared with attribute warn_unused_result [-Wunused-result] configure:6198: checking whether to use libLAS configure:6215: checking for liblas-config configure:6270: gcc -o conftest -Wall -g -pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long -std=c++98 -Wl,--export-dynamic conftest.c -L/home/rashad/local/lib -llas -llas_c -L/usr/lib64 /usr/lib64/libboost_program_options-mt.so /usr/lib64/libboost_thread-mt.so 1>&5 cc1: warning: command line option '-std=c++98' is valid for C++/ObjC++ but not for C [enabled by default] configure:6264:32: fatal error: liblas/capi/liblas.h: No such file or directory compilation terminated. configure: failed program was: #line 6263 "configure" #include "confdefs.h" #include <liblas/capi/liblas.h> int main() { LASReader_Create("foo"); ; return 0; } configure:6285: gcc -o conftest -Wall -g -pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long -std=c++98 -Wl,--export-dynamic conftest.c -L/home/rashad/local/lib -llas -llas_c -L/usr/lib64 /usr/lib64/libboost_program_options-mt.so /usr/lib64/libboost_thread-mt.so 1>&5 cc1: warning: command line option '-std=c++98' is valid for C++/ObjC++ but not for C [enabled by default] configure:6279:32: fatal error: liblas/capi/liblas.h: No such file or directory compilation terminated. configure: failed program was: #line 6278 "configure" #include "confdefs.h" #include <liblas/capi/liblas.h> int main() { LASReader_Create("foo"); ; return 0; }
liblas-config --includes gives this ~/local/include
Adding the LIBLAS_INC to CFLAGS solved this
please find attached patch. I modified the configure script. But I think there is a better way to do this
Attachments (1)
Change History (16)
by , 11 years ago
Attachment: | external_liblas_include_ignored.diff added |
---|
comment:1 by , 11 years ago
follow-up: 4 comment:3 by , 11 years ago
currently I'm getting this error with trunk on Debian Wheezy,
./configure ... --with-liblas [...] checking whether to use libLAS... yes checking for liblas-config... /usr/bin/liblas-config configure: error: *** Unable to locate libLAS library.
$ /usr/bin/liblas-config --cflags -Wall -Wno-long-long -pedantic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -O3 -DNDEBUG $ /usr/bin/liblas-config --includes -I/usr/include/geotiff -I/usr/include/gdal
config.log:
configure:6215: checking for liblas-config configure:6272: gcc -o conftest -ggdb -march=amdfam10 -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused -Wall -Wno-long-long -pedantic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -O3 -DNDEBUG -I/usr/include/geotiff -I/usr/include/gdal -W l,--export-dynamic conftest.c -L/usr/lib -lgeotiff -L/usr/lib -lgdal 1>&5 /tmp/ccrOhqrK.o: In function `main': /home/hamish/src/grass/svn/trunk/configure:6268: undefined reference to `LASReader_Create' collect2: error: ld returned 1 exit status configure: failed program was: #line 6265 "configure" #include "confdefs.h" #include <liblas/capi/liblas.h> int main() { LASReader_Create("foo"); ; return 0; } configure:6287: gcc -o conftest -ggdb -march=amdfam10 -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused -Wall -Wno-long-long -pedantic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -O3 -DNDEBUG -I/usr/include/geotiff -I/usr/include/gdal -W l,--export-dynamic conftest.c -L/usr/lib -lgeotiff -L/usr/lib -lgdal 1>&5 /tmp/cc85WCPw.o: In function `main': /home/hamish/src/grass/svn/trunk/configure:6283: undefined reference to `LASReader_Create' collect2: error: ld returned 1 exit status configure: failed program was: #line 6280 "configure" #include "confdefs.h" #include <liblas/capi/liblas.h> int main() { LASReader_Create("foo"); ; return 0; }
$ grep -r LASReader_Create /usr/include/liblas * /usr/include/liblas/capi/liblas.h:LAS_DLL LASReaderH LASReader_Create(const char * filename); $ apt-cache policy liblas-dev liblas-dev: Installed: 1.2.1-5+b1 ...
any ideas?
thanks, Hamish
follow-up: 5 comment:4 by , 11 years ago
Replying to hamish:
currently I'm getting this error with trunk on Debian Wheezy,
$ apt-cache policy liblas-dev liblas-dev:
Installed: 1.2.1-5+b1
... }}}
any ideas?
I think liblas version is very old, try with newer one.
thanks, Hamish
Best Luca
comment:5 by , 11 years ago
Replying to lucadelu:
I think liblas version is very old, try with newer one.
It's the stock version for Debian/Stable (Wheezy) and Ubuntu 12.04 LTS & so should reasonably be supported. ISTR Howard saying there was an old version which would do well to be flushed out of the system. Was it 1.2 or earlier?
If there is a fundamental reason to make 1.7 or newer required, then REQUIREMENTS.html should note that. But I'm not sure there is & wrt this ticket the fn in question does exist in the 1.2 header.
regards, Hamish
comment:6 by , 10 years ago
Cc: | added |
---|---|
Milestone: | 7.0.0 → 7.1.0 |
Exact same problem building grass 7.1-svn on debian sid (liblas 1.8)
follow-up: 8 comment:7 by , 10 years ago
Same problem building grass 7.0.0 on CentOS 7.
liblas 1.8 is installed via yum
comment:8 by , 10 years ago
Replying to morenocomelli:
Same problem building grass 7.0.0 on CentOS 7.
liblas 1.8 is installed via yum
Please check "config.log" for the true error. Maybe liblas-devel is not installed?
follow-up: 10 comment:9 by , 9 years ago
Same problem bulding grass 7.0.0. On CentOS 7, with liblas-1.8.0-3.el7.x86_64 and liblas-devel-1.8.0-3.el7.x86_64 already installed.
follow-up: 11 comment:10 by , 9 years ago
Replying to jmburgos:
Same problem bulding grass 7.0.0. On CentOS 7, with liblas-1.8.0-3.el7.x86_64 and liblas-devel-1.8.0-3.el7.x86_64 already installed.
Please be more specific and provide the error messages and logs. Also please report what running liblas-config
with various parameters gives you. I don't know what to check in the source code since I can't reproduce the issue myself. Several people reported "same problem" but the ticket contains two different issues. One with includes (that's the file not found or dir doesn't exist error), one with linking libraries (that's the undefined reference...collect2: error: ld one).
Good thing to try would be to make a Dockerfile which can be shared and fixed. See e.g. https://github.com/wenzeslaus/grass-gis-docker.
comment:11 by , 9 years ago
Replying to wenzeslaus:
Please be more specific and provide the error messages and logs.
I get an "configure: error: * Unable to locate libLAS library" error.
This is the relevant bit from the config.log file:
configure:6164: checking whether to use libLAS configure:6181: checking for liblas-config configure:6238: gcc -o conftest -g -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/usr/include -I/usr/include/gdal -I/usr/include/libgeotiff -I/usr/include -I/usr/include -Wl,--export-dynamic conftest.c -L/usr/lib -llas -llas_c -L/usr/lib64 /usr/lib64/libboost_program_options-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libgdal.so /usr/lib64/libgeotiff.so /usr/lib64/libtiff.so /usr/lib64/liblaszip.so 1>&5 gcc: error: /usr/lib64/libgeotiff.so: No such file or directory gcc: error: /usr/lib64/liblaszip.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 -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -I/usr/include -I/usr/include/gdal -I/usr/include/libgeotiff -I/usr/include -I/usr/include -Wl,--export-dynamic conftest.c -L/usr/lib -llas -llas_c -L/usr/lib64 /usr/lib64/libboost_program_options-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libgdal.so /usr/lib64/libgeotiff.so /usr/lib64/libtiff.so /usr/lib64/liblaszip.so 1>&5 gcc: error: /usr/lib64/libgeotiff.so: No such file or directory gcc: error: /usr/lib64/liblaszip.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; }
So it seems that it cannot find the libgeotiff.so and liblaszip.so files. But I have the libgeotiff-1.2.5-14.el7.x86_64 and laszip-2.2.0-4.el7.x86_64 packages installed (as well as liblas-1.8.0-3.el7.x86_64 and liblas-devel-1.8.0-3.el7.x86_64).
comment:12 by , 9 years ago
Please report the output of
ls -la /usr/lib64/libgeotiff* ls -la /usr/lib64/liblaszip*
I am sure that the .so names reported by liblas-config do not correspond to the actual files/links.
For me I solved it by creating the missing links but indeed the liblas RPM SPEC file needs a fix.
comment:13 by , 9 years ago
That was my mistake. Some libraries were missing from my computer, namely atlas, laszip-devel, and libgeotiff-devel. With these installed, everything ran smoothly.
comment:15 by , 8 years ago
Milestone: | 7.2.0 → 7.0.0 |
---|
Replying to rashadkm:
Try r57541.