Skip to content

add feature build vtk[qtopengl]#10060

Closed
jafrado wants to merge 13 commits intomicrosoft:masterfrom
jafrado:master
Closed

add feature build vtk[qtopengl]#10060
jafrado wants to merge 13 commits intomicrosoft:masterfrom
jafrado:master

Conversation

@jafrado
Copy link

@jafrado jafrado commented Feb 13, 2020

Describe the pull request

@msftclas
Copy link

msftclas commented Feb 13, 2020

CLA assistant check
All CLA requirements met.

@jafrado
Copy link
Author

jafrado commented Feb 13, 2020

@NancyLi1013 - fix for this issue.

@LilyWangL
Copy link
Contributor

/azp run


Feature: qtopengl
Description: OpenGL with Qt for vtk on Windows
Build-Depends: qt5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't add all of qt5. You probably only need qt5-base

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also you can depend on vtk[core,qt5]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, this will reduce the build time substantially, however, it also needs qt5-tools,
(if you only include qt5-base, it fails as below):

CMake Error at C:/src/vcpkg/work/vcpkg/scripts/buildsystems/vcpkg.cmake:288 (_find_package):
  Could not find a package configuration file provided by "Qt5UiPlugin" with
  any of the following names:

    Qt5UiPluginConfig.cmake
    qt5uiplugin-config.cmake

  Add the installation prefix of "Qt5UiPlugin" to CMAKE_PREFIX_PATH or set
  "Qt5UiPlugin_DIR" to a directory containing one of the above files.  If
  "Qt5UiPlugin" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  C:/src/vcpkg/work/vcpkg/installed/x86-windows/share/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  C:/src/vcpkg/work/vcpkg/scripts/buildsystems/vcpkg.cmake:288 (_find_package)
  GUISupport/Qt/CMakeLists.txt:128 (find_package)

Note that this has the effect of also bringing in:

  * qt5-activeqt[core]:x64-windows
  * qt5-base[core]:x64-windows
  * qt5-declarative[core]:x64-windows
  * qt5-imageformats[core]:x64-windows
  * qt5-svg[core]:x64-windows

Which is still better than the whole Qt5 package!

Copy link
Author

@jafrado jafrado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will resubmit new change set.


Feature: qtopengl
Description: OpenGL with Qt for vtk on Windows
Build-Depends: qt5
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, this will reduce the build time substantially, however, it also needs qt5-tools,
(if you only include qt5-base, it fails as below):

CMake Error at C:/src/vcpkg/work/vcpkg/scripts/buildsystems/vcpkg.cmake:288 (_find_package):
  Could not find a package configuration file provided by "Qt5UiPlugin" with
  any of the following names:

    Qt5UiPluginConfig.cmake
    qt5uiplugin-config.cmake

  Add the installation prefix of "Qt5UiPlugin" to CMAKE_PREFIX_PATH or set
  "Qt5UiPlugin_DIR" to a directory containing one of the above files.  If
  "Qt5UiPlugin" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  C:/src/vcpkg/work/vcpkg/installed/x86-windows/share/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  C:/src/vcpkg/work/vcpkg/scripts/buildsystems/vcpkg.cmake:288 (_find_package)
  GUISupport/Qt/CMakeLists.txt:128 (find_package)

Note that this has the effect of also bringing in:

  * qt5-activeqt[core]:x64-windows
  * qt5-base[core]:x64-windows
  * qt5-declarative[core]:x64-windows
  * qt5-imageformats[core]:x64-windows
  * qt5-svg[core]:x64-windows

Which is still better than the whole Qt5 package!

@jafrado
Copy link
Author

jafrado commented Feb 17, 2020

image

Not sure how to fix the above pipeline checks ... or even if they are related.

@LilyWangL
Copy link
Contributor

/azp run

@LilyWangL
Copy link
Contributor

@jafrado Thanks for your PR. Current this port build failed with the following error, could you please continue to fix it?

CMake Error at C:/vsts/_work/3/s/scripts/buildsystems/vcpkg.cmake:288 (_find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

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

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  GUISupport/Qt/CMakeLists.txt:71 (find_package)

@jafrado
Copy link
Author

jafrado commented Mar 4, 2020

@LilyWangL - thanks, did you run this patch-set: 993267b

The error you see should not be present, since the lines:

Build-Depends: qt5-base, qt5-tools, vtk[core]

include qt5-tools which has the qt5-config.cmake

Let me know and I can repost the original patch.

@LilyWangL
Copy link
Contributor

I cloned your latest commit and reproduced the CI test error. Due to -DModule_vtkGUISupportQt=ON, vtk build failed with this error:

CMake Error at C:/vsts/_work/3/s/scripts/buildsystems/vcpkg.cmake:288 (_find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

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

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  GUISupport/Qt/CMakeLists.txt:71 (find_package)

This error appear when cmake vtk/src/v8.2.0-d1dd9405dd/GUISupport/Qt/CMakeLists.txt Line71.

@jafrado
Copy link
Author

jafrado commented Mar 5, 2020

@LilyWangL - thanks, I will check it out.

@princetonpku
Copy link

I try the new port.cmake and isntall use following:
vcpkg install vtk[qt,qtopengl]:x64-windows

Howerver, the "vtkQtLabelRenderStrategy.h" is not installed. Is any solution for this?

@JackBoosY
Copy link
Contributor

/azp run

@jafrado
Copy link
Author

jafrado commented Mar 27, 2020

This is really weird. This works for me and I have it checked in to my repo for some time now.
Can you send me the build error?

@JackBoosY
Copy link
Contributor

Rerun test maually, I will give you failure log later.

@JackBoosY
Copy link
Contributor

...
-- Found Eigen3: G:/10060/vcpkg/installed/x86-windows/include/eigen3 (Required is at least version "2.91.0") 
-- Found ZLIB: optimized;G:/10060/vcpkg/installed/x86-windows/lib/zlib.lib;debug;G:/10060/vcpkg/installed/x86-windows/debug/lib/zlibd.lib (found version "1.2.11") 
-- Found Freetype: optimized;G:/10060/vcpkg/installed/x86-windows/lib/freetype.lib;debug;G:/10060/vcpkg/installed/x86-windows/debug/lib/freetyped.lib (found version "2.10.1") 
-- Found double-conversion: G:/10060/vcpkg/installed/x86-windows/include/double-conversion  
-- Found LZ4: optimized;G:/10060/vcpkg/installed/x86-windows/lib/lz4.lib;debug;G:/10060/vcpkg/installed/x86-windows/debug/lib/lz4d.lib  
-- Found LZMA: optimized;G:/10060/vcpkg/installed/x86-windows/lib/lzma.lib;debug;G:/10060/vcpkg/installed/x86-windows/debug/lib/lzmad.lib  
-- Found EXPAT: G:/10060/vcpkg/installed/x86-windows/lib/expat.lib (found version "2.2.7") 
-- Found OpenGL: opengl32   
CMake Error at G:/10060/vcpkg/scripts/buildsystems/vcpkg.cmake:288 (_find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

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

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  GUISupport/Qt/CMakeLists.txt:71 (find_package)


-- Configuring incomplete, errors occurred!

@jafrado
Copy link
Author

jafrado commented Mar 27, 2020

Thanks, will check it out tomorrow.

@jafrado
Copy link
Author

jafrado commented Mar 27, 2020 via email

@jafrado
Copy link
Author

jafrado commented Mar 27, 2020

Ok, lets try listing qt5-tools first to pickup Qt5Config.cmake, qt5-config.cmake before qtbase, otherwise we can just list the whole qt5 package as a dependency (which is what we have checked in to make a working software where I am working right now).

See if this change works:
3f99253

@jafrado
Copy link
Author

jafrado commented Apr 16, 2020

Let me know how to check/resolve this one. The patches I provided work here locally for me. I guess I need to know how to run your pre-commit

@JackBoosY
Copy link
Contributor

Any progress?

@jafrado
Copy link
Author

jafrado commented May 9, 2020 via email

@Neumann-A
Copy link
Contributor

@jafrado he is probably asking because #11148 is updating VTK to 9.0

@JackBoosY
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JackBoosY
Copy link
Contributor

x64-linux regression(vtk):

CMake Error at /mnt/1/s/scripts/buildsystems/vcpkg.cmake:329 (_find_package):
  Could not find a package configuration file provided by "Qt5X11Extras" with
  any of the following names:

    Qt5X11ExtrasConfig.cmake
    qt5x11extras-config.cmake

  Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
  "Qt5X11Extras_DIR" to a directory containing one of the above files.  If
  "Qt5X11Extras" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /mnt/1/s/installed/x64-linux/share/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  /mnt/1/s/scripts/buildsystems/vcpkg.cmake:329 (_find_package)
  GUISupport/Qt/CMakeLists.txt:71 (find_package)

x64-osx regression(pcl):

CMake Error at /Volumes/data/work/1/s/installed/x64-osx/share/cmake/Qt5Core/Qt5CoreConfig.cmake:113 (message):
  Library not found: m
Call Stack (most recent call first):
  /Volumes/data/work/1/s/installed/x64-osx/share/cmake/Qt5Core/Qt5CoreConfig.cmake:195 (_qt5_Core_parse_prl)
  /Volumes/data/work/1/s/installed/x64-osx/share/cmake/Qt5Core/Qt5CoreConfig.cmake:317 (_populate_Core_target_properties)
  /Volumes/data/work/1/s/scripts/buildsystems/vcpkg.cmake:329 (_find_package)
  /Volumes/data/work/1/s/installed/x64-osx/share/cmake/Qt5Gui/Qt5GuiConfig.cmake:255 (find_package)
  /Volumes/data/work/1/s/scripts/buildsystems/vcpkg.cmake:329 (_find_package)
  /Volumes/data/work/1/s/installed/x64-osx/share/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:255 (find_package)
  /Volumes/data/work/1/s/scripts/buildsystems/vcpkg.cmake:329 (_find_package)
  /Volumes/data/work/1/s/installed/x64-osx/share/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  /Volumes/data/work/1/s/scripts/buildsystems/vcpkg.cmake:329 (_find_package)
  /Volumes/data/work/1/s/installed/x64-osx/share/vtk/Modules/vtkGUISupportQt.cmake:19 (find_package)
  /Volumes/data/work/1/s/installed/x64-osx/share/vtk/vtkModuleAPI.cmake:45 (include)
  /Volumes/data/work/1/s/installed/x64-osx/share/vtk/vtkModuleAPI.cmake:15 (vtk_module_load)
  /Volumes/data/work/1/s/installed/x64-osx/share/vtk/vtkModuleAPI.cmake:152 (_vtk_module_config_recurse)
  /Volumes/data/work/1/s/installed/x64-osx/share/vtk/VTKConfig.cmake:137 (vtk_module_config)
  /Volumes/data/work/1/s/scripts/buildsystems/vcpkg.cmake:329 (_find_package)
  CMakeLists.txt:364 (find_package)

@jafrado
Copy link
Author

jafrado commented May 11, 2020 via email

@JackBoosY
Copy link
Contributor

@jafrado Please get full logs here.

@jafrado
Copy link
Author

jafrado commented May 12, 2020 via email

@jafrado
Copy link
Author

jafrado commented May 12, 2020 via email

# Conflicts:
#	ports/vtk/CONTROL
#	ports/vtk/portfile.cmake
@jafrado
Copy link
Author

jafrado commented May 12, 2020 via email

@JackBoosY
Copy link
Contributor

CMake Error at /home/vzay/work/10060/vcpkg/scripts/buildsystems/vcpkg.cmake:286 (_find_package):
  Could not find a package configuration file provided by "Qt5X11Extras" with
  any of the following names:

    Qt5X11ExtrasConfig.cmake
    qt5x11extras-config.cmake

  Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
  "Qt5X11Extras_DIR" to a directory containing one of the above files.  If
  "Qt5X11Extras" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /home/vzay/work/10060/vcpkg/installed/x64-linux/share/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  /home/vzay/work/10060/vcpkg/scripts/buildsystems/vcpkg.cmake:286 (_find_package)
  GUISupport/Qt/CMakeLists.txt:71 (find_package)

endif()

if("paraview" IN_LIST FEATURES)
if(VTK_WITH_QT_OPENGL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where this value is not set, I think it is always 0.

@BillyONeal
Copy link
Member

If this was waiting for a VM change that might have been done now in support of the Qt update change merged recently.

@Neumann-A
Copy link
Contributor

@JackBoosY @BillyONeal: This PR can probably be closed due to the update to VTK 9 which includes opengl feature.

if("opengl" IN_LIST FEATURES)
    list(APPEND ADDITIONAL_OPTIONS
        -DVTK_MODULE_ENABLE_VTK_DomainsChemestryOpenGL2=YES
        -DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2=YES
        -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2=YES
        -DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2=YES
        -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES
        -DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2=YES
        -DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2=YES
        -DVTK_MODULE_ENABLE_VTK_opengl=YES
        )
endif()
if("qt" IN_LIST FEATURES)
    list(APPEND ADDITIONAL_OPTIONS
        -DVTK_GROUP_ENABLE_Qt=YES
        -DVTK_MODULE_ENABLE_VTK_GUISupportQt=YES
        -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL=YES
        -DVTK_MODULE_ENABLE_VTK_RenderingQt=YES
        -DVTK_MODULE_ENABLE_VTK_ViewsQt=YES
    )
endif()

@jafrado
Copy link
Author

jafrado commented Jul 10, 2020

Yes. Please close. Thank you all very much for your support!

jfd added 2 commits July 10, 2020 08:10
@jafrado
Copy link
Author

jafrado commented Jul 10, 2020

Please disregard last commit. Thanks again!

@JackBoosY
Copy link
Contributor

Thanks for this PR!

@JackBoosY JackBoosY closed this Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants