Skip to content

Commit 33b9c27

Browse files
authored
Merge pull request zingolabs#791 from juanky201271/dev_openssl_ndk_upgrade
Downgrade openssl to 3.3.2
2 parents eaec6e4 + 8a30b90 commit 33b9c27

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

.github/workflows/android-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
LD: ld
151151
RANLIB: llvm-ranlib
152152
CC: ${{ env.CC }}24-clang
153-
OPENSSL_DIR: /opt/openssl-3.4.1/${{ env.OPENSSL_PATH }}
153+
OPENSSL_DIR: /opt/openssl-3.3.2/${{ env.OPENSSL_PATH }}
154154
CARGO_FEATURE_STD: true
155155

156156
- name: LLVM Strip

rust/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@ RUN cargo run --release --features=uniffi/cli --bin uniffi-bindgen \
2121
RUN cargo install --version ^3 cargo-ndk
2222

2323
#RUN AR=llvm-ar LD=ld RANLIB=llvm-ranlib CC=aarch64-linux-android24-clang \
24-
# OPENSSL_DIR=/opt/openssl-3.4.1/aarch64 cargo +nightly build -Z build-std \
24+
# OPENSSL_DIR=/opt/openssl-3.3.2/aarch64 cargo +nightly build -Z build-std \
2525
# --target aarch64-linux-android --release
2626
# this is for indexmap 1.9.3 -> forcing `features = ["std"]`
2727
ENV CARGO_FEATURE_STD=true
28-
RUN OPENSSL_DIR=/opt/openssl-3.4.1/aarch64 cargo ndk --target arm64-v8a build --release -Z build-std
28+
RUN OPENSSL_DIR=/opt/openssl-3.3.2/aarch64 cargo ndk --target arm64-v8a build --release -Z build-std
2929
RUN llvm-strip ../target/aarch64-linux-android/release/libzingo.so
3030

3131
#RUN AR=llvm-ar LD=ld RANLIB=llvm-ranlib CC=x86_64-linux-android24-clang \
32-
# OPENSSL_DIR=/opt/openssl-3.4.1/x86_64 cargo +nightly build -Z build-std \
32+
# OPENSSL_DIR=/opt/openssl-3.3.2/x86_64 cargo +nightly build -Z build-std \
3333
# --target x86_64-linux-android --release
34-
RUN OPENSSL_DIR=/opt/openssl-3.4.1/x86_64 cargo ndk --target x86_64 build --release -Z build-std
34+
RUN OPENSSL_DIR=/opt/openssl-3.3.2/x86_64 cargo ndk --target x86_64 build --release -Z build-std
3535
RUN llvm-strip ../target/x86_64-linux-android/release/libzingo.so
3636

3737
#RUN AR=llvm-ar LD=ld RANLIB=llvm-ranlib CC=armv7a-linux-androideabi24-clang \
38-
# OPENSSL_DIR=/opt/openssl-3.4.1/armv7 cargo +nightly build -Z build-std \
38+
# OPENSSL_DIR=/opt/openssl-3.3.2/armv7 cargo +nightly build -Z build-std \
3939
# --target armv7-linux-androideabi --release
40-
RUN OPENSSL_DIR=/opt/openssl-3.4.1/armv7 cargo ndk --target armeabi-v7a build --release -Z build-std
40+
RUN OPENSSL_DIR=/opt/openssl-3.3.2/armv7 cargo ndk --target armeabi-v7a build --release -Z build-std
4141
RUN llvm-strip ../target/armv7-linux-androideabi/release/libzingo.so
4242

4343
#RUN AR=llvm-ar LD=ld RANLIB=llvm-ranlib CC=i686-linux-android24-clang \
44-
# OPENSSL_DIR=/opt/openssl-3.4.1/x86 cargo +nightly build -Z build-std \
44+
# OPENSSL_DIR=/opt/openssl-3.3.2/x86 cargo +nightly build -Z build-std \
4545
# --target i686-linux-android --release
46-
RUN OPENSSL_DIR=/opt/openssl-3.4.1/x86 cargo ndk --target x86 build --release -Z build-std
46+
RUN OPENSSL_DIR=/opt/openssl-3.3.2/x86 cargo ndk --target x86 build --release -Z build-std
4747
RUN llvm-strip ../target/i686-linux-android/release/libzingo.so

rust/android/builder/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN apt update \
1515
libclang1 \
1616
llvm-dev \
1717
libclang-dev \
18+
libatomic1 \
1819
clang \
1920
make \
2021
curl \
@@ -71,41 +72,41 @@ RUN echo "[target.x86_64-linux-android]" >> $CARGO_HOME/config.toml \
7172

7273
# Install and setup OpenSSL
7374
WORKDIR /opt
74-
RUN curl -LO https://www.openssl.org/source/openssl-3.4.1.tar.gz -o openssl-3.4.1.tar.gz \
75-
&& tar xvf openssl-3.4.1.tar.gz \
76-
&& rm -rf openssl-3.4.1.tar.gz
75+
RUN curl -LO https://www.openssl.org/source/openssl-3.3.2.tar.gz -o openssl-3.3.2.tar.gz \
76+
&& tar xvf openssl-3.3.2.tar.gz \
77+
&& rm -rf openssl-3.3.2.tar.gz
7778
ENV OPENSSL_STATIC=yes
78-
WORKDIR /opt/openssl-3.4.1
79+
WORKDIR /opt/openssl-3.3.2
7980
RUN mkdir x86 \
8081
&& mkdir aarch64 \
8182
&& mkdir armv7 \
8283
&& mkdir x86_64
8384

84-
RUN ./Configure --prefix=/opt/openssl-3.4.1/aarch64 android-arm64 \
85+
RUN ./Configure --prefix=/opt/openssl-3.3.2/aarch64 android-arm64 \
8586
-mno-outline-atomics \
8687
-U__ANDROID_API__ \
8788
-D__ANDROID_API__=24 \
8889
&& make -j$(nproc) \
8990
&& make -j$(nproc) install \
9091
&& make clean \
9192
&& make distclean
92-
RUN ./Configure --prefix=/opt/openssl-3.4.1/armv7 android-arm \
93+
RUN ./Configure --prefix=/opt/openssl-3.3.2/armv7 android-arm \
9394
-U__ANDROID_API__ \
9495
-D__ANDROID_API__=24 \
9596
&& make -j$(nproc) \
9697
&& make -j$(nproc) install \
9798
&& make clean \
9899
&& make distclean
99-
# openssl-3.4.1 -> remove: -DBROKEN_CLANG_ATOMICS \
100-
RUN ./Configure --prefix=/opt/openssl-3.4.1/x86 android-x86 \
101-
-latomic \
100+
RUN ./Configure --prefix=/opt/openssl-3.3.2/x86 android-x86 \
101+
-DBROKEN_CLANG_ATOMICS \
102+
#-latomic \
102103
-U__ANDROID_API__ \
103104
-D__ANDROID_API__=24 \
104105
&& make -j$(nproc) \
105106
&& make -j$(nproc) install \
106107
&& make clean \
107108
&& make distclean
108-
RUN ./Configure --prefix=/opt/openssl-3.4.1/x86_64 android-x86_64 \
109+
RUN ./Configure --prefix=/opt/openssl-3.3.2/x86_64 android-x86_64 \
109110
-U__ANDROID_API__ \
110111
-D__ANDROID_API__=24 \
111112
&& make -j$(nproc) \

0 commit comments

Comments
 (0)