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

[fix](third-party) Fix wrong download url #46998

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 76 additions & 6 deletions .github/workflows/build-thirdparty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
thirdparty_changes: ${{ steps.filter.outputs.thirdparty_changes }}
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
Expand All @@ -51,8 +51,23 @@ jobs:
if: ${{ needs.changes.outputs.thirdparty_changes == 'true' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout easimon/maximize-build-space
run: |
git clone -b v7 https://github.com/easimon/maximize-build-space

- name: Maximize build space
uses: ./maximize-build-space
with:
root-reserve-mb: 4096
swap-size-mb: 8192
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: Checkout ${{ github.ref }}
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download
run: |
Expand Down Expand Up @@ -92,7 +107,6 @@ jobs:
)

sudo apt update
sudo apt upgrade --yes
sudo DEBIAN_FRONTEND=noninteractive apt install --yes "${packages[@]}"

mkdir -p "${DEFAULT_DIR}"
Expand All @@ -115,10 +129,10 @@ jobs:
name: Build Third Party Libraries (macOS)
needs: changes
if: ${{ needs.changes.outputs.thirdparty_changes == 'true' }}
runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download
run: |
Expand All @@ -130,6 +144,7 @@ jobs:
- name: Prepare
run: |
packages=(
'm4'
'automake'
'autoconf'
'libtool'
Expand All @@ -150,12 +165,67 @@ jobs:
'maven'
'node'
'llvm@15'
'llvm@16'
)

brew install "${packages[@]}"
brew install "${packages[@]}" || true

- name: Build
run: |
export MACOSX_DEPLOYMENT_TARGET=12.0

cd thirdparty
./build-thirdparty.sh -j "$(nproc)"

build_macos_arm64:
name: Build Third Party Libraries (macOS-arm64)
needs: changes
if: ${{ needs.changes.outputs.thirdparty_changes == 'true' }}
runs-on: macos-14
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v4

- name: Download
run: |
cd thirdparty
curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz \
-o doris-thirdparty-source.tgz
tar -zxvf doris-thirdparty-source.tgz

- name: Prepare
run: |
packages=(
'm4'
'automake'
'autoconf'
'libtool'
'pkg-config'
'texinfo'
'coreutils'
'gnu-getopt'
'python@3'
'cmake'
'ninja'
'ccache'
'bison'
'byacc'
'gettext'
'wget'
'pcre'
'openjdk@11'
'maven'
'node'
'llvm@15'
'llvm@16'
)

brew install "${packages[@]}" || true

- name: Build
run: |
export MACOSX_DEPLOYMENT_TARGET=12.0

cd thirdparty
./build-thirdparty.sh -j "$(nproc)"

11 changes: 10 additions & 1 deletion thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1249,11 +1249,20 @@ build_aws_sdk() {

rm -rf "${BUILD_DIR}"

if [[ "${KERNEL}" == 'Darwin' ]]; then
# Use llvm@16 to build aws-c-cal instead of llvm@15
USE_LLVM_16="-DCMAKE_C_COMPILER=$(brew --prefix)/opt/llvm@16/bin/clang"
else
USE_LLVM_16=''
fi

# -Wno-nonnull gcc-11
"${CMAKE_CMD}" -G "${GENERATOR}" -B"${BUILD_DIR}" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" \
-DCMAKE_PREFIX_PATH="${TP_INSTALL_DIR}" -DBUILD_SHARED_LIBS=OFF -DENABLE_TESTING=OFF \
-DCURL_LIBRARY_RELEASE="${TP_INSTALL_DIR}/lib/libcurl.a" -DZLIB_LIBRARY_RELEASE="${TP_INSTALL_DIR}/lib/libz.a" \
-DBUILD_ONLY="core;s3;s3-crt;transfer" -DCMAKE_CXX_FLAGS="-Wno-nonnull -Wno-deprecated-declarations" -DCPP_STANDARD=17
-DBUILD_ONLY="core;s3;s3-crt;transfer" \
${USE_LLVM_16:+${USE_LLVM_16}} \
-DCMAKE_CXX_FLAGS="-Wno-nonnull -Wno-deprecated-declarations" -DCPP_STANDARD=17

cd "${BUILD_DIR}"

Expand Down
68 changes: 68 additions & 0 deletions thirdparty/patches/brpc-1.2.0-02.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
diff --git a/src/butil/file_util_mac.mm b/src/butil/file_util_mac.mm
index 25a731b..02bcc70 100644
--- a/src/butil/file_util_mac.mm
+++ b/src/butil/file_util_mac.mm
@@ -4,6 +4,7 @@

#include "butil/file_util.h"

+#import <objc/NSObjCRuntime.h>
#import <Foundation/Foundation.h>
#include <copyfile.h>

diff --git a/src/butil/mac/bundle_locations.h b/src/butil/mac/bundle_locations.h
index 0c425f3..5c7d763 100644
--- a/src/butil/mac/bundle_locations.h
+++ b/src/butil/mac/bundle_locations.h
@@ -9,6 +9,7 @@
#include "butil/files/file_path.h"

#if defined(__OBJC__)
+#import <objc/NSObjCRuntime.h>
#import <Foundation/Foundation.h>
#else // __OBJC__
class NSBundle;
diff --git a/src/butil/mac/foundation_util.h b/src/butil/mac/foundation_util.h
index 12b8e66..e206cb5 100644
--- a/src/butil/mac/foundation_util.h
+++ b/src/butil/mac/foundation_util.h
@@ -15,6 +15,7 @@
#include "butil/mac/scoped_cftyperef.h"

#if defined(__OBJC__)
+#import <objc/NSObjCRuntime.h>
#import <Foundation/Foundation.h>
@class NSFont;
@class UIFont;
@@ -29,6 +30,7 @@ class UIFont;
#if defined(OS_IOS)
#include <CoreText/CoreText.h>
#else
+#include <CoreFoundation/CFAttributedString.h>
#include <ApplicationServices/ApplicationServices.h>
#endif

diff --git a/src/butil/strings/sys_string_conversions_mac.mm b/src/butil/strings/sys_string_conversions_mac.mm
index 804b614..f362b3b 100644
--- a/src/butil/strings/sys_string_conversions_mac.mm
+++ b/src/butil/strings/sys_string_conversions_mac.mm
@@ -4,6 +4,7 @@

#include "butil/strings/sys_string_conversions.h"

+#import <objc/NSObjCRuntime.h>
#import <Foundation/Foundation.h>

#include <vector>
diff --git a/src/butil/threading/platform_thread_mac.mm b/src/butil/threading/platform_thread_mac.mm
index 2291301..9a31553 100644
--- a/src/butil/threading/platform_thread_mac.mm
+++ b/src/butil/threading/platform_thread_mac.mm
@@ -4,6 +4,7 @@

#include "butil/threading/platform_thread.h"

+#import <objc/NSObjCRuntime.h>
#import <Foundation/Foundation.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
2 changes: 1 addition & 1 deletion thirdparty/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ RAGEL_SOURCE=ragel-6.10
RAGEL_MD5SUM="748cae8b50cffe9efcaa5acebc6abf0d"

# boost
BOOST_DOWNLOAD="https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.gz"
BOOST_DOWNLOAD="https://archives.boost.io/release/1.73.0/source/boost_1_73_0.tar.gz"
BOOST_NAME=boost_1_73_0.tar.gz
BOOST_SOURCE=boost_1_73_0
BOOST_MD5SUM="4036cd27ef7548b8d29c30ea10956196"
Expand Down
Loading