Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build with pdal 2.6 #54958

Closed
2 tasks done
landryb opened this issue Oct 17, 2023 · 4 comments
Closed
2 tasks done

fix build with pdal 2.6 #54958

landryb opened this issue Oct 17, 2023 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers

Comments

@landryb
Copy link
Contributor

landryb commented Oct 17, 2023

What is the bug or the crash?

cmake will fail to find a systemwide PDAL if the latter is 2.6, since pdal_util lib was folded into pdalcpp, cf PDAL/PDAL#4139

https://github.com/qgis/QGIS/blob/master/cmake/FindPDAL.cmake#L36 needs to be amended to cope with that, eg look for pdal_util lib only if the found version is older than 2.6 ? or even not link with it, if that's not necessary ?

Steps to reproduce the issue

try building with a systemwide pdal 2.6.0:

CMake Error at cmake/FindPDAL.cmake:76 (MESSAGE):
  Could not find PDAL

Versions

3.32.3 on OpenBSD

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

i ofc have a local trivial patch for OpenBSD ports but it doesnt take into account pre 2.6 versions so not sure its wise to upstream as is.... maybe reuse the pdal version bits looked for a bit later in the cmake file ?

@landryb landryb added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 17, 2023
@lbartoletti
Copy link
Member

@landryb can you try #54940 please?

@agiudiceandrea agiudiceandrea added the Feedback Waiting on the submitter for answers label Oct 17, 2023
@landryb
Copy link
Contributor Author

landryb commented Oct 18, 2023

will do, i had a successfull build with my hacked out patch below:

Index: cmake/FindPDAL.cmake
--- cmake/FindPDAL.cmake.orig
+++ cmake/FindPDAL.cmake
@@ -33,13 +33,6 @@ FIND_LIBRARY(PDAL_CPP_LIBRARY NAMES pdalcpp libpdalcpp
   )
 FIND_LIBRARY(PDAL_CPP_LIBRARY NAMES pdalcpp libpdalcpp)
 
-FIND_LIBRARY(PDAL_UTIL_LIBRARY NAMES pdal_util libpdal_util PATHS
-  "$ENV{LIB_DIR}/lib"
-  c:/msys/local/lib
-  NO_DEFAULT_PATH
-  )
-FIND_LIBRARY(PDAL_UTIL_LIBRARY NAMES pdal_util libpdal_util)
-
 FIND_PROGRAM(PDAL_BIN pdal
     $ENV{LIB_DIR}/bin
     /usr/local/bin/
@@ -48,10 +41,10 @@ FIND_PROGRAM(PDAL_BIN pdal
     )
 FIND_PROGRAM(PDAL_BIN pdal)
 
-IF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_UTIL_LIBRARY AND PDAL_BIN)
+IF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_BIN)
    SET(PDAL_FOUND TRUE)
-   SET(PDAL_LIBRARIES ${PDAL_CPP_LIBRARY} ${PDAL_UTIL_LIBRARY})
-ENDIF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_UTIL_LIBRARY AND PDAL_BIN)
+   SET(PDAL_LIBRARIES ${PDAL_CPP_LIBRARY})
+ENDIF (PDAL_INCLUDE_DIR AND PDAL_CPP_LIBRARY AND PDAL_BIN)
 
 IF (PDAL_FOUND)
     # extract PDAL version

@landryb
Copy link
Contributor Author

landryb commented Oct 18, 2023

3.32.3 builds fine with pdal 2.6.0 and the pr #54940 applied

@lbartoletti
Copy link
Member

Merged, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers
Projects
None yet
Development

No branches or pull requests

3 participants