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

[MSVC] Compile error in openvdb\points\AttributeSet.cc with c++20 or later #13390

Open
1 of 2 tasks
NEIL-smtg opened this issue Sep 18, 2024 · 0 comments
Open
1 of 2 tasks
Labels
Build Build issues

Comments

@NEIL-smtg
Copy link

NEIL-smtg commented Sep 18, 2024

Description of the bug

I work on MSVC compiler testing, and we regularly build popular open-source project including PrusaSlicer, with development builds of MSVC in order to find and fix regressions before they ship and cause problems for you.

Recently, as I build PrusaSlicer from source with MSVC, I encountered the following error:

C:\gitP\prusa3d\PrusaSlicer\deps\PrusaSlicer-deps\dep_OpenVDB-prefix\src\dep_OpenVDB\openvdb\openvdb\points\AttributeSet.cc(270,25): error C2039: 'unique': is not a member of 'std::shared_ptr<openvdb::v8_2::points::AttributeArray>'
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\include\memory(1560,7): note: see declaration of 'std::shared_ptr<openvdb::v8_2::points::AttributeArray>'
C:\gitP\prusa3d\PrusaSlicer\deps\PrusaSlicer-deps\dep_OpenVDB-prefix\src\dep_OpenVDB\openvdb\openvdb\points\AttributeSet.cc(279,22): error C2039: 'unique': is not a member of 'std::shared_ptr<openvdb::v8_2::points::AttributeArray>'
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\include\memory(1560,7): note: see declaration of 'std::shared_ptr<openvdb::v8_2::points::AttributeArray>'

I look it up in openVDB and found out that they have committed a fix #98176b for this issue last year. Any chance you guys can update your copy of openVDB?

Project file & How to reproduce

Repro Step:

  1. Open x64 native tools command prompt for VC2022
  2. git clone https://github.com/prusa3d/PrusaSlicer.git
  3. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set CL=/std:c++latest
  4. mkdir C:\gitP\prusa3d\PrusaSlicer\deps\PrusaSlicer-deps
  5. cd /d C:\gitP\prusa3d\PrusaSlicer\deps\PrusaSlicer-deps
  6. cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DCMAKE_BUILD_TYPE=Release .. 2>&1
  7. msbuild /m /p:Platform=x64 /p:Configuration=Release ALL_BUILD.vcxproj /t:Rebuild 2>&1

Simple repro after msbuild:

  1. Download AttributeSet.txt
    Note: Modify the path to include folders and AtrributeSet.cc in AttributeSet.txt based on where you git clone the repo or this command will not work
  2. cl @AttributeSet.txt

Build log: ps.txt

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

latest commit

Operating system

windows 11

Printer model

@NEIL-smtg NEIL-smtg changed the title Compile error in openvdb\points\AttributeSet.cc with c++20 or later [MSVC] Compile error in openvdb\points\AttributeSet.cc with c++20 or later Sep 19, 2024
@Jan-Soustruznik Jan-Soustruznik added the Build Build issues label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Build issues
Projects
None yet
Development

No branches or pull requests

2 participants