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

VTK: enable VTK_USE_SYSTEM_<library> for all 3rd-party dependencies #1627

Open
5 of 8 tasks
albertziegenhagel opened this issue Aug 10, 2017 · 13 comments
Open
5 of 8 tasks
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@albertziegenhagel
Copy link
Contributor

albertziegenhagel commented Aug 10, 2017

Currently the VTK port builds and distributes an own version for some of its 3rd-party dependencies.

These should be transitioned to use libraries build by vcpkg via the VTK_USE_SYSTEM_<library> option. The following libraries are still build by VTK:

  • GL2PS
  • JPEG (maybe we can use libjpeg-turbo which is available in VCPKG)
  • LIBHARU
  • LIBPROJ4 (already available in VCPKG)
  • LZ4 (already available in VCPKG)
  • NETCDFCPP (uses an old, deprecated version. We probably can not provide this, until VTK updates that; maybe they will fix that to resolve https://gitlab.kitware.com/paraview/paraview/issues/17617)
  • NETCDF (already available in VCPKG; blocked by NETCDFCPP)
  • OGGTHEORA (already available in VCPKG)
@albertziegenhagel
Copy link
Contributor Author

JPEG, LIBPROJ4 and LZ4 will be enabled by #1601.

Enabling OGGTHEORA depends on #1547.

@alexkaratarakis
Copy link
Contributor

#1547 has been merged, so oggtheora can now be depended on.

@albertziegenhagel
Copy link
Contributor Author

OGGTHEORA will be enabled by #1632

@atkawa7
Copy link
Contributor

atkawa7 commented Aug 15, 2017

@albertziegenhagel See #1647 #1646

@albertziegenhagel
Copy link
Contributor Author

Great! Thanks! I will update the VTK port as soon as the PRs are merged.

@albertziegenhagel
Copy link
Contributor Author

I could not enable libharu or gl2ps for VTK.

libharu is blocked by #1652.

gl2ps is blocked because VTK actually uses a modified version of gl2ps (they introduced a function called gl2psTextOptColorBL which is not available in the original version of gl2ps). I will open an issue for that on the VTK issue tracker and ask them how to resolve that.

@atkawa7
Copy link
Contributor

atkawa7 commented Aug 17, 2017

@albertziegenhagel I think they didn't introduce it. It already exists here
http://gitlab.onelab.info/gl2ps/gl2ps/blob/master/gl2ps.c#L6209-6215

@albertziegenhagel
Copy link
Contributor Author

You are right. So it seems that VTK actually uses a mixed version.

They have gl2psTextOptColorBL from gl2ps > 1.4.0, but at the same time they have gl2psAddPolyPrimitive taking the arguments of gl2ps 1.3.9.

The version macros in the gl2ps.h distributed with VTK actually say it's 1.3.9, so I assume they started with 1.3.9 and then applied some of the patches manually, diverging from the actual development of gl2ps.

I think it should be easy to apply a patch to VTK so that it will work with gl2ps master, but not with the currently stable 1.4.0.

@alexkaratarakis @ras0219-msft what would be the best procedure here? I don't think that having VTK do depend on gl2ps being installed with --head is a good idea. On the other hand, if we make the current master of gl2ps the stable version, this would probably not work with any future ports that assume gl2ps 1.4.0.

@ras0219-msft ras0219-msft added the category:port-bug The issue is with a library, which is something the port should already support label Aug 24, 2017
@ras0219-msft
Copy link
Collaborator

I don't think that having VTK do depend on gl2ps being installed with --head is a good idea.

Completely agree, we shouldn't do that. Every checked-in library should work with every other checked-in library.

Another option would be to patch our copy of gl2ps exactly how VTK is patching it (assuming it is using the function definition from ~master). This approach might preclude us from updating to 1.4.0 however, which could be problematic if gl2ps is used outside VTK (I don't know the answer to this).

The argument against using the latest gl2ps master instead of the latest stable would be exactly as you've stated: other ports (or users) relying directly on gl2ps might break. This may or may not be concerning depending on how popular gl2ps is outside of VTK. I know VTK is pretty popular, but I don't know anything about gl2ps.

If neither of the above work, I think it would be best to just mark this particular dependency as a "to look at in the future once gl2ps releases 1.4.1", at which point we can look at patching VTK to use the latest master. For now, we would just leave it having a separate compilation of gl2ps and hope it doesn't cause too many issues.

@ras0219-msft ras0219-msft added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Aug 24, 2017
@albertziegenhagel
Copy link
Contributor Author

Libharu will be enabled by #1723.

I've checked which packages depend on gl2ps in homebrew-core and homebrew-science and it seems there is only OpenCASCADE and Octave (both as optional dependency). Homebrew itself still builds gl2ps 1.3.9. For VTK they do not use the SYSTEM package, but rely on the gl2ps build by VTK.

OpenCASCADE is a pretty popular CAD kernel, so at least there is the potential that it becomes popular when added to vcpkg as well. Octave, being a free alternative for Matlab, is of course very popluar, but I do not know the exact reasons why one would like to build this by oneself instead of just downloading the pre-build binary packages.

I would say for now we could just stick with VTK building gl2ps itself, just like Homebrew does. Maybe we are lucky and gl2ps 1.4.1 will be released before OpenCASCADE or Octave are added to vcpkg :)

@luzpaz
Copy link
Contributor

luzpaz commented Feb 8, 2019

@albertziegenhagel any follow-up on this?

@albertziegenhagel
Copy link
Contributor Author

There is still no gl2ps 1.4.1 as far as I can see. And VTK still depends on a version > 1.4.0 if I understand the latest commit to the gl2ps code within the VTK repository correctly [1]. So I don't think anything has changed yet...

[1] https://gitlab.kitware.com/vtk/vtk/commit/fdbb98be6ef70ab8a6b6e6dfb24d6ce83647f959

@JonLiu1993
Copy link
Member

@albertziegenhagel ,VTK update to 9.0.3-pv5.9.1,and gl2ps update version to 1.4.2,Has this list been updated?

@Cheney-W Cheney-W assigned FrankXie05 and unassigned JackBoosY Dec 6, 2022
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 category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

No branches or pull requests

9 participants