vcpkg install blaze:x64-windows --head broken

Created on 18 Sep 2020  ·  6Comments  ·  Source: microsoft/vcpkg

  • OS: Windows
    I used the updated vcpkg.
> .\vcpkg install blaze:x64-windows --head
Computing installation plan...
The following packages will be built and installed:
    blaze[core]:x64-windows (from HEAD)
  * lapack[core]:x64-windows
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Starting package 1/2: lapack:x64-windows
Building package lapack[core]:x64-windows...
Could not locate cached archive: C:\Users\Bita\AppData\Local\vcpkg\archives\3f\3f16cd709cb2af214437ff62d1640c9c67bffb08.zip
-- Configuring x64-windows
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\Bita\AppData\Local\vcpkg\archives\3f\3f16cd709cb2af214437ff62d1640c9c67bffb08.zip
Building package lapack[core]:x64-windows... done
Installing package lapack[core]:x64-windows...
Installing package lapack[core]:x64-windows... done
Elapsed time for package lapack:x64-windows: 21.13 s
Starting package 2/2: blaze:x64-windows
Building package blaze[core]:x64-windows from HEAD...
-- Downloading https://api.bitbucket.com/2.0/repositories/blaze-lib/blaze/refs/branches/master...
-- Skipping hash check for C:/Repos/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.version.
-- Downloading https://bitbucket.com/blaze-lib/blaze/get/master.tar.gz...
-- Skipping hash check for C:/Repos/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.
-- Extracting source C:/Repos/vcpkg/downloads/blaze-lib-blaze-master.tar.gz
-- Applying patch fix-vm-build.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:54 (message):
  Applying patch failed.  Checking patch CMakeLists.txt...

  error: while searching for:

        endif (flag EQUAL 0)?
     endif (APPLE)?

  ?

     if (flag)?
        message("Cache size not found automatically. Using default value as cache size.")?
        set(tmp ${BLAZE_CACHE_SIZE_DEFAULT})?
     endif (flag)?

  ?

     string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp?
     math(EXPR BLAZE_CACHE_SIZE ${tmp}*1024) # Convert to bytes (assuming that the value is given in kibibytes)?

  ?

  endif (${BLAZE_CACHE_SIZE_AUTO})?



  error: patch failed: CMakeLists.txt:145

  error: CMakeLists.txt: patch does not apply

Call Stack (most recent call first):
  scripts/cmake/vcpkg_extract_source_archive_ex.cmake:141 (vcpkg_apply_patches)
  scripts/cmake/vcpkg_from_bitbucket.cmake:189 (vcpkg_extract_source_archive_ex)
  ports/blaze/portfile.cmake:1 (vcpkg_from_bitbucket)
  scripts/ports.cmake:79 (include)


Error: Building package blaze: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: blaze:x64-windows
  Vcpkg version: 2020.06.15-nohash

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

without --head it works properly.

question

All 6 comments

Thanks for posting this issue. .\vcpkg install port_name --head will install the latest version of port from source, the patches may be apply failed in latest version of port. If you want update this port, you can submit an issue to report.

@taless474 We are applying the patch https://bitbucket.org/blaze-lib/blaze/pull-requests/44/ to Blaze before building it, because without that patch we are unable to build Blaze in our test harness. See here:

https://github.com/microsoft/vcpkg/blob/32eccc18191fbb57b159784a1724d2d00613ae82/ports/blaze/portfile.cmake#L7-L8

That patch has already been applied in Blaze's upstream, so applying the patch to --head fails. You can modify the portfile to remove those attempts to patch before attempting to build --head, possibly using overlay ports.

Thank you for your responses.
I am not sure how to use overlay ports. I have tried

vcpkg_from_bitbucket(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO blaze-lib/blaze
    HEAD_REF master
)

in the blaze's portfile.cmake and used .\vcpkg install blaze:x64-windows --head. It seems to work but in the buildtree I see that the last release commit has been installed. I really appreciate it if you explain more how I can fix this.

@taless474

  1. Copy $/ports/blaze to another directory, let's call it "myoverlay".
  2. Edit myoverlay/blaze/portfile.cmake to remove that PATCHES.
  3. Pass --overlay-ports=myoverlay when invoking vcpkg commands.

Example:

PS D:\vcpkg> tree D:\myoverlay /F
Folder PATH listing for volume Dev
Volume serial number is 1093-EAAD
D:\MYOVERLAY
└───blaze
        CONTROL
        fix-vm-build.patch
        portfile.cmake

PS D:\vcpkg> type D:\myoverlay\blaze\portfile.cmake
vcpkg_from_bitbucket(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO blaze-lib/blaze
    REF 0380370f0626de2ad0ec7ea815803e22bbf6b42e
    SHA512 47df2a291febf0565787ed9c4222ee1958d03c5b76c54923e4d8e44f75321c266e81d69ba4512a4ab07d7e431c065d025e01269cf9c1d5f0927f133885def4c7
    HEAD_REF master
)

vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA
    OPTIONS
        -DBLAZE_SMP_THREADS=OpenMP
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH share/blaze/cmake)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
PS D:\vcpkg> .\vcpkg.exe install blaze --head --overlay-ports=D:\myoverlay
Computing installation plan...
The following packages will be built and installed:
    blaze[core]:x86-windows (from HEAD) -- D:\myoverlay\blaze
  * boost-assert[core]:x86-windows
  * boost-build[core]:x86-windows
  * boost-compatibility[core]:x86-windows
  * boost-config[core]:x86-windows
  * boost-container-hash[core]:x86-windows
  * boost-core[core]:x86-windows
  * boost-detail[core]:x86-windows
  * boost-exception[core]:x86-windows
  * boost-integer[core]:x86-windows
  * boost-io[core]:x86-windows
  * boost-modular-build-helper[core]:x86-windows
  * boost-move[core]:x86-windows
  * boost-preprocessor[core]:x86-windows
  * boost-smart-ptr[core]:x86-windows
  * boost-static-assert[core]:x86-windows
  * boost-throw-exception[core]:x86-windows
  * boost-tuple[core]:x86-windows
  * boost-type-traits[core]:x86-windows
  * boost-uninstall[core]:x86-windows
  * boost-utility[core]:x86-windows
  * boost-vcpkg-helpers[core]:x86-windows
  * lapack[core]:x86-windows
  * lapack-reference[blas-select,core,noblas]:x86-windows
  * openblas[core]:x86-windows
  * vcpkg-gfortran[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
Starting package 1/26: boost-uninstall:x86-windows
Building package boost-uninstall[core]:x86-windows...
[... Bill removed lines here to reduce github comment size ...]
Starting package 26/26: blaze:x86-windows
Building package blaze[core]:x86-windows from HEAD...
-- Installing port from location: D:\myoverlay\blaze
-- Downloading https://api.bitbucket.com/2.0/repositories/blaze-lib/blaze/refs/branches/master...
-- Skipping hash check for D:/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.version.
-- Downloading https://bitbucket.com/blaze-lib/blaze/get/master.tar.gz...
-- Skipping hash check for D:/vcpkg/downloads/temp/blaze-lib-blaze-master.tar.gz.
-- Extracting source D:/vcpkg/downloads/blaze-lib-blaze-master.tar.gz
-- Using source at D:/vcpkg/buildtrees/blaze/src/head/c3daf1f845-d874939a6b.clean
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: D:/vcpkg/packages/blaze_x86-windows/share/blaze/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package blaze[core]:x86-windows... done
Installing package blaze[core]:x86-windows...
Installing package blaze[core]:x86-windows... done
Elapsed time for package blaze:x86-windows: 11.13 s

Total elapsed time: 3.055 min

The package blaze:x86-windows provides CMake targets:

    find_package(blaze CONFIG REQUIRED)
    target_link_libraries(main PRIVATE blaze::blaze)

Thank you.

Thanks for posting this issue. This issue has been fixed. So I am closing this issue for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pkeir picture pkeir  ·  3Comments

tzbo picture tzbo  ·  3Comments

ghost picture ghost  ·  3Comments

F0I0l0I0P picture F0I0l0I0P  ·  3Comments

pakdel picture pakdel  ·  3Comments