I am trying to install PDAL 2.4.0 from source, building with CMake 3.22.4 and ninja 1.10.0 on a laptop running Linux Mint 20.3.
I am following the steps laid out here: UNIX Compilation
Here is the output of cmake:
sudo cmake -G Ninja ..
-- The CXX compiler identification is GNU 9.4.0
-- The C compiler identification is GNU 9.4.0
-- 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found GDAL: /usr/local/lib/libgdal.so (found suitable version "3.4.2", minimum required is "3.0")
-- Found GeoTIFF: /usr/lib/x86_64-linux-gnu/libgeotiff.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.10")
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found suitable version "1.1.1f", minimum required is "1.1")
-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.10")
-- Could NOT find LIBEXECINFO (missing: LIBEXECINFO_LIBRARY)
-- Found LIBUNWIND: /usr/lib/x86_64-linux-gnu/libunwind.so
-- The following features have been enabled:
* Unit tests, PDAL unit tests
-- The following OPTIONAL packages have been found:
* ZSTD
General compression support
* LibXml2
* PkgConfig
* OpenSSL (required version >= 1.1)
* PythonInterp
* Libunwind
-- The following REQUIRED packages have been found:
* GDAL (required version >= 3.0)
Provides general purpose raster, vector, and reference system support
* GeoTIFF
* ZLIB
Compression support in BPF
* CURL
* Threads, The thread library of the system
-- The following features have been disabled:
* Bash completion, completion for PDAL command line
* CPD plugin, Coherent Point Drift (CPD) computes rigid or nonrigid transformations between point sets
* I3S plugin, Read from a I3S server or from a SLPK file
* Icebridge plugin, read data in the Icebridge format
* HDF plugin, read data in the HDF format
* Matlab plugin, write data to a .mat file
* NITF plugin, read/write LAS data wrapped in NITF
* OpenSceneGraph plugin, read/write OpenSceneGraph objects
* PostgreSQL PointCloud plugin, read/write PostgreSQL PointCloud objects
* RiVLib plugin, read data in the RXP format
* rdblib plugin, read data in the RDB format
* MBIO plugin, add features that depend on MBIO
* FBX plugin, add features that depend on FBX
* TEASER++ plugin, TEASER++ computes transformations between point sets
* TileDB plugin, read/write data from TileDB
* E57 plugin, read/write data to and from e57 format
-- The following OPTIONAL packages have not been found:
* PostgreSQL
* absl
* Libexecinfo
-- Configuring done
-- Generating done
-- Build files have been written
to: /usr/local/PDAL-2.4.0-src/build
Next, I ran ninja, with no obvious errors; it builds all 513 object files.
$ ls bin/pdal
bin/pdal
$ ls lib/libpdal*
$ ls -l lib/libpdal*
-rw-r--r-- 1 root root 4625264 Apr 29 11:58 lib/libpdal_arbiter.a
lrwxrwxrwx 1 root root 18 Apr 29 11:58 lib/libpdal_base.so -> libpdal_base.so.14
lrwxrwxrwx 1 root root 22 Apr 29 11:58 lib/libpdal_base.so.14 -> libpdal_base.so.14.0.0
-rwxr-xr-x 1 root root 32674024 Apr 29 11:58 lib/libpdal_base.so.14.0.0
-rw-r--r-- 1 root root 66176 Apr 29 11:56 lib/libpdal_kazhdan.a
-rw-r--r-- 1 root root 3086726 Apr 29 11:56 lib/libpdal_lazperf.a
lrwxrwxrwx 1 root root 38 Apr 29 11:58 lib/libpdal_plugin_kernel_fauxplugin.so -> libpdal_plugin_kernel_fauxplugin.so.14
lrwxrwxrwx 1 root root 42 Apr 29 11:58 lib/libpdal_plugin_kernel_fauxplugin.so.14 -> libpdal_plugin_kernel_fauxplugin.so.14.0.0
-rwxr-xr-x 1 root root 265704 Apr 29 11:58 lib/libpdal_plugin_kernel_fauxplugin.so.14.0.0
lrwxrwxrwx 1 root root 18 Apr 29 11:56 lib/libpdal_util.so -> libpdal_util.so.14
lrwxrwxrwx 1 root root 22 Apr 29 11:56 lib/libpdal_util.so.14 -> libpdal_util.so.14.0.0
-rwxr-xr-x 1 root root 399520 Apr 29 11:56 lib/libpdal_util.so.14.0.0
I get an invalid pointer error when running the tests, though:
$ bin/pdal info ../test/data/las/autzen_trim.las
{
"file_size": 3742038,
"filename": "../test/data/las/autzen_trim.las",
"now": "2022-04-29T12:02:46-0300",
"pdal_version": "2.4.0 (git-version: Release)",
"reader": "readers.las",
"stats":
{
"bbox":
{
"EPSG:4326":
{
"bbox":
{
"maxx": -123.0689038,
"maxy": 44.0515451,
"maxz": 520.51,
"minx": -123.0734481,
"miny": 44.04990077,
"minz": 406.26
},
"boundary": { "type": "Polygon", "coordinates": [ [ [ -123.073380967734707, 44.049900771055896, 406.26 ], [ -123.073448053467075, 44.05144393835905, 406.26 ], [ -123.068970750521771, 44.051545096157895, 520.51 ], [ -123.0689037813531, 44.050001926236391, 520.51 ], [ -123.073380967734707, 44.049900771055896, 406.26 ] ] ] }
},
"native":
{
"bbox":
{
"maxx": 637179.22,
"maxy": 849497.9,
"maxz": 520.51,
"minx": 636001.76,
"miny": 848935.2,
"minz": 406.26
},
"boundary": { "type": "Polygon", "coordinates": [ [ [ 636001.76, 848935.200000000069849, 406.26 ], [ 636001.76, 849497.900000000023283, 406.26 ], [ 637179.21999999997206, 849497.900000000023283, 520.51 ], [ 637179.21999999997206, 848935.200000000069849, 520.51 ], [ 636001.76, 848935.200000000069849, 406.26 ] ] ] }
}
},
"statistic":
[
{
"average": 636546.405,
"count": 110000,
"maximum": 637179.22,
"minimum": 636001.76,
"name": "X",
"position": 0,
"stddev": 314.9304199,
"variance": 99181.16939
},
{
"average": 849145.7857,
"count": 110000,
"maximum": 849497.9,
"minimum": 848935.2,
"name": "Y",
"position": 1,
"stddev": 124.3281512,
"variance": 15457.48917
},
{
"average": 430.3375248,
"count": 110000,
"maximum": 520.51,
"minimum": 406.26,
"name": "Z",
"position": 2,
"stddev": 14.94118348,
"variance": 223.2389639
},
{
"average": 102.0049727,
"count": 110000,
"maximum": 254,
"minimum": 0,
"name": "Intensity",
"position": 3,
"stddev": 68.58535917,
"variance": 4703.951493
},
{
"average": 1.114218182,
"count": 110000,
"maximum": 4,
"minimum": 1,
"name": "ReturnNumber",
"position": 4,
"stddev": 0.3688939099,
"variance": 0.1360827168
},
{
"average": 1.228854545,
"count": 110000,
"maximum": 4,
"minimum": 1,
"name": "NumberOfReturns",
"position": 5,
"stddev": 0.5309262708,
"variance": 0.281882705
},
{
"average": 0.5090727273,
"count": 110000,
"maximum": 1,
"minimum": 0,
"name": "ScanDirectionFlag",
"position": 6,
"stddev": 0.4999199512,
"variance": 0.2499199576
},
{
"average": 0,
"count": 110000,
"maximum": 0,
"minimum": 0,
"name": "EdgeOfFlightLine",
"position": 7,
"stddev": 0,
"variance": 0
},
{
"average": 1.237336364,
"count": 110000,
"maximum": 2,
"minimum": 1,
"name": "Classification",
"position": 8,
"stddev": 0.4254520651,
"variance": 0.1810094597
},
{
"average": -8.288418182,
"count": 110000,
"maximum": -1,
"minimum": -18,
"name": "ScanAngleRank",
"position": 9,
"stddev": 2.643634952,
"variance": 6.98880576
},
{
"average": 125.1248727,
"count": 110000,
"maximum": 135,
"minimum": 117,
"name": "UserData",
"position": 10,
"stddev": 2.710253416,
"variance": 7.345473579
},
{
"average": 7326,
"count": 110000,
"maximum": 7326,
"minimum": 7326,
"name": "PointSourceId",
"position": 11,
"stddev": 0,
"variance": 0
},
{
"average": 111.4174727,
"count": 110000,
"maximum": 236,
"minimum": 40,
"name": "Red",
"position": 12,
"stddev": 36.82992919,
"variance": 1356.443684
},
{
"average": 119.7139,
"count": 110000,
"maximum": 228,
"minimum": 55,
"name": "Green",
"position": 13,
"stddev": 30.09249902,
"variance": 905.5584973
},
{
"average": 99.43662727,
"count": 110000,
"maximum": 219,
"minimum": 52,
"name": "Blue",
"position": 14,
"stddev": 24.45077989,
"variance": 597.840637
},
{
"average": 245383.3992,
"count": 110000,
"maximum": 245385.9111,
"minimum": 245379.3984,
"name": "GpsTime",
"position": 15,
"stddev": 1.723592276,
"variance": 2.970770333
}
]
}
}
free(): invalid pointer
Aborted (core dumped)
Here is the output from gdb:
$ gdb bin/pdal
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/pdal...
(No debugging symbols found in bin/pdal)
(gdb) run info ../test/data/las/autzen_trim.las
Starting program: /usr/local/PDAL-2.4.0-src/build/bin/pdal info ../test/data/las/autzen_trim.las
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
{
"file_size": 3742038,
"filename": "../test/data/las/autzen_trim.las",
"now": "2022-04-29T12:07:42-0300",
"pdal_version": "2.4.0 (git-version: Release)",
"reader": "readers.las",
"stats":
{
"bbox":
{
"EPSG:4326":
{
"bbox":
{
"maxx": -123.0689038,
"maxy": 44.0515451,
"maxz": 520.51,
"minx": -123.0734481,
"miny": 44.04990077,
"minz": 406.26
},
"boundary": { "type": "Polygon", "coordinates": [ [ [ -123.073380967734707, 44.049900771055896, 406.26 ], [ -123.073448053467075, 44.05144393835905, 406.26 ], [ -123.068970750521771, 44.051545096157895, 520.51 ], [ -123.0689037813531, 44.050001926236391, 520.51 ], [ -123.073380967734707, 44.049900771055896, 406.26 ] ] ] }
},
"native":
{
"bbox":
{
"maxx": 637179.22,
"maxy": 849497.9,
"maxz": 520.51,
"minx": 636001.76,
"miny": 848935.2,
"minz": 406.26
},
"boundary": { "type": "Polygon", "coordinates": [ [ [ 636001.76, 848935.200000000069849, 406.26 ], [ 636001.76, 849497.900000000023283, 406.26 ], [ 637179.21999999997206, 849497.900000000023283, 520.51 ], [ 637179.21999999997206, 848935.200000000069849, 520.51 ], [ 636001.76, 848935.200000000069849, 406.26 ] ] ] }
}
},
"statistic":
[
{
"average": 636546.405,
"count": 110000,
"maximum": 637179.22,
"minimum": 636001.76,
"name": "X",
"position": 0,
"stddev": 314.9304199,
"variance": 99181.16939
},
{
"average": 849145.7857,
"count": 110000,
"maximum": 849497.9,
"minimum": 848935.2,
"name": "Y",
"position": 1,
"stddev": 124.3281512,
"variance": 15457.48917
},
{
"average": 430.3375248,
"count": 110000,
"maximum": 520.51,
"minimum": 406.26,
"name": "Z",
"position": 2,
"stddev": 14.94118348,
"variance": 223.2389639
},
{
"average": 102.0049727,
"count": 110000,
"maximum": 254,
"minimum": 0,
"name": "Intensity",
"position": 3,
"stddev": 68.58535917,
"variance": 4703.951493
},
{
"average": 1.114218182,
"count": 110000,
"maximum": 4,
"minimum": 1,
"name": "ReturnNumber",
"position": 4,
"stddev": 0.3688939099,
"variance": 0.1360827168
},
{
"average": 1.228854545,
"count": 110000,
"maximum": 4,
"minimum": 1,
"name": "NumberOfReturns",
"position": 5,
"stddev": 0.5309262708,
"variance": 0.281882705
},
{
"average": 0.5090727273,
"count": 110000,
"maximum": 1,
"minimum": 0,
"name": "ScanDirectionFlag",
"position": 6,
"stddev": 0.4999199512,
"variance": 0.2499199576
},
{
"average": 0,
"count": 110000,
"maximum": 0,
"minimum": 0,
"name": "EdgeOfFlightLine",
"position": 7,
"stddev": 0,
"variance": 0
},
{
"average": 1.237336364,
"count": 110000,
"maximum": 2,
"minimum": 1,
"name": "Classification",
"position": 8,
"stddev": 0.4254520651,
"variance": 0.1810094597
},
{
"average": -8.288418182,
"count": 110000,
"maximum": -1,
"minimum": -18,
"name": "ScanAngleRank",
"position": 9,
"stddev": 2.643634952,
"variance": 6.98880576
},
{
"average": 125.1248727,
"count": 110000,
"maximum": 135,
"minimum": 117,
"name": "UserData",
"position": 10,
"stddev": 2.710253416,
"variance": 7.345473579
},
{
"average": 7326,
"count": 110000,
"maximum": 7326,
"minimum": 7326,
"name": "PointSourceId",
"position": 11,
"stddev": 0,
"variance": 0
},
{
"average": 111.4174727,
"count": 110000,
"maximum": 236,
"minimum": 40,
"name": "Red",
"position": 12,
"stddev": 36.82992919,
"variance": 1356.443684
},
{
"average": 119.7139,
"count": 110000,
"maximum": 228,
"minimum": 55,
"name": "Green",
"position": 13,
"stddev": 30.09249902,
"variance": 905.5584973
},
{
"average": 99.43662727,
"count": 110000,
"maximum": 219,
"minimum": 52,
"name": "Blue",
"position": 14,
"stddev": 24.45077989,
"variance": 597.840637
},
{
"average": 245383.3992,
"count": 110000,
"maximum": 245385.9111,
"minimum": 245379.3984,
"name": "GpsTime",
"position": 15,
"stddev": 1.723592276,
"variance": 2.970770333
}
]
}
}
free(): invalid pointer
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff6516859 in __GI_abort () at abort.c:79
#2 0x00007ffff658129e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff66ab298 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3 0x00007ffff658932c in malloc_printerr (str=str@entry=0x7ffff66a94c1 "free(): invalid pointer") at malloc.c:5347
#4 0x00007ffff658ab5c in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:4173
#5 0x00007ffff2bd0c20 in osgeo::proj::common::UnitOfMeasure::~UnitOfMeasure() () from /lib/x86_64-linux-gnu/libproj.so.15
#6 0x00007ffff653b00e in __cxa_finalize (d=0x7ffff2e0e000) at cxa_finalize.c:83
#7 0x00007ffff2bc63e7 in ?? () from /lib/x86_64-linux-gnu/libproj.so.15
#8 0x00007fffffffe090 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
So it seems to be complaining about something in my libproj.so.15. I have proj 7.2.1 installed in /usr/local/proj-7.2.1, with no other package manager versions installed, if that helps.