-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
VTK Dependency Audit #17963
Comments
Per platform checklist, assigning @jwnimmer-tri as lead for delegation etc. |
Updates from f2f today: Most likely the only remaining work is to deal with these three libraries:
See TODOs in drake/tools/workspace/vtk_internal/settings.bzl Lines 526 to 532 in d718147
drake/tools/workspace/vtk_internal/settings.bzl Lines 550 to 555 in d718147
drake/tools/workspace/vtk_internal/settings.bzl Lines 561 to 566 in d718147
The goal is to make sure all three of those are properly vendored, ideally with Remember that libtiff got angry last time we tried this. Figure out why. |
External dependencies for the VTK builds need to be inspected. From #16502 (comment)
Relates: #17962
There are three external dependencies shared between drake and the VTK tarball build:
There are also third party dependencies that the VTK build vendors that we can reduce:
Eigen
Drake installs this via the package manager (
apt
/brew
). However, there are additional considerations.https://gitlab.kitware.com/vtk/vtk/-/blob/fcc6af2c07bffcd918e89917f9aad592424dc846/ThirdParty/eigen/vtk_eigen.h.in#L26-L30
The implications:
Forces
EIGEN_MPL2_ONLY
(for the vtk build).Does not affect VTK headers, only source files.
If the user does "normal" drake,
apt
build will have used the same thing.brew
install might have been the same (depends on when we build vs user installed things).If th user supplies their own Eigen, all bets are off
Switching to VTK vendored Eigen might be the right call?
png
Considerations for removing:
vtkPNGReader
instead:drake/systems/sensors/lcm_image_array_to_images.cc
Line 5 in 894ac55
vtkPNGReader
, we could switch tovtkpng
library and use the mangled symbols in drake: https://gitlab.kitware.com/vtk/vtk/-/blob/fcc6af2c07bffcd918e89917f9aad592424dc846/ThirdParty/png/vtkpng/vtk_png_mangle.hzlib
I don't think we should be doing anything about this one. There is, as far as I know, no way for the user to override the
zlib
choice. On Ubuntu it comes fromapt-get
, on macOS it comes from the system (xcode bundled and linked in statically).If we did switch to the VTK one, it would be mangled, and therefore we could stop building it in the wheel: https://github.com/RobotLocomotion/drake/blob/894ac55aa493ecca4bf43379b61447fcc99fbe0c/tools/wheel/image/dependencies/projects/zlib.cmake
Freetype
While developing, we noticed that the
vtkIOExport
module forces a lot of dependencies on us that we do not want, e.g.,vtkRenderingFreetype
:https://gitlab.kitware.com/vtk/vtk/-/blob/fcc6af2c07bffcd918e89917f9aad592424dc846/IO/Export/vtk.module#L15
We need that module for
vtkGLTFExporter
, and nothing else.vtkIOExport
to only build the exporter we need. This should be simple to create and maintain, but the original investigation took place while sorting out all of the other dependencies and I made a mistake.vtkGLTFExporter
becomes its own module).from vtkmodules.vtkA import vtkX
now needs to befrom vtkmodules.vtkB import vtkX
when a class moves aroundvtkA
still havevtkX
(preferably with a deprecation warning)Showing people how (1) works is the easiest way to get the discussion started, in our case it lets us get rid of the freetype dependency.
The text was updated successfully, but these errors were encountered: