Skip to content

Commit

Permalink
Bump boost for Android to 1.76 to align with iOS + fix (#33565)
Browse files Browse the repository at this point in the history
Summary:
The reason why I'm working on this is to reduce the delta between this and the react-native-macos fork, in particular with the android patch folder "Build": https://github.com/microsoft/react-native-macos/tree/main/android-patches/patches/Build (it's a long story)

While checking the changes in there, I noticed that one of them was a bump of boost. Looking back into main (here), I then noticed that there have been two bumps to boot in the repo so far:
* a combo update 5 years ago to 1.63:
  * 193afff
  * 5c24a91
* and an update for the iOS side to 1.76 by Kudo last year: #31840

So this quickly turned into this: the PR wants to re-align the version of boost used in both iOS and Android.

I explored the option of bumping both to 1.78 (latest at the time of writing: https://www.boost.org/users/history/version_1_78_0.html) but then I noticed that there's a Flipper dependency, `Flipper-Boost-iOSX`, on the iOS pods side that has been released only once and it seems to imply that it's 1.76 only compatible https://github.com/priteshrnandgaonkar/Flipper-Boost-iOSX/releases/tag/1.76.0.1.11.

So going to 1.78 at least for now seems like a no-go, and I've settled for just aligning everything to 1.76 and just like iOS, move away from `boost-for-react-native` in favour of the original one.

While doing so, I also noticed that the `React/third-party.xcconfig` still had a reference to 1.68 instead of 1.76 which seems like a leftover from Kudo's PR... it's probably because it was not doing anything in the first place, so lmk if you want me to delete it.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Changed] - Bump boost for Android to 1.76 to align with iOS

Pull Request resolved: #33565

Test Plan:
CI is green (aside an unrelated ios rntester job that is also broken on main) ✅
Locally both RNTester and new app work:
<img width="432" alt="Screenshot 2022-04-05 at 16 42 31" src="https://user-images.githubusercontent.com/16104054/161815444-0de63919-b90d-4a48-963a-872f0cc4ce79.png">

<img width="346" alt="Screenshot 2022-04-05 at 18 06 01" src="https://user-images.githubusercontent.com/16104054/161815438-b7b1c997-9dcd-47bd-acbe-732155941bb0.png">

Reviewed By: sshic

Differential Revision: D35433032

Pulled By: cortinico

fbshipit-source-id: 0d93f61f8c26eda1dd04127a8b20e799ab6828cb
  • Loading branch information
kelset authored and facebook-github-bot committed Apr 7, 2022
1 parent b2bc5aa commit 5cd6367
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion React/third-party.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
// LICENSE file in the root directory of this source tree.
//

HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2021.06.28.00 $(SRCROOT)/../third-party/glog-0.3.5/src
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_76_0 $(SRCROOT)/../third-party/folly-2021.06.28.00 $(SRCROOT)/../third-party/glog-0.3.5/src
OTHER_CFLAGS = -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1
2 changes: 1 addition & 1 deletion ReactAndroid/Android-prebuilt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := folly_runtime
LOCAL_SRC_FILES := $(REACT_NDK_EXPORT_DIR)/$(TARGET_ARCH_ABI)/libfolly_runtime.so
LOCAL_EXPORT_C_INCLUDES := \
$(THIRD_PARTY_NDK_DIR)/boost/boost_1_63_0 \
$(THIRD_PARTY_NDK_DIR)/boost/boost_1_76_0 \
$(THIRD_PARTY_NDK_DIR)/double-conversion \
$(THIRD_PARTY_NDK_DIR)/folly
# Note: Sync with folly/Android.mk.
Expand Down
4 changes: 2 additions & 2 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
def reactNativeRootDir = projectDir.parent

// You need to have following folders in this directory:
// - boost_1_63_0
// - boost_1_76_0
// - double-conversion-1.1.6
// - folly-deprecate-dynamic-initializer
// - glog-0.3.5
Expand All @@ -56,7 +56,7 @@ task createNativeDepsDirectories {
}

task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
src("https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz")
src("https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz")
onlyIfNewer(true)
overwrite(false)
dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz"))
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FRESCO_VERSION=2.5.0
OKHTTP_VERSION=4.9.2
SO_LOADER_VERSION=0.10.3

BOOST_VERSION=1_63_0
BOOST_VERSION=1_76_0
DOUBLE_CONVERSION_VERSION=1.1.6
FOLLY_VERSION=2021.06.28.00
FMT_VERSION=6.2.1
Expand Down
4 changes: 2 additions & 2 deletions ReactAndroid/src/main/jni/third-party/boost/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ include $(CLEAR_VARS)
# They are required for Folly futures to compile successfully.
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/asm/$(TARGET_ARCH_ABI)/*.S)

LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_76_0
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_76_0

LOCAL_MODULE := boost

Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/third-party/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ add_library(boost STATIC ${boostasm_SRC})

set_target_properties(boost PROPERTIES LINKER_LANGUAGE CXX)

target_include_directories(boost PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/boost_1_63_0)
target_include_directories(boost PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/boost_1_76_0)

0 comments on commit 5cd6367

Please sign in to comment.