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

Build failure with PDAL 2.4.0 #48110

Closed
2 tasks
nilason opened this issue Apr 6, 2022 · 5 comments · Fixed by #48660
Closed
2 tasks

Build failure with PDAL 2.4.0 #48110

nilason opened this issue Apr 6, 2022 · 5 comments · Fixed by #48660
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@nilason
Copy link
Contributor

nilason commented Apr 6, 2022

What is the bug or the crash?

Implementation changes of PDAL 2.4.0 causes build failure of (at least) QGIS 3.22.2.
Reported originally at https://trac.macports.org/ticket/64856 :

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_22_2/src/providers/pdal/qgspdalprovider.cpp:235:27: error: call to implicitly-deleted copy constructor of 'const pdal::LasHeader'
:info:build     const pdal::LasHeader las_header = las_reader.header();
:info:build                           ^            ~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/pdal/io/LasHeader.hpp:295:30: note: copy constructor of 'LasHeader' is implicitly deleted because field 'd' has a deleted copy constructor
:info:build     std::unique_ptr<Private> d;
:info:build                              ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__memory/unique_ptr.h:213:3: note: copy constructor is implicitly deleted because 'unique_ptr<pdal::LasHeader::Private>' has a user-declared move constructor
:info:build   unique_ptr(unique_ptr&& __u) _NOEXCEPT
:info:build   ^

Changing the line:

const pdal::LasHeader las_header = las_reader.header();

to

const pdal::LasHeader& las_header = las_reader.header(); 

might possibly fix it.

Steps to reproduce the issue

  1. Build QGIS with PDAL 2.4.0
  2. Compilation fails

Versions

3.22.2+

Supported QGIS version

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

New profile

  • I tried with a new QGIS profile

Additional context

No response

@nilason nilason added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Apr 6, 2022
@Pedro-Murteira Pedro-Murteira added the Build/Install Related to compiling or installing QGIS label Apr 6, 2022
@lbartoletti lbartoletti self-assigned this May 18, 2022
@lbartoletti
Copy link
Member

@nilason I can't reproduce the build failure on my workstation. But, I think it's related to the C++ ABI and/or LLVM version.

What is the clang/llvm's version used by macports?

For me, it's OK with clang11. I'm trying with clang13 -- We have already fixed a build failure with this specific version.

@lbartoletti
Copy link
Member

But using a const ref, seems ok for me.

@nilason
Copy link
Contributor Author

nilason commented May 18, 2022

According to reported build log: AppleClang 13.1.6.13160021

@nilason
Copy link
Contributor Author

nilason commented May 18, 2022

For reference, there was a similar problem with GRASS (OSGeo/grass#2277).

@nilason
Copy link
Contributor Author

nilason commented May 22, 2022

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! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants