Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vtk] fix find lz4 hdf5 pegl #15521

Closed
wants to merge 1 commit into from

Conversation

dweckmann
Copy link
Contributor

Describe the pull request

Basically it fixes LZ4, HDF5, PEGL import problems, allowing to use VTK / ITK with FindPackage.

ports/vtk/FindHDF5.cmake Outdated Show resolved Hide resolved
@dweckmann dweckmann force-pushed the vtk-fix-find-lz4-hdf5-PEGL branch 3 times, most recently from 983b362 to 8d7f6bc Compare January 8, 2021 16:30
@JackBoosY JackBoosY self-assigned this Jan 11, 2021
@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Jan 11, 2021
@dweckmann dweckmann force-pushed the vtk-fix-find-lz4-hdf5-PEGL branch 2 times, most recently from 48c7c8e to 9f90402 Compare January 11, 2021 10:57
@JackBoosY
Copy link
Contributor

Please ping me if this PR is ready for review.

@dweckmann
Copy link
Contributor Author

Please ping me if this PR is ready for review.

unfortunately not yet. I didn't manage to fix correctly the initial problem (hdf5 double inclusion when using VTK + ITK)

@WangZP10969
Copy link

Please ping me if this PR is ready for review.

unfortunately not yet. I didn't manage to fix correctly the initial problem (hdf5 double inclusion when using VTK + ITK)

For users who only use vtk, do you have any way to deal with this problem? I tried your changes, for the modification of lz4, the compilation did not report an error, but for hdf5 pegl did not seem to solve the problem.

@dweckmann
Copy link
Contributor Author

Please ping me if this PR is ready for review.

unfortunately not yet. I didn't manage to fix correctly the initial problem (hdf5 double inclusion when using VTK + ITK)

For users who only use vtk, do you have any way to deal with this problem? I tried your changes, for the modification of lz4, the compilation did not report an error, but for hdf5 pegl did not seem to solve the problem.

Well, I removed the hdf5 patch as it breaks VTK build (as you noticed). I've tried many things with no acceptable solutions. I'm trying to remove the FindHDF5.cmake after build as a workaround for now...

If any of you have an idea, I'm taking it.

@dweckmann
Copy link
Contributor Author

I didn't manage to fix the issue with hdf5. So I propose this workaround (simply removing FindHDF5.cmake after build from VTK and use the regular config from HDF5 directly), which seems to be effective for us.

If anyone have a better solution, I'll take it.

@dweckmann dweckmann marked this pull request as ready for review January 15, 2021 10:26
@JackBoosY
Copy link
Contributor

JackBoosY commented Jan 18, 2021

Since you've closed the modify permission of other mantainers, please do the following steps:

  1. update this branch from vcpkg master
  2. rebuild vcpkg
  3. use command ./vcpkg x-add-version --all
  4. commit changes

@WangZP10969
Copy link

WangZP10969 commented Jan 19, 2021

@dweckmann Thank you very much for your contribution!
I tried your changes, I can successfully configure the VTK library.

During the test, a problem was found.
Normally, the library is only searched once, but in my development, the library is searched again in the subdirectory (due to design issues).

For other libraries, there is no problem with repeated search:
find_package(Qt5 REQUIRED Widgets)
find_package(Qt5 REQUIRED Widgets)

For the VTK library, an error message will be reported for repeated searches:
find_package(VTK REQUIRED)
find_package(VTK REQUIRED)

Searching for PEGTL Searching for PEGTL - found target taocpp::pegtl CMake Error at libwvl/3rdParty/scripts/buildsystems/vcpkg.cmake:489 (_add_library): _add_library cannot create imported target "PEGTL::PEGTL" because another target with the same name already exists. Call Stack (most recent call first): libwvl/3rdParty/installed/x64-windows/share/vtk/FindPEGTL.cmake:26 (add_library) libwvl/3rdParty/scripts/buildsystems/vcpkg.cmake:634 (_find_package) libwvl/3rdParty/installed/x64-windows/share/vtk/VTK-vtk-module-find-packages.cmake:585 (find_package) libwvl/3rdParty/installed/x64-windows/share/vtk/vtk-config.cmake:129 (include) libwvl/3rdParty/scripts/buildsystems/vcpkg.cmake:634 (_find_package) CMakeLists.txt:14 (find_package)

Do you have any suggestions for this situation? If finding the library twice is indeed abnormal behavior, I will try to adjust the project logic to solve it.

@dweckmann
Copy link
Contributor Author

Do you have any suggestions for this situation? If finding the library twice is indeed abnormal behavior, I will try to adjust the project logic to solve it.

No sorry, VTK cmake files are too complex for my basic knowledge about it. I've tried to tweak a bit this part, but either my project won't build, either VTK won't.

@Neumann-A
Copy link
Contributor

Neumann-A commented Jan 19, 2021

Do you have any suggestions for this situation? If finding the library twice is indeed abnormal behavior, I will try to adjust the project logic to solve it.

All find modules should have a check if(NOT TARGET <targetname>) and only create the target if it does not exists. Maybe that is missing here

ports/vtk/pegtl.patch Outdated Show resolved Hide resolved
port_versions/v-/vtk.json Outdated Show resolved Hide resolved
Copy link
Contributor

@JackBoosY JackBoosY left a comment

Choose a reason for hiding this comment

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

Please bump the port version. See documentation.

And do the following steps:

  1. Revert changes a bout port_versions/v-/vtk.json
  2. Rerun command ./vcpkg x-add-version vtk
  3. Update changes

@strega-nil
Copy link
Contributor

Same for this one, you'll have to rebase on upstream/master.

@dweckmann dweckmann force-pushed the vtk-fix-find-lz4-hdf5-PEGL branch 2 times, most recently from a7f3589 to d97e800 Compare January 22, 2021 09:07
@JackBoosY
Copy link
Contributor

LGTM, @Neumann-A do you have any other questions?

@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Feb 1, 2021
@PhoebeHui PhoebeHui changed the title Vtk fix find lz4 hdf5 pegl [vtk] fix find lz4 hdf5 pegl Feb 2, 2021
@BillyONeal BillyONeal added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Apr 29, 2021
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

You need to:

  1. Merge with origin/master. Take master's versions/v-/vtk.json
  2. Bump Port-Version in ports/vtk/CONTROL
  3. Commit that
  4. vcpkg x-add-version vtk
  5. Commit that

I tried to do this for you but you didn't allow maintainer edits when creating the pr.

{
"versions": [
{
"git-tree": "88d95daae73bf5c3413bb18188c81f9ea752e418",
Copy link
Member

Choose a reason for hiding this comment

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

You need to not damage the existing versions database.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be good now. Thanks for your time !

@BillyONeal
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BillyONeal
Copy link
Member

(Rerunning due to replacing the macos vms)

@JackBoosY
Copy link
Contributor

JackBoosY commented Apr 30, 2021

Please add add paraview:x64-windows-static-md=fail to scripts\ci.baseline.txt.
The qt executable run failed, not related to this PR:

[8196/8526] cmd.exe /C "cd /D D:\buildtrees\paraview\x64-windows-static-md-dbg\Qt\ApplicationComponents && D:\downloads\tools\cmake-3.20.1-windows\cmake-3.20.1-windows-i386\bin\cmake.exe -E cmake_autogen D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents/CMakeFiles/pqApplicationComponents_autogen.dir/AutogenInfo.json Debug && D:\downloads\tools\cmake-3.20.1-windows\cmake-3.20.1-windows-i386\bin\cmake.exe -E touch D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents/pqApplicationComponents_autogen/timestamp && D:\downloads\tools\cmake-3.20.1-windows\cmake-3.20.1-windows-i386\bin\cmake.exe -E cmake_transform_depfile Ninja gccdepfile D:/buildtrees/paraview/src/4fb6e6800f-6b3165e6c7.clean D:/buildtrees/paraview/src/4fb6e6800f-6b3165e6c7.clean/Qt/ApplicationComponents D:/buildtrees/paraview/x64-windows-static-md-dbg D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents/pqApplicationComponents_autogen/deps D:/buildtrees/paraview/x64-windows-static-md-dbg/CMakeFiles/d/630ac66b060be7d2f120939a329ec87fdb66a012132616509ba12948a0087196.d"
FAILED: Qt/ApplicationComponents/pqApplicationComponents_autogen/timestamp 
cmd.exe /C "cd /D D:\buildtrees\paraview\x64-windows-static-md-dbg\Qt\ApplicationComponents && D:\downloads\tools\cmake-3.20.1-windows\cmake-3.20.1-windows-i386\bin\cmake.exe -E cmake_autogen D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents/CMakeFiles/pqApplicationComponents_autogen.dir/AutogenInfo.json Debug && D:\downloads\tools\cmake-3.20.1-windows\cmake-3.20.1-windows-i386\bin\cmake.exe -E touch D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents/pqApplicationComponents_autogen/timestamp && D:\downloads\tools\cmake-3.20.1-windows\cmake-3.20.1-windows-i386\bin\cmake.exe -E cmake_transform_depfile Ninja gccdepfile D:/buildtrees/paraview/src/4fb6e6800f-6b3165e6c7.clean D:/buildtrees/paraview/src/4fb6e6800f-6b3165e6c7.clean/Qt/ApplicationComponents D:/buildtrees/paraview/x64-windows-static-md-dbg D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents D:/buildtrees/paraview/x64-windows-static-md-dbg/Qt/ApplicationComponents/pqApplicationComponents_autogen/deps D:/buildtrees/paraview/x64-windows-static-md-dbg/CMakeFiles/d/630ac66b060be7d2f120939a329ec87fdb66a012132616509ba12948a0087196.d"

@Neumann-A
Copy link
Contributor

Please add add paraview:x64-windows-static-md=fail to scripts\ci.baseline.txt.
The qt executable run failed, not related to this PR:

@JackBoosY: Why? This looks like the same issue marble had in another PR. Maybe there is some issue with the newer CMake version?

@JackBoosY
Copy link
Contributor

@Neumann-A So can you make a new PR to fix that?

@JackBoosY
Copy link
Contributor

Can you please merge to master?

@JackBoosY
Copy link
Contributor

Ping @dweckmann for response.

@dweckmann
Copy link
Contributor Author

Ping @dweckmann for response.

Sorry, I don't have time to spend on this anymore as we are focused on other subjects right now. I really wish I could help further, but I cannot make any promise, sorry again. Feel free to close the PR or re-author it.

@JackBoosY JackBoosY marked this pull request as draft October 8, 2021 01:18
@JackBoosY
Copy link
Contributor

Okay, please continue your PR in any time.

@JackBoosY
Copy link
Contributor

If you want to continue this PR, please reopen.

@JackBoosY JackBoosY closed this Jan 6, 2022
@FrankXie05
Copy link
Contributor

@dweckmann Is still work for this PR? Please reply me

@dweckmann
Copy link
Contributor Author

dweckmann commented Jan 28, 2022

@dweckmann Is still work for this PR? Please reply me

@FrankXie05 The last time I checked, only the patch for lz4 in VTK is still relevant. I guess you have to strip all other patches and only keep that.

Feel free to take this pr as basis and reopen.

@FrankXie05
Copy link
Contributor

@dweckmann Thanks for your reply, I will submit a PR to verify it. :)

@dweckmann dweckmann deleted the vtk-fix-find-lz4-hdf5-PEGL branch July 21, 2023 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VTK - ITK - HDF5 Conflicts and are unusable together
8 participants