Skip to content

configure: update PDAL compilation test - #7377

Closed
neteler wants to merge 2 commits into
OSGeo:mainfrom
neteler:autoconf_fix_PDAL_conftest
Closed

neteler wants to merge 2 commits into
OSGeo:mainfrom
neteler:autoconf_fix_PDAL_conftest

Conversation

@neteler

@neteler neteler commented May 9, 2026

Copy link
Copy Markdown
Member

WIP

With Fedora 45 the autoconf based PDAL test fails (both in G85 and main).

Fedora 45 ships:

  • PDAL-libs-2.10.1-2.fc45.x86_64
  • PDAL-devel-2.10.1-2.fc45.x86_64

This PR correctly retrieves the PDAL-related CPP flags and uses them for the configure test.

Note that there are still undeclared definitions, see:

configure:10554: checking whether to use PDAL
configure:10573: result: yes
configure:10603: g++ -std=gnu++11 -o conftest -g -Wall  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wl,--no-undefined -Wl,-z,now -Wl,--export-dynamic conftest.cpp  -L/usr/lib -lpdalcpp >&5
In file included from /usr/include/pdal/pdal_types.hpp:49,
                 from /usr/include/pdal/pdal_internal.hpp:42,
                 from /usr/include/pdal/SpatialReference.hpp:37,
                 from /usr/include/pdal/PointTable.hpp:41,
                 from conftest.cpp:59:
/usr/include/pdal/util/Utils.hpp:979:31: error: 'std::enable_if_t' has not been declared
  979 |     template<typename T, std::enable_if_t<!std::is_integral<T>::value>* = nullptr>
      |                               ^~~~~~~~~~~
/usr/include/pdal/util/Utils.hpp:979:31: note: 'std::enable_if_t' is only available from C++14 onwards
/usr/include/pdal/util/Utils.hpp:979:42: error: expected '>' before '<' token
  979 |     template<typename T, std::enable_if_t<!std::is_integral<T>::value>* = nullptr>

[...]

Might the reason be -std=gnu++11?

Edits of this PR are welcome.

WIP

With Fedora 45 the autoconf based PDAL test fails with undeclared definitions, see:

```sh
configure:10554: checking whether to use PDAL
configure:10573: result: yes
configure:10603: g++ -std=gnu++11 -o conftest -g -Wall  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wl,--no-undefined -Wl,-z,now -Wl,--export-dynamic conftest.cpp  -L/usr/lib -lpdalcpp >&5
In file included from /usr/include/pdal/pdal_types.hpp:49,
                 from /usr/include/pdal/pdal_internal.hpp:42,
                 from /usr/include/pdal/SpatialReference.hpp:37,
                 from /usr/include/pdal/PointTable.hpp:41,
                 from conftest.cpp:59:
/usr/include/pdal/util/Utils.hpp:979:31: error: 'std::enable_if_t' has not been declared
  979 |     template<typename T, std::enable_if_t<!std::is_integral<T>::value>* = nullptr>
      |                               ^~~~~~~~~~~
/usr/include/pdal/util/Utils.hpp:979:31: note: 'std::enable_if_t' is only available from C++14 onwards
/usr/include/pdal/util/Utils.hpp:979:42: error: expected '>' before '<' token
  979 |     template<typename T, std::enable_if_t<!std::is_integral<T>::value>* = nullptr>

[...]
```

This PR correctly retrieves the CPP flags and uses them for the configure test.
@neteler neteler added this to the 8.5.1 milestone May 9, 2026
@neteler neteler added CI Continuous integration backport to 8.5 PR needs to be backported to release branch 8.5 labels May 9, 2026
@neteler neteler modified the milestones: 8.5.1, 8.6.0 May 9, 2026
@neteler

neteler commented May 9, 2026

Copy link
Copy Markdown
Member Author

Update:

The PDAL test compiles with CXX="g++ -std=gnu++17":

GRASS is now configured for:  x86_64-pc-linux-gnu
  Source directory:           /data
  Build directory:            /data
  Installation directory:     ${prefix}/grass85
  Startup script in directory:${exec_prefix}/bin
  C compiler:                 gcc -g -O2 
  C++ compiler:               g++ -std=gnu++17 -g -O2
[...]

How to inject it apart from using CXX="g++ -std=gnu++17" ?

@nilason

nilason commented May 9, 2026

Copy link
Copy Markdown
Contributor

PDAL is C++17, so why not pass CXXFLAGS="-std=c++17", actually officially we are too.

@nilason

nilason commented May 9, 2026

Copy link
Copy Markdown
Contributor

... I don't think the configure.ac needs modifications, CXXFLAGS="-std=c++17" should be enough.

@nilason

nilason commented May 9, 2026

Copy link
Copy Markdown
Contributor

I believe, package distribution systems usually have a common way to handle what standard a software needs to be built with.

@neteler neteler closed this May 9, 2026
@neteler neteler removed the backport to 8.5 PR needs to be backported to release branch 8.5 label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants