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

x64-windows-static/boost-build: Applying fix_options.patch fails #15456

Closed
emmedve1 opened this issue Jan 5, 2021 · 14 comments
Closed

x64-windows-static/boost-build: Applying fix_options.patch fails #15456

emmedve1 opened this issue Jan 5, 2021 · 14 comments
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@emmedve1
Copy link

emmedve1 commented Jan 5, 2021

As of 2020.11-1-407-g63de431b4:

Starting package 15/72: boost-build:x64-windows-static
Building package boost-build[core]:x64-windows-static...
-- Downloading https://github.com/boostorg/build/archive/boost-1.75.0.beta1.tar.gz...
-- Extracting source C:/Users/e.medve/upstream/vcpkg/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
-- Applying patch fix_options.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:63 (message):
Applying patch failed.
Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:145 (vcpkg_apply_patches)
scripts/cmake/vcpkg_from_github.cmake:154 (vcpkg_extract_source_archive_ex)
ports/boost-build/portfile.cmake:9 (vcpkg_from_github)
scripts/ports.cmake:136 (include)

Error: Building package boost-build:x64-windows-static 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: boost-build:x64-windows-static
Vcpkg version: 2020.11.12-nohash

@PhoebeHui PhoebeHui added the requires:repro The issue is not currently repro-able label Jan 6, 2021
@PhoebeHui
Copy link
Contributor

PhoebeHui commented Jan 6, 2021

@emmedve1, I can't repro this issue locally, the patch applied successfully.

What errors does patch-x64-windows-static-0-err.log show? Could you get latest clean source and try again?

@emmedve1
Copy link
Author

emmedve1 commented Jan 6, 2021

Hello @PhoebeHui,

Said log file is empty:

$ git describe --tags HEAD
v15-14-gd85a196
$ vcpkg install --triplet=x64-windows-static boost-build
Computing installation plan...
The following packages will be built and installed:
    boost-build[core]:x64-windows-static -> 1.75.0.beta1#1
  * boost-uninstall[core]:x64-windows-static -> 1.75.0
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows-static...
Could not locate cached archive: C:\Users\e.medve\AppData\Local\vcpkg\archives\b2\b28b7b70f800266db5e667560c14ae9ba7492802.zip
Could not locate cached archive: C:\Users\e.medve\AppData\Local\vcpkg\archives\2a\2a051a3825b6e1c7056b86169cc2ddaccaeddacc.zip
Starting package 1/2: boost-uninstall:x64-windows-static
Building package boost-uninstall[core]:x64-windows-static...
--
Please use the following command when you need to remove all boost ports/components:
    "./vcpkg remove boost-uninstall:x64-windows-static --recurse"

-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\e.medve\AppData\Local\vcpkg\archives\b2\b28b7b70f800266db5e667560c14ae9ba7492802.zip
Building package boost-uninstall[core]:x64-windows-static... done
Installing package boost-uninstall[core]:x64-windows-static...
Installing package boost-uninstall[core]:x64-windows-static... done
Elapsed time for package boost-uninstall:x64-windows-static: 330.6 ms
Starting package 2/2: boost-build:x64-windows-static
Building package boost-build[core]:x64-windows-static...
-- Downloading https://github.com/boostorg/build/archive/boost-1.75.0.beta1.tar.gz...
-- Extracting source C:/Users/e.medve/upstream/vcpkg/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
-- Applying patch fix_options.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:63 (message):
  Applying patch failed.
Call Stack (most recent call first):
  scripts/cmake/vcpkg_extract_source_archive_ex.cmake:145 (vcpkg_apply_patches)
  scripts/cmake/vcpkg_from_github.cmake:154 (vcpkg_extract_source_archive_ex)
  ports/boost-build/portfile.cmake:9 (vcpkg_from_github)
  scripts/ports.cmake:136 (include)


Error: Building package boost-build:x64-windows-static 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: boost-build:x64-windows-static
  Vcpkg version: 2020.11.12-nohash

Additionally, attach any relevant sections from the log files above.
$ gci buildtrees *.log -r

    Directory: C:\Users\e.medve\upstream\vcpkg\buildtrees\boost-build

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            1/6/2021  9:42 AM              0 extract-err.log
-a---            1/6/2021  9:42 AM              0 extract-out.log
-a---            1/6/2021  9:42 AM              0 patch-x64-windows-static-0-err.log
-a---            1/6/2021  9:42 AM              0 patch-x64-windows-static-0-out.log
-a---            1/6/2021  9:42 AM            610 stdout-x64-windows-static.log

    Directory: C:\Users\e.medve\upstream\vcpkg\buildtrees\boost-uninstall

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            1/6/2021  9:42 AM            156 stdout-x64-windows-static.log

    Directory: C:\Users\e.medve\upstream\vcpkg\buildtrees\detect_compiler

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            1/6/2021  9:42 AM              0 config-x64-windows-static-err.log
-a---            1/6/2021  9:42 AM           2139 config-x64-windows-static-out.log
-a---            1/6/2021  9:42 AM           2269 stdout-x64-windows-static.log

    Directory:
C:\Users\e.medve\upstream\vcpkg\buildtrees\detect_compiler\x64-windows-static-rel\CMakeFiles

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            1/6/2021  9:42 AM           1537 CMakeOutput.log

Cheers,

@emmedve1
Copy link
Author

emmedve1 commented Jan 6, 2021

For reference, here's the non-static triplet build:

$ vcpkg install --triplet=x64-windows boost-build
Computing installation plan...
The following packages will be built and installed:
    boost-build[core]:x64-windows -> 1.75.0.beta1#1
  * boost-uninstall[core]:x64-windows -> 1.75.0
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Could not locate cached archive: C:\Users\e.medve\AppData\Local\vcpkg\archives\c4\c40801595cff4a687a579b962257b0a851496c8a.zip
Could not locate cached archive: C:\Users\e.medve\AppData\Local\vcpkg\archives\86\86bfd20a2161e15ccc282290ac6a921c8f37540a.zip
Starting package 1/2: boost-uninstall:x64-windows
Building package boost-uninstall[core]:x64-windows...
--
Please use the following command when you need to remove all boost ports/components:
    "./vcpkg remove boost-uninstall:x64-windows --recurse"

-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\e.medve\AppData\Local\vcpkg\archives\c4\c40801595cff4a687a579b962257b0a851496c8a.zip
Building package boost-uninstall[core]:x64-windows... done
Installing package boost-uninstall[core]:x64-windows...
Installing package boost-uninstall[core]:x64-windows... done
Elapsed time for package boost-uninstall:x64-windows: 336.5 ms
Starting package 2/2: boost-build:x64-windows
Building package boost-build[core]:x64-windows...
-- Downloading https://github.com/boostorg/build/archive/boost-1.75.0.beta1.tar.gz...
-- Extracting source C:/Users/e.medve/upstream/vcpkg/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
-- Applying patch fix_options.patch
-- Using source at C:/Users/e.medve/upstream/vcpkg/buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.clean
-- Downloading https://raw.githubusercontent.com/boostorg/boost/boost-1.75.0.beta1/LICENSE_1_0.txt...
-- Downloading https://raw.githubusercontent.com/boostorg/boost/boost-1.75.0.beta1/boostcpp.jam...
-- Installing: C:/Users/e.medve/upstream/vcpkg/packages/boost-build_x64-windows/share/boost-build/copyright
-- Installing: C:/Users/e.medve/upstream/vcpkg/packages/boost-build_x64-windows/tools/boost-build/boostcpp.jam
-- Bootstrapping...
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\e.medve\AppData\Local\vcpkg\archives\86\86bfd20a2161e15ccc282290ac6a921c8f37540a.zip
Building package boost-build[core]:x64-windows... done
Installing package boost-build[core]:x64-windows...
Installing package boost-build[core]:x64-windows... done
Elapsed time for package boost-build:x64-windows: 25.11 s

Total elapsed time: 31.75 s

@PhoebeHui
Copy link
Contributor

It's weird, do you install git locally? what revision do you install?

@emmedve1
Copy link
Author

Hello @PhoebeHui,

Dunno what you're asking so here I go:

$ git --version
git version 2.30.0.windows.1
$ git remote -v
origin  https://github.com/microsoft/vcpkg.git (fetch)
origin  https://github.com/microsoft/vcpkg.git (push)
$ git rev-parse --short HEAD
331f87775

Does this help?

Cheers,

@PhoebeHui
Copy link
Contributor

@emmedve1, we merged a PR about applying patch yesterday, could you try the latest source and see if this issue persist?

@JackBoosY
Copy link
Contributor

Maybe related: #15578.

@emmedve1
Copy link
Author

Hello @PhoebeHui,

Same symptoms:

$ git --version
git version 2.30.0.windows.1
$ git describe --tags HEAD
2020.11-1-485-ga8e97d4a4
$ vcpkg install --triplet=x64-windows-static boost-build
Computing installation plan...
The following packages will be built and installed:
    boost-build[core]:x64-windows-static -> 1.75.0.beta1#1
  * boost-uninstall[core]:x64-windows-static -> 1.75.0
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows-static...
Could not locate cached archive: C:\Users\e.medve\AppData\Local\vcpkg\archives\3e\3edcaac7f2efef9572dc5e951f03f3acf7cf5282.zip
Could not locate cached archive: C:\Users\e.medve\AppData\Local\vcpkg\archives\01\0194adc60268f201b2d1c580f3e0a57cf3d40488.zip
Starting package 1/2: boost-uninstall:x64-windows-static
Building package boost-uninstall[core]:x64-windows-static...
--
Please use the following command when you need to remove all boost ports/components:
    "./vcpkg remove boost-uninstall:x64-windows-static --recurse"

-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\e.medve\AppData\Local\vcpkg\archives\3e\3edcaac7f2efef9572dc5e951f03f3acf7cf5282.zip
Building package boost-uninstall[core]:x64-windows-static... done
Installing package boost-uninstall[core]:x64-windows-static...
Installing package boost-uninstall[core]:x64-windows-static... done
Elapsed time for package boost-uninstall:x64-windows-static: 601.5 ms
Starting package 2/2: boost-build:x64-windows-static
Building package boost-build[core]:x64-windows-static...
-- Downloading https://github.com/boostorg/build/archive/boost-1.75.0.beta1.tar.gz -> boostorg-build-boost-1.75.0.beta1.tar.gz...
-- Extracting source C:/Users/e.medve/upstream/vcpkg/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
-- Applying patch fix_options.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:63 (message):
  Applying patch failed.
Call Stack (most recent call first):
  scripts/cmake/vcpkg_extract_source_archive_ex.cmake:145 (vcpkg_apply_patches)
  scripts/cmake/vcpkg_from_github.cmake:154 (vcpkg_extract_source_archive_ex)
  ports/boost-build/portfile.cmake:9 (vcpkg_from_github)
  scripts/ports.cmake:136 (include)


Error: Building package boost-build:x64-windows-static 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: boost-build:x64-windows-static
  Vcpkg version: 2020.11.12--unknownhash

Additionally, attach any relevant sections from the log files above.
$ gci buildtrees/ *.log -r

    Directory: C:\Users\e.medve\upstream\vcpkg\buildtrees\boost-build

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           1/16/2021  2:13 AM              0 extract-err.log
-a---           1/16/2021  2:13 AM              0 extract-out.log
-a---           1/16/2021  2:13 AM              0 patch-x64-windows-static-0-err.log
-a---           1/16/2021  2:13 AM              0 patch-x64-windows-static-0-out.log
-a---           1/16/2021  2:13 AM            654 stdout-x64-windows-static.log

    Directory: C:\Users\e.medve\upstream\vcpkg\buildtrees\boost-uninstall

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           1/16/2021  2:13 AM            156 stdout-x64-windows-static.log

    Directory: C:\Users\e.medve\upstream\vcpkg\buildtrees\detect_compiler

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           1/16/2021  2:13 AM              0 config-x64-windows-static-err.log
-a---           1/16/2021  2:13 AM           2139 config-x64-windows-static-out.log
-a---           1/16/2021  2:13 AM           2293 stdout-x64-windows-static.log

    Directory:
C:\Users\e.medve\upstream\vcpkg\buildtrees\detect_compiler\x64-windows-static-rel\CMakeFiles

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           1/16/2021  2:13 AM           1537 CMakeOutput.log

Cheers.

@JackBoosY
Copy link
Contributor

@emmedve1 Have you installed git manually? If yes, please provide the git version.

Thanks.

@PhoebeHui
Copy link
Contributor

I installed git with latest revision 2.30.0, however I still can't repro this issue.

Starting package 1/1: boost-build:x64-windows-static
Building package boost-build[core]:x64-windows-static...
-- Using cached F:/vcpkg/src/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
-- Cleaning sources at F:/vcpkg/src/buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source F:/vcpkg/src/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
-- Applying patch fix_options.patch
-- Using source at F:/vcpkg/src/buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.clean
-- Using cached F:/vcpkg/src/downloads/boost_LICENSE_1_0.txt
-- Using cached F:/vcpkg/src/downloads/boost-1.75.0.beta1-boostcpp.jam
-- Installing: F:/vcpkg/src/packages/boost-build_x64-windows-static/share/boost-build/copyright
-- Installing: F:/vcpkg/src/packages/boost-build_x64-windows-static/tools/boost-build/boostcpp.jam
-- Bootstrapping...
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\phoebe\AppData\Local\vcpkg\archives\b4\b4eea882c60d48de68ef3029a1cfca6f169c143b.zip
Building package boost-build[core]:x64-windows-static... done
Installing package boost-build[core]:x64-windows-static...
Installing package boost-build[core]:x64-windows-static... done
Elapsed time for package boost-build:x64-windows-static: 20.34 s

Total elapsed time: 24.97 s

@JackBoosY
Copy link
Contributor

Can you please check the Windows region setting about utf-8?
See #12865 (comment).
And is your Windows language other than English?

@emmedve1
Copy link
Author

emmedve1 commented Feb 20, 2021

The important part of the log below is the last command showing git apply... applying the patch without hiccups:

e.medve@la-am300171 ~/upstream/vcpkg $ git --version
git version 2.30.1.windows.1
e.medve@la-am300171 ~/upstream/vcpkg $ git describe HEAD
2020.04-2185-g99dc49dae
e.medve@la-am300171 ~/upstream/vcpkg $ vcpkg install --triplet=x64-windows-static boost-build
Computing installation plan...
The following packages will be built and installed:
    boost-build[core]:x64-windows-static -> 1.75.0.beta1#1
  * boost-uninstall[core]:x64-windows-static -> 1.75.0
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows-static...
Using cached binary package: C:\Users\e.medve\AppData\Local\vcpkg\archives\ec\ec12301c6b475ec69405f923f2c43630810fbf60.zip
Could not locate cached archive: C:\Users\e.medve\AppData\Local\vcpkg\archives\f4\f4cdaa7ed8c3fef7f5d152c0e4dbabb97f4b949d.zip
Starting package 1/2: boost-uninstall:x64-windows-static
Building package boost-uninstall[core]:x64-windows-static...
Building package boost-uninstall[core]:x64-windows-static... done
Installing package boost-uninstall[core]:x64-windows-static...
Installing package boost-uninstall[core]:x64-windows-static... done
Elapsed time for package boost-uninstall:x64-windows-static: 43.01 ms
Starting package 2/2: boost-build:x64-windows-static
Building package boost-build[core]:x64-windows-static...
-- Downloading https://github.com/boostorg/build/archive/boost-1.75.0.beta1.tar.gz -> boostorg-build-boost-1.75.0.beta1.tar.gz...
-- Extracting source C:/Users/e.medve/upstream/vcpkg/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
-- Applying patch fix_options.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:63 (message):
  Applying patch failed.
Call Stack (most recent call first):
  scripts/cmake/vcpkg_extract_source_archive_ex.cmake:145 (vcpkg_apply_patches)
  scripts/cmake/vcpkg_from_github.cmake:154 (vcpkg_extract_source_archive_ex)
  ports/boost-build/portfile.cmake:9 (vcpkg_from_github)
  scripts/ports.cmake:133 (include)


Error: Building package boost-build:x64-windows-static 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: boost-build:x64-windows-static
  Vcpkg version: 2021-01-13-unknownhash

Additionally, attach any relevant sections from the log files above.
e.medve@la-am300171 ~/upstream/vcpkg $ git apply --verbose --unsafe-paths --directory=buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.tmp/build-boost-1.75.0.beta1 ports/boost-build/fix_options.patch
Checking patch buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.tmp/build-boost-1.75.0.beta1/src/tools/msvc.jam...
Applied patch buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.tmp/build-boost-1.75.0.beta1/src/tools/msvc.jam cleanly.

My default language/locale is English/United States, however I do have the Korean language pack installed. Will enable the UTF-8 support and re-test

@emmedve1
Copy link
Author

emmedve1 commented Feb 20, 2021

I can confirm this issue is the same as #16216. I do have VCPKG_FORCE_SYSTEM_BINARIES in my environment. Once I remove it, everything else being the same, the build completes fine

@PhoebeHui
Copy link
Contributor

@emmedve1, thanks for the information! we will use #16216 to track this issue.

@PhoebeHui PhoebeHui added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) and removed requires:repro The issue is not currently repro-able labels Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

No branches or pull requests

3 participants