Skip to content

Commit 2429fd7

Browse files
committed
[Fix] compilation error on Linux
1 parent a69e73d commit 2429fd7

3 files changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/build.yaml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,12 @@ jobs:
5050
steps:
5151
- uses: actions/checkout@v3
5252

53-
- name: Install dependencies for Linux builds
53+
- name: Install dependencies for vendored builds
5454
if: contains(matrix.platform.target, 'linux')
5555
run: |
5656
sudo apt-get update
57-
sudo apt-get install -y libssl-dev pkg-config
58-
# For cross-compilation
59-
if [[ "${{ matrix.platform.target }}" == "aarch64-unknown-linux-gnu" ]]; then
60-
sudo apt-get install -y gcc-aarch64-linux-gnu
61-
fi
62-
63-
- name: Set environment variables for OpenSSL
64-
if: contains(matrix.platform.target, 'linux')
65-
run: |
66-
echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV
67-
echo "OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV
68-
echo "OPENSSL_INCLUDE_DIR=/usr/include" >> $GITHUB_ENV
69-
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV
70-
# For cross-compilation to aarch64
71-
if [[ "${{ matrix.platform.target }}" == "aarch64-unknown-linux-gnu" ]]; then
72-
echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV
73-
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
74-
fi
57+
# Install build tools for vendored OpenSSL
58+
sudo apt-get install -y make perl
7559
7660
- name: Build link lib
7761
uses: houseabsolute/actions-rust-cross@v0

generator/Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generator/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ crate-type = ["cdylib"]
1010
codesnap = { version = "0.12.9", features = ["full"] }
1111
mlua = { version = "0.10.0", features = ["module", "luajit", "serialize"] }
1212
serde = { version = "1.0.204", features = ["derive"] }
13+
# Force vendored OpenSSL for cross-compilation
14+
openssl = { version = "0.10", features = ["vendored"] }
1315

0 commit comments

Comments
 (0)