libLAS / libLAS

C++ library and programs for reading and writing ASPRS LAS format with LiDAR data

Home Page:http://liblas.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to build with GDAL 2.5.0

sebastic opened this issue · comments

The liblas Debian package failed to build with GDAL 2.5.0-beta1:

/build/liblas-1.8.1/src/gt_wkt_srs.cpp:496:18: error: 'class OGRSpatialReference' has no member named 'FixupOrdering'
             oSRS.FixupOrdering();
                  ^~~~~~~~~~~~~

From https://github.com/OSGeo/gdal/blob/v2.5.0beta1/gdal/MIGRATION_GUIDE.TXT:

  • removal of OSRFixup() and OSRFixupOrdering(): no longer needed since objects
    constructed are always valid

Thanks for notification. I'll try to look at it soon

I wonder if we shouldn't make libLAS 1.9.0 have a hard requirement of GDAL 2.5. This would allow us to remove the gt_wkt_srs.cpp stuff entirely. We are considering this for PDAL 2.0 as well, which has embeds of some GeoTIFF stuff for LAS support.

I wonder if we shouldn't make libLAS 1.9.0 have a hard requirement of GDAL 2.5.

👍

And, not bother with 1.8.2, dropping maintenance of 1.8?

After several fights trying to make liblas, that was my last issue. I'm running gdal 3.0.3. Is there any workaround to make it, or we should wait for liblas 1.9.0?

I'm also getting
/home/jeco/.cache/yay/liblas/src/libLAS-1.8.1/src/gt_wkt_srs.cpp:2290:46: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] 2290 | SetGeogCSCitation(psGTIF, poSRS, angUnitName, nDatum, nSpheroid); | ^~~~~~~~~~~ | | | const char*

After removing oSRS.FixupOrdering from 1.8, I am greeted with this error:

root@f4381c014d4e:~/libLAS-1.8.1/makefiles# make
[  1%] Linking CXX shared library ../bin/Release/liblas.so
[ 41%] Built target las
[ 42%] Linking CXX shared library ../bin/Release/liblas_c.so
[ 44%] Built target las_c
[ 45%] Linking CXX executable ../bin/Release/lasinfo
/usr/bin/ld: CMakeFiles/lasinfo.dir/laskernel.cpp.o: undefined reference to symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE8overflowEi@@GLIBCXX_3.4'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [apps/CMakeFiles/lasinfo.dir/build.make:112: bin/Release/lasinfo] Error 1
make[1]: *** [CMakeFiles/Makefile2:281: apps/CMakeFiles/lasinfo.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Any idea why?

Any update on this? Having the same issue

Ran into this issue on Jetson Nano (aarch64), GDAL and libLAS both latest master. Commenting out the three references to FixupOrdering() as suggested by @sebastic solves the build issue. Changes in the latest version of PROJ still makes the tests fail though. :D

I wonder if we shouldn't make libLAS 1.9.0 have a hard requirement of GDAL 2.5. This would allow us to remove the gt_wkt_srs.cpp stuff entirely. We are considering this for PDAL 2.0 as well, which has embeds of some GeoTIFF stuff for LAS support.

Got bitten by this too. Likely it is about time one has some minimum GDAL version requirement. GDAL 2.5 will be 4 years old in the Spring.

Alternatively, one can have some macro based on the variables GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR in gdal_version.h, which is installed by GDAL.