diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2019-08-15 11:13:45 -0400 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-08-15 10:13:45 -0500 |
commit | 4b400d503216cbc6b56f5f7231a9ed288d43fb96 (patch) | |
tree | 6a1e9d1e2947da7cd8b09c6ec27654c926688a8e /var/spack/repos/builtin/packages/vtk | |
parent | ce15510566eff31cac4ec92455320fd57d797a3b (diff) | |
download | spack-4b400d503216cbc6b56f5f7231a9ed288d43fb96.tar.gz spack-4b400d503216cbc6b56f5f7231a9ed288d43fb96.tar.bz2 spack-4b400d503216cbc6b56f5f7231a9ed288d43fb96.tar.xz spack-4b400d503216cbc6b56f5f7231a9ed288d43fb96.zip |
Update VisIt to version 3.0.1 and fix on mac (#12396)
* Add option to disable QTDesigner plugin for qwt
Qt designer shouldn't be necessary to build downstream GUI code.
Currently `qwt^qt~tools` fails to build:
(darwin clang@10.0.1)
```
compiling qwt_designer_plugin.cpp
compiling qwt_designer_plotdialog.cpp
moc qwt_designer_plugin.h
moc qwt_designer_plotdialog.h
rcc qwt_designer_plugin.qrc
qwt_designer_plugin.h:23: Error: Undefined interface
make[1]: *** [moc/moc_qwt_designer_plugin.cpp] Error 1
make[1]: *** Waiting for unfinished jobs....
qwt_designer_plugin.cpp:17:10: fatal error: 'QDesignerFormEditorInterface' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [obj/qwt_designer_plugin.o] Error 1
make: *** [sub-designer-make_default-ordered] Error 2
```
* Update VTK for newer VisIt and compiler versions
Several changes/enhancements to VTK package
---
Add version 8.1.0 (default version for VisIt 3.x)
---
Tweak VTK options for version 8 and VisIt:
- only add mpi4py version option when mpi4py is enabled
- Require object factory for downstream packages
- Remove OpenGL preference for VTK 8
---
Combine +python3 into +python
The spec for using python3 should just be `+python^python@3:`.
---
Remove unused VTK cmake argument on newer version
---
Patch for Python 3 fails on VTK 6.1 (needed for VisIt 2.x):
```
==> Patch /rnsdhpc/code/spack/var/spack/repos/builtin/packages/vtk/python3.7-const-char.patch failed.
==> Error: ProcessError: Command exited with status 1:
'/usr/bin/patch' '-s' '-p' '1' '-i' '/rnsdhpc/code/spack/var/spack/repos/builtin/packages/vtk/python3.7-const-char.patch' '-d' '.'
```
and as it happens, VisIt 2.13 is incompatible with Python 3 anyway.
---
Fix compiler error:
As spack's configuration warning says, double-quotes can cause trouble:
```
==> [2019-07-29-11:47:55.269653] Warning: Quotes in command arguments can confuse scripts like configure.
The following arguments may cause problems when executed:
-DVTK_REQUIRED_OBJCXX_FLAGS=""
Quotes aren't needed because spack doesn't use a shell.
Consider removing them
```
They were being added to the compile line, causing clang to think it was
asked to compile an empty file:
```
cd /private/var/folders/fy/x2xtwh1n7fn0_0q2kk29xkv9vvmbqb/T/s3j/spack-stage/spack-stage-3nk9bwe_/spack-build/Rendering/OpenGL && /rnsdhpc/code/spack/lib/spack/env/clang/clang++ -DVTK_IN_VTK -DvtkRenderingOpenGL_EXPORTS -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks -DGLX_GLXEXT_LEGACY -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden "" -o CMakeFiles/vtkRenderingOpenGL.dir/vtkCocoaGLView.mm.o -c /rnsdhpc/code/spack/var/spack/stage/vtk-6.1.0-b2mj276iz77fadisv2me365qe27t3gxt/spack-src/Rendering/OpenGL/vtkCocoaGLView.mm
clang: error: no input files
make[2]: *** [Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/vtkCocoaGLView.mm.o] Error 1
```
* Modernize/PEP-8 visit package statements
* Add new VisIt version and patches for building on Mac
- VisIt's cmake assumes a 'vtk(tiff|jpeg|png)' *library* target exported by
VTK, but VTK 8.1.x on my configuration seems to have these as header-only
targets with library dependencies.
- Explicitly add QT path to visit configure: Without this, somehow
`${VISIT_QT_DIR}` was being set to empty, so that the build failed with
`missing /bin/moc`.
- VisIt assumes that if it isn't being built statically, QWT has been built as
a mac Framework. QWT actually is built as a framework based on whether QT
itself is.
Error message:
```
-- Looking for QWT
CMake Error at CMake/SetUpThirdParty.cmake:131 (MESSAGE):
Include Directory for QWT (/rnsdhpc/code/spack/opt/spack/darwin-mojave-x86_64/clang-10.0.1-apple/qwt-6.1.3-bmfxirweplzhjoiil4rw632evkyteuwk/lib/qwt.framework/Versions/Current/Headers) does not exist.
Call Stack (most recent call first):
CMake/FindQwt.cmake:57 (SET_UP_THIRD_PARTY)
CMakeLists.txt:1251 (INCLUDE)
```
Diffstat (limited to 'var/spack/repos/builtin/packages/vtk')
-rw-r--r-- | var/spack/repos/builtin/packages/vtk/package.py | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 82cd423e4f..1be771e9f4 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -22,6 +22,7 @@ class Vtk(CMakePackage): version('8.1.2', sha256='0995fb36857dd76ccfb8bb07350c214d9f9099e80b1e66b4a8909311f24ff0db') version('8.1.1', sha256='71a09b4340f0a9c58559fe946dc745ab68a866cf20636a41d97b6046cb736324') + version('8.1.0', sha256='6e269f07b64fb13774f5925161fb4e1f379f4e6a0131c8408c555f6b58ef3cb7') version('8.0.1', '692d09ae8fadc97b59d35cab429b261a') version('7.1.0', 'a7e814c1db503d896af72458c2d0228f') version('7.0.0', '5fe35312db5fb2341139b8e4955c367d') @@ -32,7 +33,6 @@ class Vtk(CMakePackage): variant('opengl2', default=True, description='Enable OpenGL2 backend') variant('osmesa', default=False, description='Enable OSMesa support') variant('python', default=False, description='Enable Python support') - variant('python3', default=False, description='Enable Python3 support') variant('qt', default=False, description='Build with support for Qt') variant('xdmf', default=False, description='Build XDMF file support') variant('ffmpeg', default=False, description='Build with FFMPEG support') @@ -43,21 +43,16 @@ class Vtk(CMakePackage): # At the moment, we cannot build with both osmesa and qt, but as of # VTK 8.1, that should change conflicts('+osmesa', when='+qt') - conflicts('+python', when='+python3') - conflicts('+python3', when='@:8.0') + conflicts('^python@3:', when='@:8.0') extends('python', when='+python') - extends('python', when='+python3') - - depends_on('python@2.7:2.8', when='+python', type=('build', 'run')) - depends_on('python@3:', when='+python3', type=('build', 'run')) + depends_on('python@2.7:', when='+python', type=('build', 'run')) depends_on('py-mpi4py', when='+python+mpi', type='run') - depends_on('py-mpi4py', when='+python3+mpi', type='run') # python3.7 compatibility patch backported from upstream # https://gitlab.kitware.com/vtk/vtk/commit/706f1b397df09a27ab8981ab9464547028d0c322 - patch('python3.7-const-char.patch', when='@:8.1.1 ^python@3.7:') + patch('python3.7-const-char.patch', when='@7.0.0:8.1.1 ^python@3.7:') # The use of the OpenGL2 backend requires at least OpenGL Core Profile # version 3.2 or higher. @@ -129,6 +124,9 @@ class Vtk(CMakePackage): '-DNETCDF_C_ROOT={0}'.format(spec['netcdf'].prefix), '-DNETCDF_CXX_ROOT={0}'.format(spec['netcdf-cxx'].prefix), + # Allow downstream codes (e.g. VisIt) to override VTK's classes + '-DVTK_ALL_NEW_OBJECT_FACTORY:BOOL=ON', + # Disable wrappers for other languages. '-DVTK_WRAP_JAVA=OFF', '-DVTK_WRAP_TCL=OFF', @@ -144,12 +142,13 @@ class Vtk(CMakePackage): cmake_args.extend(['-DModule_vtkIOFFMPEG:BOOL=ON']) # Enable/Disable wrappers for Python. - if '+python' in spec or '+python3' in spec: + if '+python' in spec: cmake_args.extend([ '-DVTK_WRAP_PYTHON=ON', '-DPYTHON_EXECUTABLE={0}'.format(spec['python'].command.path), - '-DVTK_USE_SYSTEM_MPI4PY:BOOL=ON' ]) + if '+mpi' in spec: + cmake_args.append('-DVTK_USE_SYSTEM_MPI4PY:BOOL=ON') else: cmake_args.append('-DVTK_WRAP_PYTHON=OFF') @@ -206,12 +205,10 @@ class Vtk(CMakePackage): if '+mpi' in spec: cmake_args.extend(["-DModule_vtkIOParallelXdmf3:BOOL=ON"]) - cmake_args.extend([ - '-DVTK_USE_SYSTEM_GLEW:BOOL=ON', + cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=' + opengl_ver) - '-DVTK_RENDERING_BACKEND:STRING=OpenGL{0}'.format( - '2' if '+opengl2' in spec else ''), - ]) + if spec.satisfies('@:8.1.0'): + cmake_args.append('-DVTK_USE_SYSTEM_GLEW:BOOL=ON') if '+osmesa' in spec: cmake_args.extend([ @@ -220,9 +217,10 @@ class Vtk(CMakePackage): '-DVTK_OPENGL_HAS_OSMESA:BOOL=ON']) else: - cmake_args.extend([ - '-DVTK_OPENGL_HAS_OSMESA:BOOL=OFF', - '-DOpenGL_GL_PREFERENCE:STRING=LEGACY']) + cmake_args.append('-DVTK_OPENGL_HAS_OSMESA:BOOL=OFF') + if spec.satisfies('@:7.9.9'): + # This option is gone in VTK 8.1.2 + cmake_args.append('-DOpenGL_GL_PREFERENCE:STRING=LEGACY') if 'darwin' in spec.architecture: cmake_args.extend([ @@ -262,10 +260,11 @@ class Vtk(CMakePackage): if (self.spec.satisfies('%clang') and self.compiler.is_apple and self.compiler.version >= Version('5.1.0')): - cmake_args.extend(['-DVTK_REQUIRED_OBJCXX_FLAGS=""']) + cmake_args.extend(['-DVTK_REQUIRED_OBJCXX_FLAGS=']) # A bug in tao pegtl causes build failures with intel compilers if '%intel' in spec and spec.version >= Version('8.2'): cmake_args.append( '-DVTK_MODULE_ENABLE_VTK_IOMotionFX:BOOL=OFF') + return cmake_args |