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

[hdf5] Error: Building package hdf5:x86-windows failed with: BUILD_FAILED #16203

Closed
KKKIIO opened this issue Feb 13, 2021 · 15 comments · Fixed by #20734
Closed

[hdf5] Error: Building package hdf5:x86-windows failed with: BUILD_FAILED #16203

KKKIIO opened this issue Feb 13, 2021 · 15 comments · Fixed by #20734
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@KKKIIO
Copy link

KKKIIO commented Feb 13, 2021

Package: hdf5:x86-windows
Vcpkg version: 2021-01-13-768d8f95c9e752603d2c5901c7a7c7fbdb08af35

console log:

PS C:\src\vcpkg> .\vcpkg.exe install hdf5
Computing installation plan...
The following packages will be built and installed:
    hdf5[core,szip,zlib]:x86-windows -> 1.12.0
Detecting compiler hash for triplet x86-windows...
Could not locate cached archive: C:\Users\xc130\AppData\Local\vcpkg\archives\e8\e8f524cd6f0679420e8f0c8844caac1e61717b28.zip
Starting package 1/1: hdf5:x86-windows
Building package hdf5[core,szip,zlib]:x86-windows...
-- Using cached C:/src/vcpkg/downloads/HDFGroup-hdf5-hdf5-1_12_0.tar.gz
-- Cleaning sources at C:/src/vcpkg/buildtrees/hdf5/src/df5-1_12_0-060e97d1ee.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/src/vcpkg/downloads/HDFGroup-hdf5-hdf5-1_12_0.tar.gz
-- Applying patch hdf5_config.patch
-- Applying patch szip.patch
-- Using source at C:/src/vcpkg/buildtrees/hdf5/src/df5-1_12_0-060e97d1ee.clean
-- Configuring x86-windows-dbg
-- Configuring x86-windows-rel
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:144 (message):
    Command failed: C:/src/vcpkg/downloads/tools/cmake-3.19.2-windows/cmake-3.19.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v -j13
    Working Directory: C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg
    See logs for more information:
      C:\src\vcpkg\buildtrees\hdf5\install-x86-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:27 (vcpkg_build_cmake)
  ports/hdf5/portfile.cmake:63 (vcpkg_install_cmake)
  scripts/ports.cmake:131 (include)


Error: Building package hdf5:x86-windows failed with: BUILD_FAILED

log file(C:\src\vcpkg\buildtrees\hdf5\install-x86-windows-dbg-out.log) content:

[1/347] C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\cl.exe   -D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -D_CONSOLE -D_CRT_SECURE_NO_WARNINGS -IC:\src\vcpkg\installed\x86-windows\include -IC:\src\vcpkg\buildtrees\hdf5\src\df5-1_12_0-060e97d1ee.clean\src -I. /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fosrc\CMakeFiles\H5make_libsettings.dir\H5make_libsettings.c.obj /Fdsrc\CMakeFiles\H5make_libsettings.dir\ /FS -c C:\src\vcpkg\buildtrees\hdf5\src\df5-1_12_0-060e97d1ee.clean\src\H5make_libsettings.c
[2/347] C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\cl.exe   -D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -D_CONSOLE -D_CRT_SECURE_NO_WARNINGS -IC:\src\vcpkg\installed\x86-windows\include -IC:\src\vcpkg\buildtrees\hdf5\src\df5-1_12_0-060e97d1ee.clean\src -I. /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fosrc\CMakeFiles\H5detect.dir\H5detect.c.obj /Fdsrc\CMakeFiles\H5detect.dir\ /FS -c C:\src\vcpkg\buildtrees\hdf5\src\df5-1_12_0-060e97d1ee.clean\src\H5detect.c
[3/347] cmd.exe /C "cd . && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=src\CMakeFiles\H5make_libsettings.dir --rc=C:\PROGRA~2\WI3CF2~1\8.1\bin\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\8.1\bin\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\link.exe  src\CMakeFiles\H5make_libsettings.dir\H5make_libsettings.c.obj  /out:bin\H5make_libsettings.exe /implib:bin\H5make_libsettings.lib /pdb:bin\H5make_libsettings.pdb /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL /subsystem:console  ws2_32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
[4/347] cmd.exe /C "cd . && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=src\CMakeFiles\H5detect.dir --rc=C:\PROGRA~2\WI3CF2~1\8.1\bin\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\8.1\bin\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\link.exe  src\CMakeFiles\H5detect.dir\H5detect.c.obj  /out:bin\H5detect.exe /implib:bin\H5detect.lib /pdb:bin\H5detect.pdb /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL /subsystem:console  ws2_32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
[5/347] cmd.exe /C "cd /D C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg && C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5detect.exe C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5Tinit.c && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E touch C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/gen_SRCS.stamp1"
FAILED: H5Tinit.c gen_SRCS.stamp1 
cmd.exe /C "cd /D C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg && C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5detect.exe C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5Tinit.c && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E touch C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/gen_SRCS.stamp1"
[6/347] cmd.exe /C "cd /D C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg && C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5make_libsettings.exe C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5lib_settings.c && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E touch C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/gen_SRCS.stamp2"
FAILED: H5lib_settings.c gen_SRCS.stamp2 
cmd.exe /C "cd /D C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg && C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5make_libsettings.exe C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5lib_settings.c && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E touch C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/gen_SRCS.stamp2"
ninja: build stopped: subcommand failed.
@StarGate-One
Copy link
Contributor

It would be better to attach (NOT POST), by dragging & dropping the complete log C:\src\vcpkg\buildtrees\hdf5\install-x86-windows-dbg-out.log as the FAILED messages have additional information about any ERRORS/WARNINGS pointing to the actual problem(s).

@KKKIIO
Copy link
Author

KKKIIO commented Feb 14, 2021

sorry, I will attach the log, though the post is the entire content of the file, and I can't find out what's the problem cause the log is quite little.

install-x86-windows-dbg-out.log

@StarGate-One
Copy link
Contributor

  • I can not really find what the issue could be - I cannot reproduce it on my machine, and there are very few google results on the errors:
    FAILED: H5Tinit.c gen_SRCS.stamp1
    FAILED: H5lib_settings.c gen_SRCS.stamp2
  • This issues I have found on those errors deal with cross-compiling to android, which does not seem the issue here.
  • Hopefully someone else has a suggestion and/or solution

@JackBoosY JackBoosY added the requires:repro The issue is not currently repro-able label Feb 18, 2021
@JackBoosY
Copy link
Contributor

Please run command

C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5detect.exe C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5Tinit.c && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E touch C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/gen_SRCS.stamp1"

in directory C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg manually and provide the output.

Thanks.

BTW I think that's a permission issue.

@KKKIIO
Copy link
Author

KKKIIO commented Feb 18, 2021

It's weird that the manual execution of that command not output anything, and .\vcpkg.exe install hdf5 still failed with same error.

These commands were run with administrator privileges:

PS C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg> $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
PS C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg> $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
True
PS C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg> cmd                                                                    Microsoft Windows [Version 10.0.19042.804]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg>C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5detect.exe C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5Tinit.c && C:\src\vcpkg\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E touch C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/gen_SRCS.stamp1

C:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg>cd /D C:\src\vcpkg

C:\src\vcpkg>.\vcpkg.exe install hdf5
Computing installation plan...
The following packages will be built and installed:
    hdf5[core,szip,zlib]:x86-windows -> 1.12.0
Detecting compiler hash for triplet x86-windows...
Could not locate cached archive: C:\Users\xc130\AppData\Local\vcpkg\archives\e8\e8f524cd6f0679420e8f0c8844caac1e61717b28.zip
Starting package 1/1: hdf5:x86-windows
Building package hdf5[core,szip,zlib]:x86-windows...
-- Using cached C:/src/vcpkg/downloads/HDFGroup-hdf5-hdf5-1_12_0.tar.gz
-- Cleaning sources at C:/src/vcpkg/buildtrees/hdf5/src/df5-1_12_0-060e97d1ee.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/src/vcpkg/downloads/HDFGroup-hdf5-hdf5-1_12_0.tar.gz
-- Applying patch hdf5_config.patch
-- Applying patch szip.patch
-- Using source at C:/src/vcpkg/buildtrees/hdf5/src/df5-1_12_0-060e97d1ee.clean
-- Configuring x86-windows-dbg
-- Configuring x86-windows-rel
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:144 (message):
    Command failed: C:/src/vcpkg/downloads/tools/cmake-3.19.2-windows/cmake-3.19.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v -j13
    Working Directory: C:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg
    See logs for more information:
      C:\src\vcpkg\buildtrees\hdf5\install-x86-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:27 (vcpkg_build_cmake)
  ports/hdf5/portfile.cmake:63 (vcpkg_install_cmake)
  scripts/ports.cmake:131 (include)


Error: Building package hdf5:x86-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: hdf5:x86-windows
  Vcpkg version: 2021-01-13-768d8f95c9e752603d2c5901c7a7c7fbdb08af35

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

C:\src\vcpkg>

install-x86-windows-dbg-out.log

@JackBoosY
Copy link
Contributor

JackBoosY commented Feb 19, 2021

@KKKIIO Right. When you run the command manually, there is no output indicating that the command ran successfully.
However, even if you use powershell with administrator permission, you do not have administrator permission to run the command automatically.

So please clone vcpkg in non-system partition and try again.

See code https://github.com/HDFGroup/hdf5/blob/29ab58b58dce556639ea3154e262895773a8a8df/bin/batch/knl_H5detect.sl.in.cmake

@KKKIIO
Copy link
Author

KKKIIO commented Feb 19, 2021

@JackBoosY Thank you for the patience to answer! I tried in Disk D and still failed(use powershell with administrator permission).

I'm sorry that I'm not familiar with cmake and how the code take effect, and I have little time to solve the problem, so I just use ubuntu and apt to get rid of this problem. Thanks for all the help!

log:

PS D:\src\vcpkg> .\vcpkg install hdf5
Computing installation plan...
A suitable version of cmake was not found (required v3.19.2). Downloading portable cmake v3.19.2...
Downloading cmake...
  https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-win32-x86.zip -> D:\src\vcpkg\downloads\cmake-3.19.2-win32-x86.zip
Extracting cmake...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
  https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> D:\src\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
A suitable version of nuget was not found (required v5.5.1). Downloading portable nuget v5.5.1...
Downloading nuget...
  https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe -> D:\src\vcpkg\downloads\22ea847d-nuget.exe
The following packages will be built and installed:
    hdf5[core,szip,zlib]:x86-windows -> 1.12.0
  * szip[core]:x86-windows -> 2.1.1-6
  * zlib[core]:x86-windows -> 1.2.11#9
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
A suitable version of powershell-core was not found (required v7.1.0). Downloading portable powershell-core v7.1.0...
Downloading powershell-core...
  https://github.com/PowerShell/PowerShell/releases/download/v7.1.0/PowerShell-7.1.0-win-x86.zip -> D:\src\vcpkg\downloads\PowerShell-7.1.0-win-x86.zip
Extracting powershell-core...
Using cached binary package: C:\Users\xc130\AppData\Local\vcpkg\archives\0f\0f9f0c00e99aa35de609f6dafbba2e8df70cda8b.zip
Using cached binary package: C:\Users\xc130\AppData\Local\vcpkg\archives\19\1908428253b35c4d512b111af91ac509dc1753ac.zip
Could not locate cached archive: C:\Users\xc130\AppData\Local\vcpkg\archives\c6\c6b5abdf33ea227f70faa04030227b27d353bcd6.zip
Starting package 1/3: szip:x86-windows
Building package szip[core]:x86-windows...
Building package szip[core]:x86-windows... done
Installing package szip[core]:x86-windows...
Installing package szip[core]:x86-windows... done
Elapsed time for package szip:x86-windows: 252.1 ms
Starting package 2/3: zlib:x86-windows
Building package zlib[core]:x86-windows...
Building package zlib[core]:x86-windows... done
Installing package zlib[core]:x86-windows...
Installing package zlib[core]:x86-windows... done
Elapsed time for package zlib:x86-windows: 144 ms
Starting package 3/3: hdf5:x86-windows
Building package hdf5[core,szip,zlib]:x86-windows...
-- Downloading https://github.com/HDFGroup/hdf5/archive/hdf5-1_12_0.tar.gz -> HDFGroup-hdf5-hdf5-1_12_0.tar.gz...
-- Extracting source D:/src/vcpkg/downloads/HDFGroup-hdf5-hdf5-1_12_0.tar.gz
-- Applying patch hdf5_config.patch
-- Applying patch szip.patch
-- Using source at D:/src/vcpkg/buildtrees/hdf5/src/df5-1_12_0-060e97d1ee.clean
-- Configuring x86-windows-dbg
-- Configuring x86-windows-rel
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:144 (message):
    Command failed: D:/src/vcpkg/downloads/tools/cmake-3.19.2-windows/cmake-3.19.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v -j13
    Working Directory: D:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg
    See logs for more information:
      D:\src\vcpkg\buildtrees\hdf5\install-x86-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:27 (vcpkg_build_cmake)
  ports/hdf5/portfile.cmake:63 (vcpkg_install_cmake)
  scripts/ports.cmake:133 (include)


Error: Building package hdf5:x86-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: hdf5:x86-windows
  Vcpkg version: 2021-01-13-768d8f95c9e752603d2c5901c7a7c7fbdb08af35

Additionally, attach any relevant sections from the log files above.
PS D:\src\vcpkg>

install-x86-windows-dbg-out.log

@KKKIIO KKKIIO closed this as completed Feb 19, 2021
@JackBoosY
Copy link
Contributor

Please keep this issue open until we solve it.

@JackBoosY JackBoosY reopened this Feb 20, 2021
@JackBoosY
Copy link
Contributor

c:\vcpkg\buildtrees\realsense2\src\52187533c1-c3b9df90a7.clean\src\winusb\device-winusb.h(14): fatal error C1083: Cannot open include file: 'atlstr.h': No such file or directory

@MaxiTrien Can you please open an issue to report that? I think that's a port bug and not related to this issue.

@brechtsanders
Copy link

brechtsanders commented Apr 23, 2021

I have the same issue with building HDF5 1.12.0 without vcpkg.
H5detect.exe exits with status code 127.
When I run it with GDB I get:

Reading symbols from R:\winlibs64-10.3.0\hdf5-1.10.7\build_static\bin\H5detect.exe...
(gdb) run
Starting program: R:\winlibs64-10.3.0\hdf5-1.10.7\build_static\bin\H5detect.exe

[New Thread 19840.0x41d4]
gdb: unknown target exception 0xc0000028 at 0x7ffae8572266

Thread 1 received signal ?, Unknown signal.
0x00007ffae8572266 in ntdll!RtlRaiseStatus ()
   from C:\Windows\SYSTEM32\ntdll.dll

So the problem is probably in the HDF5 sources.

@brechtsanders
Copy link

Solved it by adding #undef H5_HAVE_LONGJMP at the end of H5pubconf.h (generated by CMake).

@JackBoosY
Copy link
Contributor

@KKKIIO Can you please run command manually::

D:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5make_libsettings.exe D:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5lib_settings.c 

in folder D:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg then provide the result?

@JackBoosY JackBoosY added the requires:more-information This Issue requires more information to solve label May 7, 2021
@KKKIIO
Copy link
Author

KKKIIO commented May 9, 2021

just output a blank line

D:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg# D:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg\bin\H5make_libsettings.exe D:/src/vcpkg/buildtrees/hdf5/x86-windows-dbg/H5lib_settings.c

D:\src\vcpkg\buildtrees\hdf5\x86-windows-dbg#

@JackBoosY
Copy link
Contributor

Let's wait for the upstream reply on HDFGroup/hdf5#636.

@JackBoosY JackBoosY added category:port-bug The issue is with a library, which is something the port should already support depends:upstream-changes Waiting on a change to the upstream project and removed requires:repro The issue is not currently repro-able labels Jul 21, 2021
@JackBoosY
Copy link
Contributor

Hi guys, can anyone test my PR #20734 whether it fix this issue?

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 a pull request may close this issue.

4 participants