microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.29k stars 6.43k forks source link

[itk] build failure #8985

Closed georgegerdin closed 5 years ago

georgegerdin commented 5 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install itk:x64-windows

Failure logs

C:\vcpkg>vcpkg install itk:x64-windows
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
The following packages will be built and installed:
    itk[core]:x64-windows
Starting package 1/1: itk:x64-windows
Building package itk[core]:x64-windows...
-- Using cached C:/vcpkg/downloads/InsightSoftwareConsortium-ITK-v5.0.1.tar.gz
-- Using source at C:/vcpkg/buildtrees/itk/src/v5.0.1-d4f3d9a818
-- Configuring x64-windows-dbg
-- Configuring x64-windows-rel
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v
    Working Directory: C:/vcpkg/buildtrees/itk/x64-windows-dbg
    See logs for more information:
      C:\vcpkg\buildtrees\itk\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:96 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/itk/portfile.cmake:67 (vcpkg_install_cmake)
  scripts/ports.cmake:94 (include)

Error: Building package itk:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: itk:x64-windows
  Vcpkg version: 2019.09.12-nohash

Additionally, attach any relevant sections from the log files above.

Additional context

[1041/1617] C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1415~1.267\bin\Hostx64\x64\cl.exe   /TP -D_CRT_FAR_MAPPINGS_NO_DEPRECATE -D_CRT_IS_WCTYPE_NO_DEPRECATE -D_CRT_MANAGED_FP_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE_GLOBALS -D_CRT_SECURE_NO_WARNINGS -D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE -D_CRT_TIME_FUNCTIONS_NO_DEPRECATE -D_CRT_VCCLRIT_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -IModules\ThirdParty\Expat\src -IC:\vcpkg\installed\x64-windows\include -IModules\ThirdParty\ZLIB\src -IModules\ThirdParty\GDCM -IModules\ThirdParty\GDCM\src\gdcm\Source\Common -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\MediaStorageAndFileFormat -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\DataDictionary -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\Common -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\InformationObjectDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\MessageExchangeDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++ -IModules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++ /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /bigobj /W0 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoModules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\CMakeFiles\gdcmsocketxx.dir\echo.cpp.obj /FdModules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\CMakeFiles\gdcmsocketxx.dir\gdcmsocketxx.pdb /FS -c C:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\echo.cpp
FAILED: Modules/ThirdParty/GDCM/src/gdcm/Utilities/socketxx/socket++/CMakeFiles/gdcmsocketxx.dir/echo.cpp.obj 
C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1415~1.267\bin\Hostx64\x64\cl.exe   /TP -D_CRT_FAR_MAPPINGS_NO_DEPRECATE -D_CRT_IS_WCTYPE_NO_DEPRECATE -D_CRT_MANAGED_FP_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE_GLOBALS -D_CRT_SECURE_NO_WARNINGS -D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE -D_CRT_TIME_FUNCTIONS_NO_DEPRECATE -D_CRT_VCCLRIT_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -IModules\ThirdParty\Expat\src -IC:\vcpkg\installed\x64-windows\include -IModules\ThirdParty\ZLIB\src -IModules\ThirdParty\GDCM -IModules\ThirdParty\GDCM\src\gdcm\Source\Common -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\MediaStorageAndFileFormat -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\DataDictionary -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\Common -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\InformationObjectDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\MessageExchangeDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++ -IModules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++ /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /bigobj /W0 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoModules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\CMakeFiles\gdcmsocketxx.dir\echo.cpp.obj /FdModules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\CMakeFiles\gdcmsocketxx.dir\gdcmsocketxx.pdb /FS -c C:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\echo.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26729 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(61): error C2079: 'sockerr' uses undefined class 'MY_API'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(61): error C2143: syntax error: missing ';' before ':'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(61): error C2059: syntax error: ':'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(61): error C2059: syntax error: 'public'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(62): error C2143: syntax error: missing ';' before '{'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(62): error C2447: '{': missing function header (old-style formal list?)
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(135): error C2079: 'sockbuf' uses undefined class 'MY_API'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(135): error C2143: syntax error: missing ';' before ':'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(135): error C2059: syntax error: ':'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(135): error C2059: syntax error: 'public'
c:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h(136): error C2143: syntax error: missing ';' before '{'
drescherjm commented 5 years ago

Do you have gdcm already installed?

georgegerdin commented 5 years ago

Do you have gdcm already installed?

C:\vcpkg>vcpkg remove gdcm:x64-windows The following packages are not installed, so not removed: gdcm:x64-windows Package gdcm:x64-windows is not installed Purging package gdcm:x64-windows... Purging package gdcm:x64-windows... done

C:\vcpkg>vcpkg remove gdcm:x86-windows The following packages are not installed, so not removed: gdcm:x86-windows Package gdcm:x86-windows is not installed Purging package gdcm:x86-windows... Purging package gdcm:x86-windows... done

PhoebeHui commented 5 years ago

@georgegerdin, I can't repro this issue, it seems conflict with other port, could you try following steps to check what's header it included?

  1. Open x64 Native tools command prompt for vs2017
  2. Go to C:\vcpkg\buildtrees\itk\x64-windows-dbg
  3. Execute
    cl.exe  /TP -D_CRT_FAR_MAPPINGS_NO_DEPRECATE -D_CRT_IS_WCTYPE_NO_DEPRECATE -D_CRT_MANAGED_FP_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE_GLOBALS -D_CRT_SECURE_NO_WARNINGS -D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE -D_CRT_TIME_FUNCTIONS_NO_DEPRECATE -D_CRT_VCCLRIT_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -IModules\ThirdParty\Expat\src -IC:\vcpkg\installed\x64-windows\include -IModules\ThirdParty\ZLIB\src -IModules\ThirdParty\GDCM -IModules\ThirdParty\GDCM\src\gdcm\Source\Common -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\MediaStorageAndFileFormat -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\DataDictionary -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\Common -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\InformationObjectDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\MessageExchangeDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx -IC:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++ -IModules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++ /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /bigobj /W0 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FS -c C:\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\echo.cpp
  4. It will list the include files, you can check gdcm related headers.

For me:

Note: including file: F:\VCPKG\8538\vcpkg\buildtrees\itk\x64-windows-dbg\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\config.h
Note: including file:  F:\VCPKG\8538\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\local.h
....
Note: including file: F:\VCPKG\8538\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++/echo.h
Note: including file:  F:\VCPKG\8538\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++/protocol.h
Note: including file:   F:\VCPKG\8538\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++/sockinet.h
Note: including file:    F:\VCPKG\8538\vcpkg\buildtrees\itk\x64-windows-dbg\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\config.h
Note: including file:     F:\VCPKG\8538\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\local.h
Note: including file:    f:\vcpkg\8538\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\modules\thirdparty\gdcm\src\gdcm\utilities\socketxx\socket++\sockstream.h
Note: including file:     F:\VCPKG\8538\vcpkg\buildtrees\itk\x64-windows-dbg\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\config.h
Note: including file:      F:\VCPKG\8538\vcpkg\buildtrees\itk\src\v5.0.1-d4f3d9a818\Modules\ThirdParty\GDCM\src\gdcm\Utilities\socketxx\socket++\local.h
georgegerdin commented 5 years ago

@PhoebeHui Thank you for the help. The build was picking up a config.h file from a broken package in the include folder overriding the one generated by the build.