early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,60 @@
From 5bd55f11e1b6cc2cb08a0001f9c77f56fb8ac649 Mon Sep 17 00:00:00 2001
From: Kevin Lin <developer@kevinlin.info>
Date: Mon, 18 Apr 2022 12:17:40 -0700
Subject: [PATCH] thrift/compiler/compiler.cc: Include fstream to fix
compatibility with Boost 1.79.0 (#494)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Summary:
This patch fixes fbthrift build compatibility with Boost 1.79.0. The symptom is the following compiler error:
```
/opt/mcrouter-build/fbthrift/thrift/compiler/compiler.cc: In function bool apache::thrift::compiler::{anonymous}::generate(const apache::thrift::compiler::{anonymous}::gen_params&, apache::thrift::compiler::t_program*, std::set<std::__cxx11::basic_string<char> >&):
/opt/mcrouter-build/fbthrift/thrift/compiler/compiler.cc:331:19: error: aggregate std::ofstream genfile has incomplete type and cannot be defined
331 | std::ofstream genfile;
| ^~~~~~~
make[2]: *** [thrift/compiler/CMakeFiles/thrift1.dir/build.make:76: thrift/compiler/CMakeFiles/thrift1.dir/compiler.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:253: thrift/compiler/CMakeFiles/thrift1.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
```
To reproduce, install the standard fbthrift dependencies, but with Boost 1.79.0 compiled from source, followed by:
```
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=RELEASE CXXFLAGS="-fPIC" ..
$ make -j
```
Adding an include on `fstream` allows for the build to complete successfully.
Pull Request resolved: https://github.com/facebook/fbthrift/pull/494
Reviewed By: iahs
Differential Revision: D35709922
Pulled By: vitaut
fbshipit-source-id: 96f0764c7b33047acb7b5ad26b21076757aaa5e7
---
thrift/compiler/compiler.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/thrift/compiler/compiler.cc b/thrift/compiler/compiler.cc
index 721ff7dbf3..da944c2950 100644
--- a/thrift/compiler/compiler.cc
+++ b/thrift/compiler/compiler.cc
@@ -32,6 +32,7 @@
#include <unistd.h>
#endif
#include <ctime>
+#include <fstream>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
--
2.34.1.windows.1

65
externals/vcpkg/ports/fbthrift/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,65 @@
vcpkg_find_acquire_program(FLEX)
vcpkg_find_acquire_program(BISON)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/fbthrift
REF v2022.03.21.00
SHA512 8d2d9430dc3a4ecc23042cd9bcf4eee888824449d05d98baec408aef806b934d643e578d3876169f69966c846aeddbe0aa84416c4e020cba028a49d2fccfe7ab
HEAD_REF master
PATCHES 0001-fix-compatibility-with-boost-1.79.0.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DBISON_EXECUTABLE=${BISON}"
"-DFLEX_EXECUTABLE=${FLEX}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fbthrift)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# There should be no empty directories in vcpkg/packages/fbthrift_x64-linux
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/transport/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/util/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/server/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/common/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/core/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/inmemory/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/protocol/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/extensions/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/frozen/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/reflection/docs"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/util/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/visitation/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/server/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/benchmark"
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/thrift/annotation"
)
vcpkg_copy_tools(TOOL_NAMES thrift1 AUTO_CLEAN)
vcpkg_copy_pdbs()
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
"${PACKAGE_PREFIX_DIR}/lib/cmake/fbthrift" "${PACKAGE_PREFIX_DIR}/share/fbthrift")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
"${PACKAGE_PREFIX_DIR}/bin/thrift1.exe" "${PACKAGE_PREFIX_DIR}/tools/fbthrift/thrift1.exe")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
"${PACKAGE_PREFIX_DIR}/bin/thrift1" "${PACKAGE_PREFIX_DIR}/tools/fbthrift/thrift1")
endif()
# Only used internally and removed in master
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftTargets.cmake" "LOCATION_HH=\\\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/thrift/compiler/location.hh\\\"" "")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

34
externals/vcpkg/ports/fbthrift/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,34 @@
{
"name": "fbthrift",
"version-string": "2022.03.21.00",
"port-version": 1,
"description": "Facebook's branch of Apache Thrift, including a new C++ server.",
"homepage": "https://github.com/facebook/fbthrift",
"license": "Apache-2.0",
"supports": "x64 & static",
"dependencies": [
"boost-context",
"boost-filesystem",
"boost-program-options",
"boost-regex",
"boost-system",
"boost-thread",
"fizz",
"fmt",
"folly",
"gflags",
"glog",
"openssl",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"wangle",
"zlib",
"zstd"
]
}