Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645640 - sci-libs/vtk-8.1.0 with USE=xdmf2 fails during configure phase
Summary: sci-libs/vtk-8.1.0 with USE=xdmf2 fails during configure phase
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-25 00:12 UTC by Attila Tóth
Modified: 2018-01-30 18:44 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2018-01-25 00:12:07 UTC
CMake Error at CMake/vtkModuleMacros.cmake:950 (find_package):
  By not providing "Findxdmf2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "xdmf2", but
  CMake did not find one.

  Could not find a package configuration file provided by "xdmf2" with any of
  the following names:

    xdmf2Config.cmake
    xdmf2-config.cmake

  Add the installation prefix of "xdmf2" to CMAKE_PREFIX_PATH or set
  "xdmf2_DIR" to a directory containing one of the above files.  If "xdmf2"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  ThirdParty/xdmf2/CMakeLists.txt:1 (vtk_module_third_party)


-- Configuring incomplete, errors occurred!

Previous version 7.1.0 didn't have such a problem.
Comment 1 Jonathan Scruggs (RETIRED) gentoo-dev 2018-01-26 23:23:23 UTC
I can confirm that this happens. After looking into it, I think it might be an issue with xdmf2 installing the .cmake files to the wrong directory, /usr/share/cmake/Modules/. The correct directory is: /usr/lib64/cmake/xdmf2 if you have a 64 bit system.

In order to get past the configure stage, I did something not proper and is in no way the permanent fix.

Legal disclaimer: I post this as testing purposes only.
Make your way to /usr/lib64/cmake or /usr/lib/cmake which ever is your main lib directory.
# mkdir xdmf2
# cd xdmf2
# ln -s /usr/share/cmake/Modules/xdmf2Config.cmake xdmf2Config.cmake

Then try to emerge VTK again and see if it runs to completion and also uses xdmf2 correctly after install. It takes an hour on my system to compile it, so I don't have the time at the moment. If it works, then a bug should be raised against xdmf2. :) Once this is fixed properly, you will need to manually remove the directory before updating xdmf2.

Thanks for reporting and looking forward to your results.
Comment 2 Attila Tóth 2018-01-28 12:17:53 UTC
(In reply to Jonathan Scruggs from comment #1)
> I can confirm that this happens. After looking into it, I think it might be
> an issue with xdmf2 installing the .cmake files to the wrong directory,
> /usr/share/cmake/Modules/. The correct directory is: /usr/lib64/cmake/xdmf2
> if you have a 64 bit system.
> 
> In order to get past the configure stage, I did something not proper and is
> in no way the permanent fix.
> 
> Legal disclaimer: I post this as testing purposes only.
> Make your way to /usr/lib64/cmake or /usr/lib/cmake which ever is your main
> lib directory.
> # mkdir xdmf2
> # cd xdmf2
> # ln -s /usr/share/cmake/Modules/xdmf2Config.cmake xdmf2Config.cmake
> 
> Then try to emerge VTK again and see if it runs to completion and also uses
> xdmf2 correctly after install. It takes an hour on my system to compile it,
> so I don't have the time at the moment. If it works, then a bug should be
> raised against xdmf2. :) Once this is fixed properly, you will need to
> manually remove the directory before updating xdmf2.
> 
> Thanks for reporting and looking forward to your results.

Creating the symlink you've suggested solved the configure issue. Although trying to compile the package after that I got these:
/var/tmp/portage/sci-libs/vtk-8.1.0/work/VTK-8.1.0/IO/Xdmf2/vtkXdmfHeavyData.h:20:10: fatal error: XdmfDataItem.h: No such file or directory
/var/tmp/portage/sci-libs/vtk-8.1.0/work/VTK-8.1.0/IO/Xdmf2/vtkXdmfDataArray.cxx:38:10: fatal error: XdmfArray.h: No such file or directory

Paraview have these files vtk looking for. However I think paraview ought to be a higher level software compared to a library like vtk...

I have to admit I don't particularly use xdmf2 functions of vtk right now. I mainly using vtk for its 3D capabilities some 3rd party software can handle. Along with paraview. So I would have trouble testing the compiled software. But I'm happy to try out any further suggestions. Thanks: Dw.
Comment 3 Attila Tóth 2018-01-28 12:28:03 UTC
(In reply to Attila Tóth from comment #2)
> Creating the symlink you've suggested solved the configure issue. Although
> trying to compile the package after that I got these:
> /var/tmp/portage/sci-libs/vtk-8.1.0/work/VTK-8.1.0/IO/Xdmf2/vtkXdmfHeavyData.
> h:20:10: fatal error: XdmfDataItem.h: No such file or directory
> /var/tmp/portage/sci-libs/vtk-8.1.0/work/VTK-8.1.0/IO/Xdmf2/vtkXdmfDataArray.
> cxx:38:10: fatal error: XdmfArray.h: No such file or directory
> 
> Paraview have these files vtk looking for. However I think paraview ought to
> be a higher level software compared to a library like vtk...
> 
> I have to admit I don't particularly use xdmf2 functions of vtk right now. I
> mainly using vtk for its 3D capabilities some 3rd party software can handle.
> Along with paraview. So I would have trouble testing the compiled software.
> But I'm happy to try out any further suggestions. Thanks: Dw.

The headers are there:
/var/tmp/portage/sci-libs/vtk-8.1.0/work/VTK-8.1.0/ThirdParty/xdmf2/vtkxdmf2/libsrc
But if I add the necessary include line, it complains about XdmfConfig.h. There's only an XdmfConfig.h.in in that directory. The build systems seems to be missing a step and an include line. Somehow the inhouse paraview-5.4.1 ebuild does it right. Paraview compiles its own vtk.
Comment 4 Larry the Git Cow gentoo-dev 2018-01-30 18:44:22 UTC
The bug has been closed via the following commit(s):

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

commit 94c37b80b56ebc0689537c1996b2768aa57d88f5
Author:     Jonathan Scruggs <j.scruggs@gmail.com>
AuthorDate: 2018-01-27 17:10:44 +0000
Commit:     Jonathan Scruggs <dracwyrm@gentoo.org>
CommitDate: 2018-01-30 18:43:39 +0000

    sci-libs/vtk: Fix building with doc and xdmf2 use flags
    
    Closes: https://bugs.gentoo.org/645640
    Closes: https://github.com/gentoo/gentoo/pull/6977

 sci-libs/vtk/vtk-8.1.0-r1.ebuild | 332 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 332 insertions(+)