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

[pcl] build failure #44047

Open
Bzz2745 opened this issue Feb 27, 2025 · 8 comments · May be fixed by #44081
Open

[pcl] build failure #44047

Bzz2745 opened this issue Feb 27, 2025 · 8 comments · May be fixed by #44081
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@Bzz2745
Copy link

Bzz2745 commented Feb 27, 2025

Operating system

windows 11

Compiler

MSVC

Steps to reproduce the behavior

`./vcpkg install pcl[cuda,surface-on-nurbs,tools,visualization,vtk]`

Failure logs

Installing 1/2 pcl[core,cuda,surface-on-nurbs,tools,visualization,vtk]:[email protected]...
Building pcl[core,cuda,surface-on-nurbs,tools,visualization,vtk]:[email protected]...
-- Using cached PointCloudLibrary-pcl-pcl-1.15.0.tar.gz
-- Cleaning sources at C:/Users/user/opt/vcpkg/buildtrees/pcl/src/pcl-1.15.0-327f82be19.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/user/opt/vcpkg/downloads/PointCloudLibrary-pcl-pcl-1.15.0.tar.gz
-- Applying patch add-gcc-version-check.patch
-- Applying patch fix-check-sse.patch
-- Applying patch fix-numeric-literals-flag.patch
-- Applying patch install-layout.patch
-- Applying patch install-examples.patch
-- Applying patch fix-clang-cl.patch
-- Using source at C:/Users/user/opt/vcpkg/buildtrees/pcl/src/pcl-1.15.0-327f82be19.clean
-- Found external ninja('1.12.1').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: C:/Users/user/scoop/apps/cmake/3.31.6/bin/cmake.exe --build . --config Release --target install -- -v -j13
Working Directory: C:/Users/user/opt/vcpkg/buildtrees/pcl/x64-windows-rel
See logs for more information:
C:\Users\user\opt\vcpkg\buildtrees\pcl\install-x64-windows-rel-out.log

Additional context

in file C:\Users\user\opt\vcpkg\buildtrees\pcl\install-x64-windows-rel-out.log, the error is:
C:\Users\user\opt\vcpkg\buildtrees\pcl\src\pcl-1.15.0-327f82be19.clean\visualization\include\pcl/visualization/impl/registration_visualizer.hpp(183): error C2039: 'chrono_literals': is not a member of 'std'
and in file registration_visualizer.hpp chrono_literals was only loaded but not used, if it is useable please add #include to this file.

@Bzz2745 Bzz2745 added the category:port-bug The issue is with a library, which is something the port should already support label Feb 27, 2025
@mvieth
Copy link
Contributor

mvieth commented Feb 27, 2025

@Bzz2745 Could you please specify which MSVC version you use? I would like to try to reproduce this.

@Bzz2745
Copy link
Author

Bzz2745 commented Feb 27, 2025

@Bzz2745 Could you please specify which MSVC version you use? I would like to try to reproduce this.

VS2022 , do u need the detail version number?

@mvieth
Copy link
Contributor

mvieth commented Feb 27, 2025

VS2022 , do u need the detail version number?

@Bzz2745 Yes please, because I am wondering if this only happens with very specific MSVC versions.

@Bzz2745
Copy link
Author

Bzz2745 commented Feb 27, 2025

VS2022 , do u need the detail version number?

@Bzz2745 Yes please, because I am wondering if this only happens with very specific MSVC versions.

17.13.2

@LiuPeiqiCN
Copy link
Contributor

same issue.

  • Host: x64-windows
  • Compiler: MSVC 19.43.34808.0
  • vcpkg-tool version: 2025-02-11-bec4296bf5289dc9ce83b4f5095943e44162f9c2
    vcpkg-scripts version: 23b33f5 2025-02-26 (24 hours ago)

visual studio version:17.13.1

@LilyWangLL
Copy link
Contributor

I can repro this issue locally.

@mvieth
Copy link
Contributor

mvieth commented Feb 28, 2025

I have created a patch:

add-chrono-includes.zip

In my tests, this solved all instances of missing chrono includes, but it would be great if someone else could verify this. Then I can create a pull request to add the patch to the PCL port.
By the way, it seems that this behavior change came with MSVC 17.13, see here under "Improved throughput":

Moved system_clock, high_resolution_clock, and chrono_literals from a commonly-included internal header to <chrono>. microsoft/STL#5105

This has source-breaking impact. If you see compiler errors complaining that it doesn't recognize chrono types like system_clock or UDLs like 1729ms, you need to include <chrono> specifically, instead of assuming that headers like <thread> will drag it in.

@Cheney-W
Copy link
Contributor

@mvieth This patch successfully fixed the issue.

@mvieth mvieth linked a pull request Feb 28, 2025 that will close this issue
7 tasks
mvieth added a commit to mvieth/pcl that referenced this issue Feb 28, 2025
Fixes build failure when using MSVC STL 17.13 and newer (see https://github.com/microsoft/STL/releases/tag/vs-2022-17.13 )
See also microsoft/vcpkg#44047
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants