mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[fbthrift, fizz, folly, mvfst] Fix dependency resolution. (#23124)
* [fbthrift, fizz, folly] Fix dependency resolution. Found by nightly build https://dev.azure.com/vcpkg/public/_build/results?buildId=67402 * wangle was fixed by a compiler update on a patch tuesday. * this unblocked attempting fbthrift on x64-windows hosts, but it misses a header; added patch already merged upstream adding missing algorithm <include> * fixed folly attempt to insert the right debug prefix which was broken by vcpkg_fixup_cmake_targets no longer generating _IMPORT_PREFIX. * disable dynamic build of fbthrift on Windows because it tries to create DLLs with no import libs (because it makes no exports) * Format and fix version database. * Back out fizz patches. * Block dynamic flavors. (The build in question builds an exe and expects all its dependencies to be linked statically and patching the build system to copy over the right DLLs seems out of scope) * Add libevent patch. * Also fixup mvfst and add missing CONFIG to patch. * Remove unused patch. * Fix version sha
This commit is contained in:
parent
b77f20ec4c
commit
6647a76be8
28
ports/fbthrift/add-missing-algorithm-include.patch
Normal file
28
ports/fbthrift/add-missing-algorithm-include.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From f2151fa730058a1baf23ed3dc082c91df6351da1 Mon Sep 17 00:00:00 2001
|
||||
From: "Zeyi (Rice) Fan" <zeyi@fb.com>
|
||||
Date: Fri, 4 Feb 2022 15:17:53 -0800
|
||||
Subject: [PATCH] fix build failure on Windows
|
||||
|
||||
Summary: Fix a build error on Windows where `std::mismatch` is not found.
|
||||
|
||||
Reviewed By: xavierd
|
||||
|
||||
Differential Revision: D34012963
|
||||
|
||||
fbshipit-source-id: 9f5aa21d03a92fdadf5bc83943a159a2f7872144
|
||||
---
|
||||
thrift/compiler/generate/build_templates.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/thrift/compiler/generate/build_templates.cc b/thrift/compiler/generate/build_templates.cc
|
||||
index 56f13e8dde8..acd9dd30a75 100644
|
||||
--- a/thrift/compiler/generate/build_templates.cc
|
||||
+++ b/thrift/compiler/generate/build_templates.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <algorithm>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
@ -7,13 +7,15 @@ vcpkg_from_github(
|
||||
REF v2022.01.31.00
|
||||
SHA512 159457398fdc0c89c34364b8a89068127c3519ce35af349776016e0ae37ae9508689853e0e371c2065fd715451f466e37c7e3799e054eca02cbc4717809150ab
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
add-missing-algorithm-include.patch # https://github.com/facebook/fbthrift/commit/f2151fa730058a1baf23ed3dc082c91df6351da1
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBISON_EXECUTABLE=${BISON}
|
||||
-DFLEX_EXECUTABLE=${FLEX}
|
||||
"-DBISON_EXECUTABLE=${BISON}"
|
||||
"-DFLEX_EXECUTABLE=${FLEX}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "fbthrift",
|
||||
"version-string": "2022.01.31.00",
|
||||
"port-version": 1,
|
||||
"description": "Facebook's branch of Apache Thrift, including a new C++ server.",
|
||||
"homepage": "https://github.com/facebook/fbthrift",
|
||||
"supports": "x64",
|
||||
"supports": "x64 & static",
|
||||
"dependencies": [
|
||||
"boost-context",
|
||||
"boost-filesystem",
|
||||
|
30
ports/fizz/0002-fix-libevent.patch
Normal file
30
ports/fizz/0002-fix-libevent.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt
|
||||
index 80c5051..9f2e3e6 100644
|
||||
--- a/fizz/CMakeLists.txt
|
||||
+++ b/fizz/CMakeLists.txt
|
||||
@@ -92,10 +92,10 @@ endif()
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
-find_package(Libevent CONFIG QUIET)
|
||||
-if(TARGET event)
|
||||
+find_package(Libevent CONFIG REQUIRED)
|
||||
+if(TARGET libevent::core)
|
||||
message(STATUS "Found libevent from package config")
|
||||
- list(APPEND FIZZ_SHINY_DEPENDENCIES event)
|
||||
+ list(APPEND FIZZ_SHINY_DEPENDENCIES libevent::core)
|
||||
else()
|
||||
find_package(Libevent MODULE REQUIRED)
|
||||
list(APPEND FIZZ_LINK_LIBRARIES ${LIBEVENT_LIB})
|
||||
diff --git a/fizz/cmake/fizz-config.cmake.in b/fizz/cmake/fizz-config.cmake.in
|
||||
index b28750f..282c42d 100644
|
||||
--- a/fizz/cmake/fizz-config.cmake.in
|
||||
+++ b/fizz/cmake/fizz-config.cmake.in
|
||||
@@ -29,6 +29,7 @@ include(CMakeFindDependencyMacro)
|
||||
find_dependency(unofficial-sodium CONFIG REQUIRED)
|
||||
find_dependency(folly CONFIG)
|
||||
find_dependency(ZLIB)
|
||||
+find_dependency(Libevent CONFIG)
|
||||
|
||||
if (NOT fizz_FIND_QUIETLY)
|
||||
message(STATUS "Found fizz: ${PACKAGE_PREFIX_DIR}")
|
@ -8,12 +8,15 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-fix-libsodium.patch
|
||||
0002-fix-libevent.patch
|
||||
)
|
||||
|
||||
# Prefer installed config files
|
||||
file(REMOVE
|
||||
${SOURCE_PATH}/fizz/cmake/FindGMock.cmake
|
||||
${SOURCE_PATH}/fizz/cmake/FindGflags.cmake
|
||||
${SOURCE_PATH}/fizz/cmake/FindGlog.cmake
|
||||
${SOURCE_PATH}/fizz/cmake/FindLibevent.cmake
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
@ -1,11 +1,14 @@
|
||||
{
|
||||
"name": "fizz",
|
||||
"version-string": "2022.01.31.00",
|
||||
"port-version": 1,
|
||||
"description": "a TLS 1.3 implementation by Facebook",
|
||||
"homepage": "https://github.com/facebookincubator/fizz",
|
||||
"dependencies": [
|
||||
"double-conversion",
|
||||
"fmt",
|
||||
"folly",
|
||||
"libevent",
|
||||
"libsodium",
|
||||
"openssl",
|
||||
{
|
||||
|
@ -72,9 +72,9 @@ vcpkg_cmake_config_fixup()
|
||||
# We substitute with generator expressions so that the right libraries are linked for debug and release.
|
||||
set(FOLLY_TARGETS_CMAKE "${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake")
|
||||
FILE(READ ${FOLLY_TARGETS_CMAKE} _contents)
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/zlib.lib" "ZLIB::ZLIB" _contents "${_contents}")
|
||||
STRING(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
|
||||
STRING(REPLACE "\${_IMPORT_PREFIX}/debug/lib/" "\${_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
|
||||
string(REPLACE "\${VCPKG_IMPORT_PREFIX}/lib/zlib.lib" "ZLIB::ZLIB" _contents "${_contents}")
|
||||
STRING(REPLACE "\${VCPKG_IMPORT_PREFIX}/lib/" "\${VCPKG_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
|
||||
STRING(REPLACE "\${VCPKG_IMPORT_PREFIX}/debug/lib/" "\${VCPKG_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
|
||||
string(REPLACE "-vc140-mt.lib" "-vc140-mt\$<\$<CONFIG:DEBUG>:-gd>.lib" _contents "${_contents}")
|
||||
FILE(WRITE ${FOLLY_TARGETS_CMAKE} "${_contents}")
|
||||
FILE(READ "${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake" _contents)
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "folly",
|
||||
"version-string": "2022.01.31.00",
|
||||
"port-version": 1,
|
||||
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
|
||||
"homepage": "https://github.com/facebook/folly",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -13,6 +13,14 @@ vcpkg_cmake_configure(
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
)
|
||||
|
||||
# Prefer installed config files
|
||||
file(REMOVE
|
||||
${SOURCE_PATH}/fizz/cmake/FindGMock.cmake
|
||||
${SOURCE_PATH}/fizz/cmake/FindGflags.cmake
|
||||
${SOURCE_PATH}/fizz/cmake/FindGlog.cmake
|
||||
${SOURCE_PATH}/fizz/cmake/FindLibevent.cmake
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mvfst)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "mvfst",
|
||||
"version": "0.2",
|
||||
"port-version": 1,
|
||||
"description": "mvfst (Pronounced move fast) is a client and server implementation of IETF QUIC protocol in C++ by Facebook.",
|
||||
"homepage": "https://github.com/facebookincubator/mvfst",
|
||||
"supports": "!windows",
|
||||
|
@ -1428,12 +1428,6 @@ usbmuxd:x64-windows-static-md=fail
|
||||
workflow:x64-uwp=fail
|
||||
workflow:arm-uwp=fail
|
||||
|
||||
# wangle triggers an internal compiler error
|
||||
# https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/1269468
|
||||
wangle:x64-windows=fail
|
||||
wangle:x64-windows-static=fail
|
||||
wangle:x64-windows-static-md=fail
|
||||
|
||||
# VS2019 version 16.9.4's project system changes where PDBs are placed in a way that breaks the
|
||||
# upstream build script of this port.
|
||||
# See https://developercommunity.visualstudio.com/t/Toolset-169-regression-vcxproj-producin/1356639
|
||||
|
@ -2138,7 +2138,7 @@
|
||||
},
|
||||
"fbthrift": {
|
||||
"baseline": "2022.01.31.00",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"fcl": {
|
||||
"baseline": "0.7.0",
|
||||
@ -2174,7 +2174,7 @@
|
||||
},
|
||||
"fizz": {
|
||||
"baseline": "2022.01.31.00",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"flann": {
|
||||
"baseline": "2019-04-07",
|
||||
@ -2230,7 +2230,7 @@
|
||||
},
|
||||
"folly": {
|
||||
"baseline": "2022.01.31.00",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"font-chef": {
|
||||
"baseline": "1.1.0",
|
||||
@ -4634,7 +4634,7 @@
|
||||
},
|
||||
"mvfst": {
|
||||
"baseline": "0.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"mygui": {
|
||||
"baseline": "3.4.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "bf1148604c897c7727621feb13713eac7e782497",
|
||||
"version-string": "2022.01.31.00",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "f92f736e3c525d5ac52b546eae1e0b9cf880b382",
|
||||
"version-string": "2022.01.31.00",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "57fdd6342f89ccc3569b1a3416be67cd8dd7b59d",
|
||||
"version-string": "2022.01.31.00",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "14651559e385107d92830b5464007f7b49a1ce4c",
|
||||
"version-string": "2022.01.31.00",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "10d3306d94114d0916a4691c131e233c08dc9090",
|
||||
"version-string": "2022.01.31.00",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "b6f74d739ff2aef400ac83919bd9753eb1cc647f",
|
||||
"version-string": "2022.01.31.00",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "042a5236f46c787daf8334a8ca9c0cd3f71ab1b4",
|
||||
"version": "0.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "72ff9157858363c60db8f1e0bd8de03546f7d0e4",
|
||||
"version": "0.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user