Skip to content

Commit 65c5a6f

Browse files
committed
cross compile openssl
1 parent f831808 commit 65c5a6f

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/Linux.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ jobs:
8585
openssl: 0
8686

8787
# Openssl install dir was weirdly configured in main duckdb?
88-
- name: Install OpenSSL 1.1.1
89-
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64'}}
88+
- name: Install OpenSSL 1.1.1 (for AMD64)
89+
if: ${{ matrix.arch == 'linux_amd64' }}
9090
shell: bash
9191
run: |
9292
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1s.tar.gz
@@ -97,6 +97,21 @@ jobs:
9797
./config --libdir=lib no-shared zlib-dynamic
9898
make
9999
make install
100+
101+
- name: Install OpenSSL for Cross compiling (for ARM64)
102+
if: ${{ matrix.arch == 'linux_arm64' }}
103+
shell: bash
104+
run: |
105+
mkdir -p build/openssl
106+
cd build/openssl
107+
mkdir sources build
108+
curl https://www.openssl.org/source/openssl-3.0.5.tar.gz | tar zxv -C sources --strip-components 1
109+
export OPENSSL_ROOT_DIR=`pwd`/build
110+
cd sources
111+
export CC="aarch64-linux-gnu-gcc"
112+
perl ./Configure --prefix=$OPENSSL_ROOT_DIR linux-aarch64 no-asm
113+
make -j
114+
make install_sw
100115
101116
- name: Configure OpenSSL path for ARM64
102117
if: ${{ matrix.arch == 'linux_arm64' }}
@@ -114,7 +129,9 @@ jobs:
114129
# Build extension
115130
- name: Build extension
116131
env:
117-
GEN: ninja
132+
GEN: ninja
133+
OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }}
134+
STATIC_OPENSSL: 1
118135
STATIC_LIBCPP: 1
119136
CC: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }}
120137
CXX: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }}

0 commit comments

Comments
 (0)