Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885621 - sci-libs/opencascade-7.6.3 fails to build with vtk-9.2.2
Summary: sci-libs/opencascade-7.6.3 fails to build with vtk-9.2.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-12 16:32 UTC by Andrew Nowa Ammerlaan
Modified: 2022-12-14 15:02 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Upstream patch (occt.git-7f523af8e8a63ee17d8fc26f107c191cd51dcd44.patch,1.29 KB, patch)
2022-12-14 15:02 UTC, Bernd Feige
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Nowa Ammerlaan gentoo-dev 2022-12-12 16:32:48 UTC
VTK version (9.2.2)
CMake Error at CMakeLists.txt:818 (message):
Could not find headers of used third-party products:
3RDPARTY_VTK_INCLUDE_DIR


-- Configuring incomplete, errors occurred!

This is opencascade 7.6.3:
[U] sci-libs/opencascade
Available versions:  (~)7.5.2-r6(0/7.5)^t 7.5.3-r8(0/7.5)^t 7.6.3(0/7.6)^t (~)7.7.0(0/7.7)^t {debug doc eigen examples ffmpeg freeimage gles2 gles2-only json optimize tbb vtk}
Installed versions:  7.6.3(0/7.6)^t(17:08:06 22/08/22)(ffmpeg gles2 json vtk -doc -eigen -examples -freeimage -optimize -tbb)
Homepage:            https://www.opencascade.com
Description:         Development platform for CAD/CAE, 3D surface/solid modeling and data exchange

With vtk-9.2.2:
[I] sci-libs/vtk
Available versions:  9.0.3-r5(0/9.0)^t (~)9.1.0-r4(0/9.1)^t (~)9.2.2(0/9.2)^t {+X all-modules (+)boost cuda debug doc examples (+)ffmpeg freetype (+)gdal imaging java +json kits las (+)logging mpi mysql odbc offscreen openmp openvdb pdal pegtl postgres python qt5 qt6 +rendering sdl tbb test theora +threads tk views vtkm webPYTHON_SINGLE_TARGET="python3_8 python3_9 python3_10" VIDEO_CARDS="nvidia"}
Installed versions:  9.2.2(0/9.2)^t(17:14:48 12/12/22)(boost ffmpeg imaging logging openmp python qt5 qt6rendering sdl threads views -all-modules -cuda -debug -doc -examples -freetype -gdal -java -las -mpi -mysql -odbc -openvdb -pdal -postgres -tbb -test -tk -vtkm -web PYTHON_SINGLE_TARGET="python3_10 -python3_8 -python3_9" VIDEO_CARDS="-nvidia")
Homepage:            https://www.vtk.org/
Description:         The Visualization Toolkit
Comment 1 Claus-Justus Heine 2022-12-12 21:13:33 UTC
The same problem occurs with OCC 7.7.0 and 7.5.3-r8.
Comment 2 Claus-Justus Heine 2022-12-12 21:16:10 UTC
(In reply to Claus-Justus Heine from comment #1)
> The same problem occurs with OCC 7.7.0 and 7.5.3-r8.

... and of course also on my side for version mentioned by Andrew, i.e. 7.6.3
Comment 3 Scott Alfter 2022-12-12 22:09:35 UTC
I've worked around it for now by masking >=sci-libs/vtk-9.2, but this won't cut it for the long run.  Even if upgrading opencascade beyond 7.6.3 worked with the newer vtk, the newer opencascade doesn't yet work with several packages I have installed (I think both FreeCAD and KiCad require <7.7).
Comment 4 veig29 2022-12-12 23:30:45 UTC
Hi,

I think the issue is in src_configure() of the ebuild files for opencascade. It doesn't support the 9.2.x version of vtk:

    if use vtk; then
        if has_version ">=sci-libs/vtk-9.1.0"; then
            mycmakeargs+=(
                -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr
                -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1
                -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir)
            )
        elif has_version ">=sci-libs/vtk-9.0.0"; then
            mycmakeargs+=(
                -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr
                -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0
                -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir)
            )
        fi
    fi
Comment 5 Larry the Git Cow gentoo-dev 2022-12-13 14:11:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1c6afa07316c3b71e4a4c37637b69a351d49ac0

commit b1c6afa07316c3b71e4a4c37637b69a351d49ac0
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2022-12-13 13:30:34 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2022-12-13 13:36:52 +0000

    sci-libs/opencascade: ensure vtk include dirs are found
    
    Closes: https://bugs.gentoo.org/885621
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 sci-libs/opencascade/opencascade-7.5.2-r6.ebuild |  2 +-
 sci-libs/opencascade/opencascade-7.5.3-r8.ebuild |  2 +-
 sci-libs/opencascade/opencascade-7.6.3.ebuild    |  2 +-
 sci-libs/opencascade/opencascade-7.7.0.ebuild    | 10 ++++++++--
 4 files changed, 11 insertions(+), 5 deletions(-)
Comment 6 Andrew Nowa Ammerlaan gentoo-dev 2022-12-13 14:13:27 UTC
> I think the issue is in src_configure() of the ebuild files for opencascade. 
> It doesn't support the 9.2.x version of vtk:

Thanks, that was indeed the problem. However, after fixing this version 7.6.3 still does not compile with vtk-6.2.2, so I've had to restrict the dependency to <vtk-6.2.
Comment 7 Bernd 2022-12-14 06:22:47 UTC
Thanks for looking into this Andrew. I'm sorry I didn't had the time yet to check the bug.

v7.6.3 war released far before vtk-9.2. I don't think we should try to make it work with the new version.
Comment 8 Bernd Feige 2022-12-14 15:02:50 UTC
Created attachment 842635 [details, diff]
Upstream patch

For the record: Upstream tracker:
https://tracker.dev.opencascade.org/view.php?id=33164&nbn=2 

Merged commit:
http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commit;h=7f523af8e8a63ee17d8fc26f107c191cd51dcd44

The patch there is actually quite small - I attach it.