Skip to content

[VTK] Fix build error when IOCCT is selected as feature - #53476

Draft
Lars Glud (larshg) wants to merge 9 commits into
microsoft:masterfrom
larshg:larshg/vtk-occt-8-cxx17-fix
Draft

[VTK] Fix build error when IOCCT is selected as feature#53476
Lars Glud (larshg) wants to merge 9 commits into
microsoft:masterfrom
larshg:larshg/vtk-occt-8-cxx17-fix

Conversation

@larshg

@larshg Lars Glud (larshg) commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #53475

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version, or no changes were necessary.
  • Any fixed CI baseline and CI feature baseline entries are removed from that file, or no entries needed to be changed.
  • All patch files in the port are applied and succeed.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.

Renamed opencascaded patch file as it patches for multiple versions

Lars Glud (larshg) and others added 3 commits August 18, 2026 11:06
…res is selected.

Fix compiler warnings about types and collection.
Rename opencascade patch filename, since it covers multiple versions.

@BillyONeal Billy O'Neal (BillyONeal) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

larshg#1 will fix version database

Renamed opencascaded patch file as it patches for multiple versions - should I remove old fixes for pre 8.0.1?

I don't see any reason to do that, at least until they no longer apply because upstream has effectively set their target version later than that.

Should I change:
vtk[ioocct]=skip

to

vtk[ioocct]=cascade

in ci.feature.baseline.txt?

Looks like this was done back in #47210 (comment) . It is likely you will need to do further investigation in order to remove the skip but I think it would be welcome.

Comment thread ports/vtk/portfile.cmake
endif()

if("ioocct" IN_LIST FEATURES)
# OCCT 8.0's headers require C++17. VTK's own CMake forces CMAKE_CXX_STANDARD to 11 unless told

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should be updating VTK instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that could be done, but its a large effort with a lot of dependencies and currently out of my timeframe atm.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VTK et al. update is pending in #52532, only stopped by viskores (aka vtk-m) CUDA DLL woes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The viskores troubles is split out to #53088.)

Comment thread ports/vtk/opencascade.patch Outdated
Comment on lines +68 to +69
- Standard_Integer shift = 0;
+ int shift = 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear to me that these types of changes are safe; has this been submitted upstream?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revert these ones - they were only deprecation warnings that it should be changed to built in types. Not per se required for compilation.

Comment thread ports/vtk/portfile.cmake
# otherwise, which combined with Eigen3's cxx_std_14 requirement causes some targets to compile
# as c++14 instead of 17, so both need to be overridden together.
list(APPEND ADDITIONAL_OPTIONS
-DVTK_IGNORE_CMAKE_CXX11_CHECKS=ON

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it might be a dangerous option to turn on without justification here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is not on, it defaults to c++11, but eigens requirements raises that to c++14 and somehow enforces this on some targets, but having this all of them becomes c++17 targets.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a permalink comment which helps describe that it is safe to do?

@BillyONeal
Billy O'Neal (BillyONeal) marked this pull request as draft August 18, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VTK] build failure with IOOCCT enabled

3 participants