-
Notifications
You must be signed in to change notification settings - Fork 118
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
WIP: Use vcpkg to get ITK #161
base: main
Are you sure you want to change the base?
Conversation
Compilation errors at https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=467 for example:
because of ITK_LEGACY_REMOVE: |
The missing ITK legacy support should be added by microsoft/vcpkg#7241 |
Interesting compile errors at https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=505:
And also link errors:
|
2b8b064
to
da7e61a
Compare
@dzenanz Dženan I'm still trying to build elastix with ITK from vcpkg, but we're getting link errors, at https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=516:
Could this be because Do you have a suggestion how to avoid these link errors? |
There was some work regarding |
Thanks @dzenanz Unfortunately the virtual machine I'm using at azure, 'vs2017-win2016', still has a vcpkg git repository of July 16: microsoft/vcpkg@ac00ef2 I guess I just have to wait. Did you also get those double-conversion.lib link errors from ITK 5.0.0 at vcpkg? |
Those errors do look familiar. You can look at InsightSoftwareConsortium/ITK#579 and stuff linked from there. |
Thanks @dzenanz ! So what would then happen when |
That should use double-conversion from |
In the azure pipelines yml file of elastix (of this PR), I just did:
See elastix/Testing/CI/Azure/ci.yml Line 13 in ceafb80
Is that sufficient, or should it also have vcpkg.exe install double-conversion ?
|
|
bdaeb33
to
2e0e6a4
Compare
@dzenanz I finally got elastix building at azure vmImage 'vs2017-win2016', with ITK 5.0.1 from vcpkg (latest ITK portfile.cmake). But I have been cheating! I added
I did so to avoid link errors. Do you have a suggestion how to avoid such an ugly workaround? |
Perhaps execute |
Thanks @dzenanz I gave it a try, 97a013f and it looks like your suggestion almost fixes the problem! It adds "C:\vcpkg\installed\x64-windows\lib" to the linker. Which does contain "double-conversion.lib", the file mentioned in the link error:
However, the linker still cannot find the lib file, as it is looking for "\lib\double-conversion.lib". If it was just looking for "double-conversion.lib", it would have found it in "C:\vcpkg\installed\x64-windows\lib". Now it still can't find the file: https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=505 Do you have one more suggestion, please? |
That might be a bug in |
Fixed by ugly `link_directories` quick-fix. See also #161 (comment)
@dzenanz Update: yesterday I got elastix fully building with ITK 5.0.1 from vcpkg. It appeared essential to do For the time being, we could leave that hack in there. But I still find the build times too long: more than two hours for an entire elastix build, of which almost an hour is spent building and installing ITK. I hope the new Azure Pipelines |
Fixed by ugly `link_directories` quick-fix. See also #161 (comment)
Hoping to fix: > LINK : fatal error LNK1181: cannot open input file '\lib\double-conversion.lib' Dženan Zukić @dzenanz informed us that there was some work regarding ITK_USE_SYSTEM_DOUBLECONVERSION between IK 5.0.0 and 5.0.1, which might solve this problem.
Suggested by Dženan Zukić @dzenanz
Fixed by ugly `link_directories` quick-fix. See also #161 (comment)
Yet another attempt to fix those link errors
Suggested at "Disable automatic integration for a particuar VS project" microsoft/vcpkg#281
Check if it still compiles with VcpkgEnabled=true
Work around the CMake Error at https://dev.azure.com/kaspermarstal/Elastix/_build/results?buildId=971&view=logs&j=8113fa60-6c65-540e-d189-4caa7b0fea60&t=ec6f6503-6d4b-5e80-e979-365ac800d840 > CMake Error at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:493 (_find_package): > Could not find a configuration file for package "ITK" that is compatible > with requested version "5.1.1". > > The following configuration files were considered but not accepted: > > C:/vcpkg/installed/x64-windows/share/itk/ITKConfig.cmake, version: 5.1.0
See also https://discourse.itk.org/t/how-to-avoid-rebuilding-itk-by-azure-ci-at-the-github-of-another-project-elastix/2002