Bug 241165 - cad/opencascade: Fails to configure without qmake
Summary: cad/opencascade: Fails to configure without qmake
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Thierry Thomas
Keywords: needs-qa
Depends on:
Reported: 2019-10-09 19:52 UTC by dgilbert
Modified: 2020-04-26 20:56 UTC (History)
3 users (show)

See Also:
thierry: maintainer-feedback+
koobs: merge-quarterly?

Patch to add qmake (417 bytes, patch)
2019-10-09 19:52 UTC, dgilbert
no flags Details | Diff
make vtk8 runtime-depend on qmake and qt buildtools (500 bytes, patch)
2020-04-19 18:19 UTC, Christoph Moench-Tegeder
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dgilbert 2019-10-09 19:52:09 UTC
Created attachment 208213 [details]
Patch to add qmake

So... Included here is a patch to add qmake.  The port doesn't even configure without it right now.

In the end, it doesn't compile due to a missing header I can't find yet.  I tried configuring for vtk8 rather than vtk6, but that didn't work.

... so help?  Maintainer?
Comment 1 dgilbert 2019-10-09 19:55:24 UTC
Hrm... log too big to attach.  Here' is the pertinent part:

FAILED: src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw.cxx.o 
/usr/local/libexec/ccache/c++  -DHAVE_FFMPEG -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_VTK -DOCC_CONVERT_SIGNALS -DTKIVtkDraw_EXPORTS -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -I/usr/local/include/vtk-6.2 -I/usr/local/include/freetype2 -I/usr/local/include/python2.7 -I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6 -Iusr/local/include/OpenCASCADE -std=c++0x -O2 -pipe -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing -fexceptions -fPIC -Wall -Wextra  -O2 -pipe -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing -DNo_Exception -fPIC -MD -MT src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw.cxx.o -MF src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw.cxx.o.d -o src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw.cxx.o -c /wrkdirs/usr/ports/cad/opencascade/work/opencascade-7.4.0/src/IVtkDraw/IVtkDraw.cxx
/wrkdirs/usr/ports/cad/opencascade/work/opencascade-7.4.0/src/IVtkDraw/IVtkDraw.cxx:121:10: fatal error: 'vtkXRenderWindowInteractor.h' file not found
#include <vtkXRenderWindowInteractor.h>
1 error generated.

the whole log can be poked at:

Comment 2 Thierry Thomas freebsd_committer 2019-10-09 20:35:48 UTC
It seems that your VTK package if not complete:

$ locate vtkXRenderWindowInteractor.h

$ pkg which /usr/local/include/vtk-6.2/vtkXRenderWindowInteractor.h
/usr/local/include/vtk-6.2/vtkXRenderWindowInteractor.h was installed by package vtk6-6.2.0_9
Comment 3 dgilbert 2019-10-09 22:42:25 UTC
Ok.  It seems to be the option to GL render that removes that file.
Comment 4 dgilbert 2020-01-06 17:03:36 UTC
regardless, this patch is required to build on my system.  Without patch, I have no success... with patch, works.
Comment 5 dgilbert 2020-01-06 17:04:23 UTC
What does QA involve?  Is this where someone foists a ports commit bit on me?
Comment 6 Thierry Thomas freebsd_committer 2020-01-06 17:27:18 UTC
Did you build VTK6 with the option QT5?
Comment 7 dgilbert 2020-01-06 23:28:00 UTC
(In reply to Thierry Thomas from comment #6)
Just checked that.  math/vtk6 has qt5 checked in my poudriere and cad/opencascade still required the addition of qmake to compile.

It's quite specific.. qt:5 is insuffient to compile  USE_QT = qmake is required.
Comment 8 dgilbert 2020-03-04 18:46:06 UTC
(In reply to Thierry Thomas from comment #6)
Here i am ... visiting this requirement again on another build server.

Yes, I have VTK6 requiring qt5.
Comment 9 Christoph Moench-Tegeder freebsd_committer 2020-04-19 18:16:18 UTC
We've some overlap here: ports r532090 is quite similar to this PR's first attachment. But unfortunately, that breaks staging of opencascade:

: CMake Error at cmake_install.cmake:36 (file):
:   file cannot create directory: /usr/local/OpenCAS/share/doc/opencascade.
:   Maybe need administrative privileges.

The port does not install into STAGEDIR, but tries to drop files into the system: that's bad.

Reverting ports r532090 but and modifying math/vtk8 to runtime-depend on qmake and qt buildtools fixes the original issue and the staging problem.
Comment 10 Christoph Moench-Tegeder freebsd_committer 2020-04-19 18:19:29 UTC
Created attachment 213573 [details]
make vtk8 runtime-depend on qmake and qt buildtools

This is similar to (but not exactly the same) as https://lists.freebsd.org/pipermail/freebsd-ports/2020-April/118314.html - we need to runtime-depend on both qmake and buildtools, as vtk8's cmake files references files from both ports.

With this patch and ports r532090 reverted, vtk8, opencascade and downstream consumers (freecad, kicad) build fine in poudriere 12.1.
Comment 11 alt2600 2020-04-19 21:39:51 UTC
(In reply to Christoph Moench-Tegeder from comment #9)

-- Set runtime path of "/usr/local/OpenCAS/bin/DRAWEXE-7.4.0" to "/usr/local/lib:/usr/local/lib/vtk-8.1"
/bin/mv /usr/ports/cad/opencascade/work/stage/usr/local/OpenCAS/bin/DRAWEXE-7.4.0 /usr/ports/cad/opencascade/work/stage/usr/local/bin/DRAWEXE
mv: rename /usr/ports/cad/opencascade/work/stage/usr/local/OpenCAS/bin/DRAWEXE-7.4.0 to /usr/ports/cad/opencascade/work/stage/usr/local/bin/DRAWEXE: No such file or directory
*** Error code 1

make: stopped in /usr/ports/cad/opencascade

$} ls /usr/local/OpenCAS/bin/
DRAWEXE            DRAWEXE-7.4.0      custom.sh          custom_clang_64.sh draw.sh            env.sh

it doesn't seem to be staging at all as you pointed out.
Comment 12 Thierry Thomas freebsd_committer 2020-04-20 14:17:09 UTC
Yes, there was a problem with VTK-8.1 - sorry for that.

I just switched back to VTK-6.1. Still investigating...
Comment 13 Thierry Thomas freebsd_committer 2020-04-26 20:56:54 UTC
Does the problem remain after the latest update? (opencascade-7.4.0_5)