-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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] link error when linking agains vtk:x64-windows-static #9947
Comments
Confirmed. |
After changing |
Somehow I am still getting the same error. I updated my local copy of vcpkg, made sure that the relevant change was there, then reinstalled VTK (vtk:x64-windows-static) from scratch. I then deleted the cache for my sample project and reconfigured and rebuilt it, but I'm still getting the pugixml link error. |
@dbonhaus Could you provide failure log? |
The error message is not very informative: The problem seems to be that pugixml.lib is in the project properties, but without an absolute path. I uploaded a snapshot of the linker properties in Visual Studio. Let me know if there is another log file that might be more informative and I will provide it. |
@dbonhaus |
No, the project was generated by CMake (3.16.0). |
Confimed.
|
@JackBoosY I am having the same issue after updating vcpkg packages (one of which was vtk). |
In IO\CityGML\CMakeLists.txt:
I think this is caused by the incorrect use of pugixml. |
@dbonhaus @manvscode If it works, I will open a PR to fix it. |
Hello @JackBoosY. |
@RamadanAhmed Sorry, we should include
|
@JackBoosY after applying suggested changes I see the same issue with the pugixml.lib unfortunately. |
Just ran into the same problem. What solved it temporarily for me is adding these two lines at the end of the installed
Look forward to the proper fix. |
I no longer see link errors involving pugixml, but I see two new ones:
I have the 2020.01 tag of vcpkg checked out. |
@JackBoosY @RamanKutseika @dbonhaus I can confirm that adding these lines to VTKConfig.cmake, at line 110, will fix the problem:
I tested both linking debug and release binaries. I do not see any problems with liblzma. |
@RamanKutseika Port |
@dbonhaus And
|
Hi guys, I've fixed this issue in #10379, please update vcpkg and rebuild vtk. Thanks. |
I just tried the latest vcpkg and I'm still seeing problems with lzma (but not with pugixml). I'm not sure I follow your comment. Are you saying I should explicitly specify lzma as a dependency in my CMake file? Shouldn't VTK take care of the dependency? Everything seems to be as you indicated in the VTK config files. |
@dbonhaus Could you provide the failure log? |
Here are the link errors:
|
@dbonhaus Could you provide the full log? Thanks. |
I modified the test project to reproduce the error. I also included the CMake cache file. I suspect something about the CMake configuration either is the problem or triggers the problem. |
There seem to be a lot more problems with the test project associated with the use of the static run time (x64-windows-static). I added /MT to the CXX flags but it didn't help. |
Well, now I can confirm that this issue still exists and I will continue to deal with this issue. |
|
@Neumann-A Seems the export cmake files has problem, what do you think? |
@JackBoosY: Is ParaView not built in x64-windows-static CI? I would have thought that this would have found such an issue in VTK (or LZMA). |
@JackBoosY I checked the logs of #12342 and Paraview built fine with it. Maybe the problem is linking against |
@Neumann-A ParaView is not added to the pre-build process currently, and this issue appeared before adding ParaView. @dbonhaus Does this issue still exist? Please note to use |
I've the same issue with vcpkg using wide integration. |
@GeneralAdmin More details please? |
I no longer see any link errors as of vcpkg 2020.11 if I use find_package(VTK CONFIG REQUIRED). It doesn't work with lower case vtk. If I specify components in the find_package command, I see the link error again, but that seems like a VTK issue rather than a vcpkg issue. |
@dbonhaus thanks for the information. |
Hi @martinken, can you please take a look? In the share folder: Directory of F:\vcpkg\installed\x64-windows-static\share\vtk
11/13/2020 12:15 AM <DIR> .
11/13/2020 12:15 AM <DIR> ..
06/24/2020 08:25 AM 1,761 copyright
11/13/2020 12:02 AM 1,063 Finddouble-conversion.cmake
11/13/2020 12:02 AM 1,396 FindEigen3.cmake
11/13/2020 12:02 AM 4,029 FindEXPAT.cmake
11/13/2020 12:02 AM 6,470 FindFFMPEG.cmake
11/13/2020 12:02 AM 1,739 FindFontConfig.cmake
11/13/2020 12:02 AM 7,447 FindFreetype.cmake
11/13/2020 12:02 AM 1,490 FindGL2PS.cmake
11/13/2020 12:02 AM 905 FindGLEW.cmake
11/13/2020 12:02 AM 1,905 FindJOGL.cmake
11/13/2020 12:02 AM 1,874 FindJsonCpp.cmake
11/13/2020 12:02 AM 3,697 FindLibHaru.cmake
11/13/2020 12:02 AM 2,901 FindLibPROJ.cmake
11/13/2020 12:02 AM 4,104 FindLibXml2.cmake
11/13/2020 12:02 AM 136 FindLZ4.cmake
11/13/2020 12:02 AM 3,208 FindLZMA.cmake
11/13/2020 12:02 AM 1,226 Findmpi4py.cmake
11/13/2020 12:02 AM 3,815 FindMySQL.cmake
11/13/2020 12:02 AM 3,654 FindNetCDF.cmake
11/13/2020 12:02 AM 2,162 FindODBC.cmake
11/13/2020 12:02 AM 688 FindOGG.cmake
11/13/2020 12:02 AM 23,053 FindOpenMP.cmake
11/13/2020 12:02 AM 1,298 FindOpenSlide.cmake
11/13/2020 12:02 AM 1,659 FindOpenVR.cmake
11/13/2020 12:02 AM 2,223 FindOSMesa.cmake
11/13/2020 12:02 AM 2,125 FindPEGTL.cmake
11/13/2020 12:02 AM 15,952 FindTBB.cmake
11/13/2020 12:02 AM 2,078 FindTHEORA.cmake
11/13/2020 12:02 AM 578 Findutf8cpp.cmake
11/13/2020 12:15 AM <DIR> patches
11/12/2020 10:53 PM 2,916 vcpkg_abi_info.txt
11/13/2020 12:02 AM 1,419 vtk-config-version.cmake
11/13/2020 12:02 AM 14,448 vtk-config.cmake
11/13/2020 12:02 AM 244 vtk-prefix.cmake
11/13/2020 12:02 AM 58,291 VTK-targets-debug.cmake
11/13/2020 12:02 AM 57,693 VTK-targets-release.cmake
11/13/2020 12:02 AM 59,557 VTK-targets.cmake
11/13/2020 12:02 AM 18 vtk-use-file-compat.cmake
11/13/2020 12:02 AM 84 vtk-use-file-deprecated.cmake
11/13/2020 12:02 AM 181 vtk-use-file-error.cmake
11/13/2020 12:02 AM 53,008 VTK-vtk-module-find-packages.cmake
11/13/2020 12:02 AM 298,605 VTK-vtk-module-properties.cmake
11/13/2020 12:02 AM 525 vtkCMakeBackports.cmake
11/13/2020 12:02 AM 4,687 vtkDetectLibraryType.cmake
11/13/2020 12:02 AM 7,469 vtkEncodeString.cmake
11/13/2020 12:02 AM 3,218 vtkHashSource.cmake
11/13/2020 12:02 AM 191,813 vtkModule.cmake
11/13/2020 12:02 AM 13,259 vtkModuleGraphviz.cmake
11/13/2020 12:02 AM 7,093 vtkModuleJson.cmake
11/13/2020 12:02 AM 21,956 vtkModuleTesting.cmake
11/13/2020 12:02 AM 14,383 vtkModuleWrapJava.cmake
11/13/2020 12:02 AM 44,651 vtkModuleWrapPython.cmake
11/13/2020 12:02 AM 6,669 vtkObjectFactory.cmake
06/24/2020 08:25 AM 1,958 vtkObjectFactory.cxx.in
06/24/2020 08:25 AM 1,680 vtkObjectFactory.h.in
11/13/2020 12:02 AM 289 vtkTestingDriver.cmake
11/13/2020 12:02 AM 2,880 vtkTestingRenderingDriver.cmake
11/13/2020 12:02 AM 5,621 vtkTopologicalSort.cmake
57 File(s) 979,251 bytes
3 Dir(s) 814,283,091,968 bytes free I found that some cmake files start with uppercase VTK, and the rest start with lowercase vtk. I think there is something wrong here. |
no it is not.....
due to its naming the config can be found via So this issue can be closed since |
@Neumann-A At least our usage is incorrect:
|
On Windows 10 using CMake 3.16.0 with Visual Studio 17, I get the following link error when building against vtk:x64-windows-static:
LINK : fatal error LNK1104: cannot open file 'pugixml.lib'
A sample CMakeLists file is attached. The source file contains an empty main method.
CMakeLists.txt
The text was updated successfully, but these errors were encountered: