[GRASS-user] Error building libLAS

Rich Shepard rshepard at appl-ecosys.com
Mon Aug 29 10:00:27 PDT 2016


   I've a project that requires building topography from LiDAR data and
GRASS-7.x requires libLAS for r.in.lidar/v.in.lidar. This library is not
available from SlackBuilds.org so I tried to build it from source (version
1.8.1) following the libLAS website's directions. The make fails here:

[ 55%] Building C object apps/CMakeFiles/las2col.dir/las2col.c.o
/opt/slackbuilds/GIS/libLAS/libLAS-1.8.1/apps/las2col.c: In function ‘main’:
/opt/slackbuilds/GIS/libLAS/libLAS-1.8.1/apps/las2col.c:1048:9: warning:
passing argument 1 of ‘fsync’ makes integer from pointer without a cast
[enabled by default]
          fsync(files_out[i]);
          ^
In file included from
/opt/slackbuilds/GIS/libLAS/libLAS-1.8.1/apps/las2col.c:30:0:
/usr/include/unistd.h:978:12: note: expected ‘int’ but argument is of type
‘struct FILE *’
  extern int fsync (int __fd);
             ^
Linking C executable ../bin/Release/las2col
/usr/lib/gcc/i486-slackware-linux/4.8.2/../../../../i486-slackware-linux/bin/ld:
CMakeFiles/las2col.dir/las2col.c.o: undefined reference to symbol
'pthread_join@@GLIBC_2.0'
/usr/lib/gcc/i486-slackware-linux/4.8.2/../../../../i486-slackware-linux/bin/ld:
note: 'pthread_join@@GLIBC_2.0' is defined in DSO /lib/libpthread.so.0 so
try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/Release/las2col] Error 1
make[1]: *** [apps/CMakeFiles/las2col.dir/all] Error 2
make: *** [all] Error 2

   This appears to be an error in the source code. Is there anything I can do
to fix this so I can successfully build the library, rebuild GRASS, then get
to my project need?

TIA,

Rich


More information about the grass-user mailing list