Open fmoo opened 3 weeks ago
Updating the second to last line of the patch to include a single whitespace seems to fix it locally for me:
diff --git a/build/fbcode_builder/patches/boost_comparator_operator_fix.patch b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch
index 3771f2fff..45ee266b0 100644
--- a/build/fbcode_builder/patches/boost_comparator_operator_fix.patch
+++ b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch
@@ -8,4 +8,4 @@ diff --git a/boost/serialization/strong_typedef.hpp b/boost/serialization/strong
+ bool operator==(const T& lhs) const {return t == lhs;} \
bool operator<(const D& rhs) const {return t < rhs.t;} \
};
-
+
Zlib needed four similarly:
diff --git a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch
index 2ef115714..134191551 100644
--- a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch
+++ b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch
@@ -4,7 +4,7 @@ diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt
@@ -149,10 +149,8 @@
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
-
+
-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
@@ -12,9 +12,9 @@ diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt
-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
set_target_properties(zlib PROPERTIES SOVERSION 1)
-
+
@@ -169,7 +167,7 @@
-
+
if(UNIX)
# On unix-like platforms the library is almost always called libz
- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
@@ -24,7 +24,7 @@ diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt
endif()
@@ -179,7 +177,7 @@
endif()
-
+
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
- install(TARGETS zlib zlibstatic
+ install(TARGETS zlib
Zlib needed four similarly:
diff --git a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch
index 2ef115714..134191551 100644
--- a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch
+++ b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch
@@ -4,7 +4,7 @@ diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt
@@ -149,10 +149,8 @@
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
-
+
-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
@@ -12,9 +12,9 @@ diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt
-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
set_target_properties(zlib PROPERTIES SOVERSION 1)
-
+
@@ -169,7 +167,7 @@
-
+
if(UNIX)
# On unix-like platforms the library is almost always called libz
- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
@@ -24,7 +24,7 @@ diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt
endif()
@@ -179,7 +177,7 @@
endif()
-
+
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
- install(TARGETS zlib zlibstatic
+ install(TARGETS zlib
After this, I got all the way up to folly, which failed with:
CMake Error at C:/source/proxygen/_build/boost-Ct8ZMk_J_pyqyHLfrydelwvlfzw-NfC_5D8VmaRrOvw/lib/cmake/Boost-1.83.0/BoostConfig.cmake:141 (find_package):
Found package configuration file:
C:/source/proxygen/_build/boost-Ct8ZMk_J_pyqyHLfrydelwvlfzw-NfC_5D8VmaRrOvw/lib/cmake/boost_context-1.83.0/boost_context-config.cmake
but it set boost_context_FOUND to FALSE so package "boost_context" is
considered to be NOT FOUND. Reason given by package:
No suitable build variant has been found.
The following variants have been tried and rejected:
* boost_context-vc143-mt-x64-1_83.lib (vc143, detected vc141, set
Boost_COMPILER to override)
* libboost_context-vc143-mt-x64-1_83.lib (vc143, detected vc141, set
Boost_COMPILER to override)
Call Stack (most recent call first):
C:/source/proxygen/_build/boost-Ct8ZMk_J_pyqyHLfrydelwvlfzw-NfC_5D8VmaRrOvw/lib/cmake/Boost-1.83.0/BoostConfig.cmake:262 (boost_find_component)
C:/source/proxygen/_build/cmake-EFTozGEkm4tQR_57fvLQiFbFunALgAvRSIBuLcqKKpc/share/cmake-3.20/Modules/FindBoost.cmake:594 (find_package)
CMake/folly-deps.cmake:38 (find_package)
CMakeLists.txt:133 (include)
-- Configuring incomplete, errors occurred!
See also "Z:/build/folly/CMakeFiles/CMakeOutput.log".
See also "Z:/build/folly/CMakeFiles/CMakeError.log".
Command '['Z:\\build\\folly\\succeed.bat', '&&', 'C:/source/proxygen/_build/cmake-EFTozGEkm4tQR_57fvLQiFbFunALgAvRSIBuLcqKKpc\\bin\\cmake.exe', 'Z:\\repos\\github.com-facebook-folly.git', '-DCMAKE_INSTALL_PREFIX=C:/source/proxygen/_build/folly', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBOOST_LINK_STATIC=ON', '-DBUILD_TESTS=OFF', '-DBUILD_BENCHMARKS=OFF', '-G', 'Ninja']' returned non-zero exit status 1.
!! Failed
CMakeError.log CMakeOutput.log
lmk if I should open a separate issue for that or what.
When running getdeps.sh on Windows (via git/mingw bash), I get the following error when it tries to patch boost: