Bug 1840501

Summary: Building opencascade with VTK 9.0 fails
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: opencascadeAssignee: Richard Shaw <hobbes1069>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: hobbes1069
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://tracker.dev.opencascade.org/view.php?id=31582
Whiteboard:
Fixed In Version: opencascade-7.5.0-1.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-26 19:26:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2020-05-27 04:43:25 UTC
Description of problem:

I'm starting to test building packages with VTK 9.0 here:

https://copr.fedorainfracloud.org/coprs/orion/vtk9.0/builds/

but opencascade is failing with:

CMake Deprecation Warning at /usr/lib64/cmake/vtk/vtk-use-file-deprecated.cmake:1 (message):
  The `VTK_USE_FILE` is no longer used starting with 8.90.
Call Stack (most recent call first):
  adm/cmake/vtk.cmake:72 (include)
  CMakeLists.txt:14 (include)
  CMakeLists.txt:523 (OCCT_INCLUDE_CMAKE_FILE)


CMake Error at CMakeLists.txt:714 (message):
  Could not find headers of used third-party products:
  3RDPARTY_VTK_INCLUDE_DIR


-- Configuring incomplete, errors occurred!


There are a lot of changes to VTK's cmake system so this isn't surprising.  Can you look into whether or not this has already been addressed by opencascade upstream?  Thanks.

Version-Release number of selected component (if applicable):
 7.4.0-3.fc32

Comment 1 Ben Cotton 2020-08-11 13:34:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 2 Orion Poplawski 2020-11-07 14:39:12 UTC
It appears that opencascade 7.5.0 has been released which I'm hopeful has VTK 9 support.  Could you update the package to it so we can test?  Thanks.

Comment 3 Richard Shaw 2020-11-08 03:03:43 UTC
Doing a local test build now. Do you think a side tag would be appropriate?

Comment 4 Richard Shaw 2020-11-08 14:13:12 UTC
Building now...

$ fedpkg request-side-tag 
Side tag 'f34-build-side-33705' (id 33705) created.
Use 'fedpkg build --target=f34-build-side-33705' to use it.
Use 'koji wait-repo f34-build-side-33705' to wait for the build repo to be generated.

Comment 5 Orion Poplawski 2020-11-09 04:58:20 UTC
Does the 7.5.0 update change ABI?  Otherwise it seems like you could just build directly in rawhide.

I'm doing the VTK 9.0 tests builds in my copr.  Trying opencascade now:
https://copr.fedorainfracloud.org/coprs/orion/vtk9.0/build/1750073/

but fails with:

VTK version (9.0.1)
CMake Error at CMakeLists.txt:746 (message):
  Could not find headers of used third-party products:
  3RDPARTY_VTK_INCLUDE_DIR
-- Configuring incomplete, errors occurred!


Thanks for the update.

Comment 6 Richard Shaw 2020-11-09 12:44:50 UTC
It did bump the soname, so even if they didn't remove anything I still had to do rebuilds of all dependent packages. Got all the libraries done yesterday. I think I just have FreeCAD and Kicad left.

Comment 7 Richard Shaw 2020-11-09 12:50:24 UTC
Looking at the directories from the vtk-devel package, I wonder which are considered 3rd party headers?

$ find ./usr -type d
./usr/include
./usr/include/vtk
./usr/include/vtk/vtkmetaio
./usr/include/vtk/vtkkwiml
./usr/include/vtk/vtksys
./usr/include/vtk/octree
./usr/include/vtk/vtkexodusII
./usr/include/vtk/vtkexodusII/include
./usr/include/vtk/vtkloguru
./usr/include/vtk/vtkdiy2
./usr/include/vtk/vtkdiy2/include
./usr/include/vtk/vtkdiy2/include/vtkdiy2
./usr/include/vtk/vtkdiy2/include/vtkdiy2/fmt
./usr/include/vtk/vtkdiy2/include/vtkdiy2/thread
./usr/include/vtk/vtkdiy2/include/vtkdiy2/partners
./usr/include/vtk/vtkdiy2/include/vtkdiy2/detail
./usr/include/vtk/vtkdiy2/include/vtkdiy2/detail/reduce
./usr/include/vtk/vtkdiy2/include/vtkdiy2/detail/algorithms
./usr/include/vtk/vtkdiy2/include/vtkdiy2/detail/master
./usr/include/vtk/vtkdiy2/include/vtkdiy2/chobo
./usr/include/vtk/vtkdiy2/include/vtkdiy2/mpi
./usr/include/vtk/vtkdiy2/include/vtkdiy2/io

The last ones with vtkdiy2 in the path twice seems strange.

Comment 8 Richard Shaw 2020-11-09 13:00:03 UTC
Looking at adm/cmake/vtk.cmake in OCC it looks like it's trying to find AND install the vtk libraries, I assume this method is not designed for a system based install.

You may just have to set the VTK related CMake variables manually.

Comment 9 Richard Shaw 2020-11-09 13:02:58 UTC
Ok, yeah, looking at:

https://old.opencascade.com/doc/occt-7.0.0/overview/html/occt_dev_guides__building_cmake.html#build_cmake_3rdparty

3RDPARTY_<PRODUCT>_DIR – path to the 3rdparty directory (with directory name) (e.g. D:/3rdparty/tcltk-86-32)
3RDPARTY_<PRODUCT>_LIBRARY_DIR – path to the directory containing a library (e.g. D:/3rdparty/tcltk-86-32/lib).
3RDPARTY_<PRODUCT>_INCLUDE_DIR – path to the directory containing a header file (e.g., D:/3rdparty/tcltk-86-32/include)
3RDPARTY_<PRODUCT>_DLL_DIR – path to the directory containing a shared library (e.g., D:/3rdparty/tcltk-86-32/bin) This variable is only relevant to Windows platforms.

We just need to make sure "INSTALL_VTK" is set to false.

Comment 10 Richard Shaw 2020-11-09 13:07:47 UTC
I have a build I'd like to test, can you approve my request to your COPR?

Comment 11 Orion Poplawski 2020-11-09 16:00:23 UTC
Done.  I hadn't noticed the soname bump - I generally explicitly list the soname in %files to be sure I don't miss such changes.

Comment 12 Richard Shaw 2020-11-09 18:57:21 UTC
Getting close... It looks like the arm build just crapped out for some reason, but the x86_64 build got pretty far until:

[ 90%] Building CXX object src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw.cxx.o
cd /builddir/build/BUILD/opencascade-7.5.0/x86_64-redhat-linux-gnu/src/TKIVtkDraw && /usr/bin/g++ -DHAVE_TBB -DHAVE_VTK -DOCC_CONVERT_SIGNALS -DTKIVtkDraw_EXPORTS -DVTK_OPENGL2_BACKEND -I/builddir/build/BUILD/opencascade-7.5.0/x86_64-redhat-linux-gnu/include/opencascade -isystem /usr/include/freetype2 -isystem /usr/include/vtk -std=c++0x -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fexceptions -fPIC -Wall -Wextra -O2 -g -DNDEBUG -fPIC -o CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw.cxx.o -c /builddir/build/BUILD/opencascade-7.5.0/src/IVtkDraw/IVtkDraw.cxx
In file included from /builddir/build/BUILD/opencascade-7.5.0/src/InterfaceGraphic/InterfaceGraphic.hxx:39,
                 from /builddir/build/BUILD/opencascade-7.5.0/x86_64-redhat-linux-gnu/include/opencascade/InterfaceGraphic.hxx:1,
                 from /builddir/build/BUILD/opencascade-7.5.0/src/Aspect/Aspect_DisplayConnection.hxx:24,
                 from /builddir/build/BUILD/opencascade-7.5.0/x86_64-redhat-linux-gnu/include/opencascade/Aspect_DisplayConnection.hxx:1,
                 from /builddir/build/BUILD/opencascade-7.5.0/src/OpenGl/OpenGl_GraphicDriver.hxx:22,
                 from /builddir/build/BUILD/opencascade-7.5.0/x86_64-redhat-linux-gnu/include/opencascade/OpenGl_GraphicDriver.hxx:1,
                 from /builddir/build/BUILD/opencascade-7.5.0/src/IVtkDraw/IVtkDraw.cxx:34:
/usr/include/vtk/vtkDataArray.h:602:8: error: expected identifier before numeric constant
  602 | struct AllValues
      |        ^~~~~~~~~
/usr/include/vtk/vtkDataArray.h:602:8: error: expected unqualified-id before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:417:37: error: expected identifier before numeric constant
  417 | bool DoComputeVectorRange(A*, R[2], AllValues);
      |                                     ^~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:417:37: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:519:37: error: expected identifier before numeric constant
  519 | bool DoComputeVectorRange(A*, R[2], AllValues);
      |                                     ^~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:519:37: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
  551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
  551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
  551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
  551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:551:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
  552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
  552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
  552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
  552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:552:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
  553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
  553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
  553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
  553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:553:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
  554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
  554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
  554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
  554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:554:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:555:1: error: expected identifier before numeric constant
  555 | VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkDataArray, double)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:555:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.h:555:1: error: expected identifier before numeric constant
  555 | VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkDataArray, double)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.h:555:1: error: expected ',' or '...' before numeric constant
/usr/include/vtk/vtkGenericDataArray.txx: In member function 'bool vtkGenericDataArray<DerivedT, ValueTypeT>::ComputeScalarValueRange(vtkGenericDataArray<DerivedT, ValueTypeT>::ValueType*)':
/usr/include/vtk/vtkGenericDataArray.txx:1195:64: error: expected unqualified-id before numeric constant
 1195 |     static_cast<DerivedT*>(this), ranges, vtkDataArrayPrivate::AllValues{}, Supported{});
      |                                                                ^~~~~~~~~
/usr/include/vtk/vtkGenericDataArray.txx: In member function 'bool vtkGenericDataArray<DerivedT, ValueTypeT>::ComputeVectorValueRange(vtkGenericDataArray<DerivedT, ValueTypeT>::ValueType*)':
/usr/include/vtk/vtkGenericDataArray.txx:1205:63: error: expected unqualified-id before numeric constant
 1205 |     static_cast<DerivedT*>(this), range, vtkDataArrayPrivate::AllValues{}, Supported{});
      |                                                               ^~~~~~~~~
gmake[2]: *** [src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/build.make:85: src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/__/IVtkDraw/IVtkDraw.cxx.o] Error 1
gmake[2]: Leaving directory '/builddir/build/BUILD/opencascade-7.5.0/x86_64-redhat-linux-gnu'
gmake[1]: *** [CMakeFiles/Makefile2:3671: src/TKIVtkDraw/CMakeFiles/TKIVtkDraw.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

Comment 13 Richard Shaw 2020-11-17 03:41:39 UTC
https://gitlab.kitware.com/vtk/vtk/-/issues/18048

Comment 14 Fedora Update System 2020-11-26 19:26:48 UTC
FEDORA-2020-d0c3f6cd11 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.