Skip to content

Commit

Permalink
Merge pull request #237 from murat-dogan/arm64-static-openssl
Browse files Browse the repository at this point in the history
Arm64 static openssl
  • Loading branch information
murat-dogan authored Apr 2, 2024
2 parents 7a98d7d + 3d6a22f commit 54822db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ jobs:
sudo apt update
sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
mkdir sysroot && cd sysroot
wget https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/953c2471bc7e71a788309f6c2d2003e8b703305d/debian_sid_arm64_sysroot.tar.xz
tar xf debian_sid_arm64_sysroot.tar.xz
wget https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/41a6c8dec4c4304d6509e30cbaf9218dffb4438e/debian_bullseye_arm64_sysroot.tar.xz
tar xf debian_bullseye_arm64_sysroot.tar.xz
echo "ARM64_SYSROOT=$(pwd)" >> $GITHUB_ENV
ls -l
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0042 NEW)

project(node_datachannel VERSION 0.5.5)
project(node_datachannel VERSION 0.5.6)

# -Dnapi_build_version=8
add_definitions(-DNAPI_VERSION=8)
Expand All @@ -20,14 +20,8 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
set(CMAKE_C_FLAGS "-Wno-error=unused-but-set-variable -Wno-error=strict-prototypes")
endif()

# Got linker error for arm64
# /usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: ../sysroot/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
# ../sysroot/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
# (.text+0x1240): dangerous relocation: unsupported relocation
if(NOT ${NODE_ARCH} STREQUAL "arm64")
set(OPENSSL_USE_STATIC_LIBS TRUE)
find_package(OpenSSL REQUIRED)
endif()
set(OPENSSL_USE_STATIC_LIBS TRUE)
find_package(OpenSSL REQUIRED)

include(FetchContent)

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-datachannel",
"version": "0.5.5",
"version": "0.5.6-dev",
"description": "libdatachannel node bindings",
"type": "module",
"exports": {
Expand Down

0 comments on commit 54822db

Please sign in to comment.