Skip to content

Commit

Permalink
Dynmically link openssl
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebusm committed Apr 8, 2024
1 parent 74dea51 commit c4f9c4c
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ jobs:
if: inputs.job_type == 'cpp-tests'
run: cd cpp; cmake --build --preset $ARCTIC_CMAKE_PRESET --target install

- name: Install dynamically linked library for tests
if: inputs.job_type == 'cpp-tests' && matrix.os == 'linux'
run: yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/openssl11-1.1.1k-7.el7.x86_64.rpm

- name: C++ Rapidcheck
if: inputs.job_type == 'cpp-tests'
run: cpp/out/install/arcticdb_rapidcheck_tests
Expand Down Expand Up @@ -164,6 +168,7 @@ jobs:
run: pipx run cibuildwheel==${{inputs.cibw_version}}
env:
CIBW_MANYLINUX_X86_64_IMAGE: ${{inputs.cibw_image_tag}}
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair -L . -w {dest_dir} {wheel} --exclude libssl-a0734ced.so.1.1

- name: Store wheel artifact
if: inputs.job_type == 'build-python-wheels'
Expand Down Expand Up @@ -298,6 +303,10 @@ jobs:
${{vars.EXTRA_TEST_PREPARE_CMD || ''}}
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{vars.CMAKE_BUILD_PARALLEL_LEVEL}}

- name: Install dynamically linked library for tests
if: matrix.os == 'linux'
run: yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/openssl11-1.1.1k-7.el7.x86_64.rpm

- name: Set persistent storage variables
if: inputs.persistent_storage == 'true'
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ Install ArcticDB:

```bash
$ pip install arcticdb
# For linux-pypi prebuilt binary, since v4.5.0, libssl is no longer statically linked.
# openssl v1.1.1 is needed to be manually installed.
# openssl v1.1.1 can be installed with precompiled package online, if not available in the OS:
# RHEL:
$ yum install -y compat-openssl11
# or
$ yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/openssl11-1.1.1k-7.el7.x86_64.rpm
# Ubuntu:
# Please go to http://security.ubuntu.com/ubuntu/pool/main/o/openssl/ to
# download and install latest openssl_1.1.1 and libssl1.1_1.1.1 deb files in sequence
```
or using conda-forge
```bash
Expand Down
16 changes: 14 additions & 2 deletions cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@
},
{
"name": "linux-debug",
"inherits": ["common_vcpkg", "linux"]
"inherits": ["common_vcpkg", "linux"],
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/third_party/vcpkg_overlays/triplets/",
"VCPKG_TARGET_TRIPLET": "x64-linux-mix"
}
},
{
"name": "linux-debug-clang",
Expand Down Expand Up @@ -145,7 +149,15 @@

{ "name": "windows-cl-release", "inherits": "windows-cl-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }},
{ "name": "windows-cl-conda-release", "inherits": "windows-cl-conda-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } },
{ "name": "linux-release", "inherits": "linux-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
{
"name": "linux-release",
"inherits": "linux-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/third_party/vcpkg_overlays/triplets/",
"VCPKG_TARGET_TRIPLET": "x64-linux-mix"
}
},
{ "name": "linux-conda-release", "inherits": "linux-conda-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } },
{ "name": "darwin-conda-release", "inherits": "darwin-conda-debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }
],
Expand Down
9 changes: 9 additions & 0 deletions cpp/third_party/vcpkg_overlays/triplets/x64-linux-mix.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)

if(${PORT} MATCHES "openssl")
set(VCPKG_LIBRARY_LINKAGE dynamic)
else()
set(VCPKG_LIBRARY_LINKAGE static)
endif()
5 changes: 5 additions & 0 deletions docs/mkdocs/docs/error_messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,8 @@ RuntimeError
|-- StreamDescriptorMismatch
└-- InternalException
```

## Import Error
| Error messages | Cause | Resolution |
|:--------------|:-------|:-----------|
| libssl.so.1.1: cannot open shared object file | For linux-pypi prebuilt binary, since v4.5.0, libssl is no longer statically linked | Install libssl v1.1.1 manually; Please refer to https://github.com/man-group/ArcticDB |

0 comments on commit c4f9c4c

Please sign in to comment.