Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynmically link openssl in vcpkg #1453

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,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.so.3

- name: Store wheel artifact
if: inputs.job_type == 'build-python-wheels'
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering shouldn't we require dynamic linking to the standard library as well in this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so but maybe not in the scope of this PR?

else()
set(VCPKG_LIBRARY_LINKAGE static)
endif()
1 change: 0 additions & 1 deletion cpp/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"benchmark"
],
"overrides": [
{ "name": "openssl", "version-string": "1.1.1n#1" },
{ "name": "aws-sdk-cpp", "version": "1.11.201" },
{ "name": "aws-c-s3", "version": "0.3.24" },
{ "name": "bitmagic", "version": "7.12.3" },
Expand Down
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.3: cannot open shared object file | For linux-pypi prebuilt binary, since v4.5.0, libssl is no longer statically linked | Install libssl v3 manually |
Loading