# unsuitable gl2ps and libharu version

**URL:** https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906
**Category:** Support
**Created:** [March 29, 2020, 8:11am UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906 "2020-03-29T08:11:27Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![hubutui](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hubutui/32/1481_2.png) [@hubutui](https://discourse.vtk.org/u/hubutui)
#### Post date: [March 29, 2020, 8:11am UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/1 "2020-03-29T08:11:27Z")

</div>

cmake complains unsuitable version of gl2ps and libharu. cmake says vtk needs gl2ps 1.4.1 but found 1.4.0, and vtk needs libhairu 2.4.0 but found 2.3.0 . However, according to [http://geuz.org/gl2ps/](http://geuz.org/gl2ps/) and [http://libharu.org/](http://libharu.org/), the latest release of gl2ps is 1.4.0, and the latest release of libharu is 2.3.0.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [March 29, 2020, 5:08pm UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/2 "2020-03-29T17:08:54Z")

</div>

Our imports have patches applied that VTK needs that have not been accepted/released by upstream yet.

- [https://gitlab.kitware.com/vtk/vtk/-/blob/master/ThirdParty/gl2ps/CMakeLists.txt#L9](https://gitlab.kitware.com/vtk/vtk/-/blob/master/ThirdParty/gl2ps/CMakeLists.txt#L9)
- [https://gitlab.kitware.com/vtk/vtk/-/blob/master/ThirdParty/libharu/CMakeLists.txt#L8](https://gitlab.kitware.com/vtk/vtk/-/blob/master/ThirdParty/libharu/CMakeLists.txt#L8)

Some Linux distros have pulled these patches into their main packages (and likely patched VTK to accept their version numbers).

---

<div class="post-metadata">

### Author: ![KBentley57](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kbentley57/32/3506_2.png) [@KBentley57](https://discourse.vtk.org/u/KBentley57)
#### Post date: [June 3, 2021, 12:47pm UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/3 "2021-06-03T12:47:58Z")

</div>

Ben,

There’s a small bit of a rub with this, when combined with the option VTK\_USE\_EXTERNAL=ON. For users like myself who are compiling vtk from scratch, along with the dependencies from scratch, there’s no way to reconcile the libharu, and likely the other package. Admittedly, I know this is a small subset of users, but is there a possibility to get the patches that are applied to the libharu source, so that I can bring the external dep. from the git release 2.3.0 RC2 up to date? As far as I can tell Debian is still rocking 2.3.0, or at least that’s what apt-cache shows. Same for glps.

Thanks!

Kyle

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [June 3, 2021, 1:27pm UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/4 "2021-06-03T13:27:07Z")

</div>

> [@KBentley57](#):
>
> there’s no way to reconcile the libharu, and likely the other package

That’s because any upstream build you have doesn’t have the patches that provide the API we need. AFAIK, both upstreams have been pretty dormant, so 2.3.0 is probably the latest release anyways. The version is at 2.4.0 in the hope that such a release would have the API we need.

---

<div class="post-metadata">

### Author: ![KBentley57](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kbentley57/32/3506_2.png) [@KBentley57](https://discourse.vtk.org/u/KBentley57)
#### Post date: [June 3, 2021, 2:45pm UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/5 "2021-06-03T14:45:13Z")

</div>

Ben,

I had noticed that they hadn’t had any commits in quite a long time. With that being the case would you be open to adding an option that effectively overrides the other option for these two packages? Even if it’s undocumented? Something that would effectively allow VTK\_USE\_EXTERNAL=TRUE while still building libharu and gl2ps internally. I think I can probably set the VTK\_USE\_$MODULE variables to true/false individually, but that’s a bit of boilerplate I’d rather avoid if I could. Or is it the case that it’s all or nothing in a sense? Do some of the targets in libharu depend on targets in the other directories?

Thanks,

Kyle

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [June 3, 2021, 3:53pm UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/6 "2021-06-03T15:53:38Z")

</div>

> [@KBentley57](#):
>
> With that being the case would you be open to adding an option that effectively overrides the other option for these two packages?

Already exists 🙂 . Try `VTK_MODULE_USE_EXTERNAL_VTK_libharu`. `VTK_USE_EXTERNAL` just sets the default for all of these variables, but they’re individually controllable.

---

<div class="post-metadata">

### Author: ![KBentley57](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kbentley57/32/3506_2.png) [@KBentley57](https://discourse.vtk.org/u/KBentley57)
#### Post date: [June 3, 2021, 3:55pm UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/7 "2021-06-03T15:55:30Z")

</div>

> [@ben.boeckel](#):
>
> `TK_MODULE_USE_EXTERNAL_VTK_libharu`

Thanks! I thought I’d grep’d hard enough, :).

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [June 4, 2021, 12:50am UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906/8 "2021-06-04T00:50:52Z")

</div>

The documentation for every flag that affects the build (that isn’t defined and documented in CMake for every CMake project) is in [this file](https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/build.md). Sometimes new flags sneak in without that being updated, but I try to keep it up-to-date.
