Skip to content

Commit f5df20b

Browse files
authored
Merge pull request #60 from Maxxen/build
Properly support linux ubuntu 16 target
2 parents 20a4987 + 65c5a6f commit f5df20b

File tree

1 file changed

+44
-6
lines changed

1 file changed

+44
-6
lines changed

.github/workflows/Linux.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
arch: ['linux_amd64', 'linux_arm64', 'linux_amd64_gcc4']
2828
include:
2929
- arch: 'linux_amd64'
30-
container: 'ubuntu:18.04'
30+
container: 'ubuntu:16.04'
3131
- arch: 'linux_arm64'
3232
container: 'ubuntu:18.04'
3333
- arch: 'linux_amd64_gcc4'
@@ -82,18 +82,56 @@ jobs:
8282
uses: ./duckdb/.github/actions/ubuntu_16_setup
8383
with:
8484
aarch64_cross_compile: ${{ matrix.arch == 'linux_arm64' && 1 }}
85-
openssl: 1
85+
openssl: 0
86+
87+
# Openssl install dir was weirdly configured in main duckdb?
88+
- name: Install OpenSSL 1.1.1 (for AMD64)
89+
if: ${{ matrix.arch == 'linux_amd64' }}
90+
shell: bash
91+
run: |
92+
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1s.tar.gz
93+
tar -xzvf OpenSSL_1_1_1s.tar.gz
94+
mv openssl-OpenSSL_1_1_1s openssl-1.1.1s
95+
cd openssl-1.1.1s
96+
find ./ -type f -exec sed -i -e 's/\#\ define\ OPENSSL\_VERSION\_NUMBER/\#define\ OPENSSL\_VERSION\_NUMBER/g' {} \;
97+
./config --libdir=lib no-shared zlib-dynamic
98+
make
99+
make install
86100
87-
- name: Configure OpenSSL path
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
115+
116+
- name: Configure OpenSSL path for ARM64
117+
if: ${{ matrix.arch == 'linux_arm64' }}
118+
shell: bash
119+
run: |
120+
export OPENSSL_ROOT_DIR=`pwd`/build/openssl/build
121+
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR" >> $GITHUB_ENV
122+
123+
- name: Configure OpenSSL path for AMD64
124+
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_amd64_gcc4'}}
88125
shell: bash
89126
run: |
90-
export OPENSSL_ROOT_DIR=`pwd`/build/openssl/build
91-
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR" >> $GITHUB_ENV
127+
echo "OPENSSL_ROOT_DIR=/usr/local/ssl" >> $GITHUB_ENV
92128
93129
# Build extension
94130
- name: Build extension
95131
env:
96-
GEN: ninja
132+
GEN: ninja
133+
OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }}
134+
STATIC_OPENSSL: 1
97135
STATIC_LIBCPP: 1
98136
CC: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }}
99137
CXX: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }}

0 commit comments

Comments
 (0)