Skip to content

Conversation

@qbisi
Copy link

@qbisi qbisi commented Aug 19, 2025

fix build failure on darwin platform when USE_VTK=ON

@qbisi
Copy link
Author

qbisi commented Aug 20, 2025

VTK_USE_X is set in vtk-config.cmake in vtk>=9.4.0, hence the ci failed.

should i replace "NOT VTK_USE_X" with "APPLE" ?

@dpasukhi
Copy link
Member

dpasukhi commented Aug 20, 2025

Dear @qbisi
Could you explain the reason?
Draw plugins required something unsupported? I probably get the point about gxl. In that case, we probably can proceed with integration.
The question is: before 9.4.0 X was required to be enabled for build?

@qbisi
Copy link
Author

qbisi commented Aug 20, 2025

Draw plugins required something unsupported?

Generally speaking, we can't compile toolkit TKIVtkDraw when vtk is configured VTK_USE_X=OFF, otherwise, a compilation error

/tmp/nix-build-opencascade-occt-7.8.1.drv-0/occt-V7_8_1-bd2a789/src/IVtkDraw/IVtkDraw.cxx:85:12: fatal error: 'vtkXRenderWindowInteract
or.h' file not found
   85 |   #include <vtkXRenderWindowInteractor.h>

will raise due to missing of some vtk related header, this header will be provided only when vtk is configured with VTK_USE_X=ON, which is the default value on linux platform (on darwin the default is OFF) for any VTK version.

The question is: before 9.4.0 X was required to be enabled for build?

However, VTK_USE_X is set in vtk-config.cmake only in vtk>=9.4.0, For vtk<9.4.0, we can not infer from VTK_USE_X to decide if we can build TKIVtkDraw, maybe we should try to test header file "vtkXRenderWindowInteractor.h" in vtk.cmake module.

@qbisi
Copy link
Author

qbisi commented Oct 8, 2025

Hi, is there any way we can valid this pr? I think this pull request is at least doing the right thing for VTK ≥ 9.4, and not causing any issues for VTK < 9.4 According to repology, Debian Experimental/Fedora Rawhide/Homebrew/Arch linux/Nixpkgs have already upgraded VTK to the latest 9.5.2.

@dpasukhi
Copy link
Member

dpasukhi commented Oct 8, 2025

Thank you for reminder. Yes, originally commit looks as a stable. But I need a little deep down to validate it. I will try to review it during next week.
It is workaround and I need to know the price for correct fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants