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] VTK ExprTk cmake patch #29801

Closed
wants to merge 2 commits into from
Closed

[VTK] VTK ExprTk cmake patch #29801

wants to merge 2 commits into from

Conversation

ArashPartow
Copy link
Contributor

This patch is intended to unblock the following PR: #29665

and is based on this VTK MR: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9981

@ArashPartow
Copy link
Contributor Author

@ LilyWangLL / @JonLiu1993 / @FrankXie05 when you have a moment can you please review and merge this PR.

@dg0yt
Copy link
Contributor

dg0yt commented Feb 23, 2023

Past PRs: #29775, #29665.
It is probably easier if you don't re-start a new PR after each change. Just add new commits with the requested changes.

@ArashPartow
Copy link
Contributor Author

@dg0yt The PR #29665 is awaiting this PR to be merged - it has to remain a seperate PR as it is for another project.

@JonLiu1993 JonLiu1993 changed the title VTK ExprTk cmake patch [exprtk] VTK ExprTk cmake patch Feb 23, 2023
@JonLiu1993 JonLiu1993 changed the title [exprtk] VTK ExprTk cmake patch [VTK] VTK ExprTk cmake patch Feb 23, 2023
@JonLiu1993 JonLiu1993 added the category:port-bug The issue is with a library, which is something the port should already support label Feb 23, 2023
@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Feb 23, 2023
@JavierMatosD JavierMatosD added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Feb 23, 2023
@ArashPartow
Copy link
Contributor Author

ArashPartow commented Feb 23, 2023

@JavierMatosD Looks like "microsoft.vcpkg.pr (x86_windows) " needs to be rerun, I don't have perms to rerun that part, can you please trigger it.

 C:\a\1\s\scripts\bootstrap.ps1 : Downloading vcpkg.exe failed. Please check your internet connection, or consider
 downloading a recent vcpkg.exe from ***-tool with a browser.
 At line:1 char:4
 + & {& 'C:\a\1\s\scripts\bootstrap.ps1' }
 +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,bootstrap.ps1
 
 ScriptHalted
 At C:\a\1\s\scripts\bootstrap.ps1:60 char:5
 +     throw
 +     ~~~~~
     + CategoryInfo          : OperationStopped: (:) [], RuntimeException
     + FullyQualifiedErrorId : ScriptHalte
.
.
.
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\a\_temp\752f9bab-25b9-4eb4-b2a4-c5176e8b748b.ps1'"
./vcpkg.exe : The term './vcpkg.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\a\1\s\scripts\azure-pipelines\windows\validate-version-files.ps1:1 char:1
+ ./vcpkg.exe --feature-flags=versions x-ci-verify-versions --verbose |
+ ~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (./vcpkg.exe:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CommandNotFoundException
##[error]PowerShell exited with code '1'.

@JonLiu1993 JonLiu1993 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Feb 24, 2023
@ArashPartow
Copy link
Contributor Author

@JonLiu1993 / @ LilyWangLL / @FrankXie05 if there's nothing else can this be merged as the following PR depends on this being merged first: #29665

Comment on lines +9 to +13
-# find_package(ExprTk 2.71828)
-# to require version 2.71828 or newer of ExprTk.
+# find_package(ExprTk 2.7)
+# to require version 2.7 or newer of ExprTk.
#
Copy link
Contributor

Choose a reason for hiding this comment

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

This find_package call needs to be patched out to remove the version constraint entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a comment in the CMake.

Comment on lines +33 to +50
+ file(STRINGS "${ExprTk_INCLUDE_DIR}/exprtk.hpp" _exprtk_version_header REGEX "\"[0-9.]+\"")
+ set(ExprTk_VERSION)
+ foreach (_exprtk_version_line IN LISTS _exprtk_version_header)
+ if ("${ExprTk_VERSION}" STREQUAL "")
+ string(REGEX MATCH "version = \"(2\.7[0-9.]+)\".*$" _exprtk_version_match "${_exprtk_version_line}")
+ set(ExprTk_VERSION "${CMAKE_MATCH_1}")
+ else ()
+ string(REGEX MATCH "\"([0-9.]+)\".*$" _exprtk_version_match "${_exprtk_version_line}")
+ set(ExprTk_VERSION "${ExprTk_VERSION}${CMAKE_MATCH_1}")
+ endif ()
+ if (_exprtk_version_match MATCHES "\;")
+ break()
+ endif ()
+ endforeach ()
+ if (NOT ExprTk_VERSION)
+ # fallback: version in exprtk.hpp has always started with 2.7
+ set(ExprTk_VERSION "2.7")
+ endif ()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we need to know the version? I believe this should be patched out to remove any version constraints.

Copy link
Contributor Author

@ArashPartow ArashPartow Feb 24, 2023

Choose a reason for hiding this comment

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

@JavierMatosD I'm not sure about the answer to that as I am not familiar with the VTK build setup. For more details there is a discussion here: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9981

My objective is to get this PR merged to unblock the following PR: #29665 that has been around for some time now. As there are several projects I know of that use ExprTk via vcpkg and do not require/depend on VTK that are waiting on the version bump.

@JavierMatosD in short I'm happy for you to improve this particular cmake as a separate PR. Even better yet if you have any ideas on how to remove the dependency on this PR https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9981 requiring VTK to build as that would make life much easier for all invovled.


@LilyWangLL / @JonLiu1993 / @FrankXie05 / @MonicaLiu0311 / @BillyONeal If there is nothing else that needs doing can we please merge this PR.

@JavierMatosD JavierMatosD added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Feb 24, 2023
@ArashPartow ArashPartow reopened this Feb 26, 2023
@ArashPartow ArashPartow closed this by deleting the head repository Mar 1, 2023
@ArashPartow ArashPartow reopened this Mar 7, 2023
@ArashPartow ArashPartow closed this Mar 7, 2023
@dg0yt dg0yt mentioned this pull request Mar 7, 2023
5 tasks
@ArashPartow ArashPartow mentioned this pull request Dec 30, 2024
4 tasks
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.

4 participants