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

Maybe don't link openssl statically by default? #53

Open
aalekhpatel07 opened this issue May 10, 2023 · 1 comment
Open

Maybe don't link openssl statically by default? #53

aalekhpatel07 opened this issue May 10, 2023 · 1 comment
Labels
community community Effort - Medium Effort - Medium feature feature Frequency - Monthly Frequency - Monthly Priority - Later Priority - Later Reach - Some Reach - Some Severity - S2 Severity - S2

Comments

@aalekhpatel07
Copy link

Problem

Linking openssl statically by default implies the image must have a static libcrypto.a, but not all *nixes ship that when installing openssl. In particular, RockyLinux 8 doesn't ship that, causing pip install pymgclient==1.3.1 to fail.

How was it discovered?

  1. pip install gqlachemy fails on a fresh Rockylinux 8 image with the build prerequisites installed. Error message suggests something's up with pymgclient and openssl's version.
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found version "3.0.8")
  1. Tried opting out of the static linking and the installation worked.
pip install pymgclient \
    --global-option="build_ext" \
    --global-option="--static-openssl=0"

Proposed fix

  • Keep the openssl static linking the default behaviour and add another CI job.

Add another base image, say rockylinux:8, to CI where libcrypto.a is not provided by openssl-devel or libssl-dev. Fix the rest of CI job until the build passes and possibly improve documentation on the build process.

The reason ubuntu-22.04 didn't surface this error is because libssl-dev ships a libcrypto.a by default and the Runner comes with an openssl installed.

OR

  • Remove the default static linking of openssl:
# setup.cfg
[build_ext]
static_openssl = 0
@bernd-k1337
Copy link

bernd-k1337 commented Jun 27, 2023

I have the same problem on arch even when setting OPENSSL_ROOT_DIR. Is there already a solution for static linking?

@gitbuda gitbuda added the enhancement enhancement label Aug 31, 2023
@katarinasupe katarinasupe added feature feature community community Severity - S3 Severity - S3 Importance - I2 Importance - I2 Severity - S2 Severity - S2 Effort - Unknown Effort - Unknown and removed enhancement enhancement Severity - S3 Severity - S3 labels Dec 29, 2023
@imilinovic imilinovic added Effort - Medium Effort - Medium and removed Effort - Unknown Effort - Unknown labels Feb 22, 2024
@hal-eisen-MG hal-eisen-MG added the Priority - Later Priority - Later label Feb 22, 2024
@katarinasupe katarinasupe added Frequency - Monthly Frequency - Monthly Reach - Some Reach - Some and removed Importance - I2 Importance - I2 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community Effort - Medium Effort - Medium feature feature Frequency - Monthly Frequency - Monthly Priority - Later Priority - Later Reach - Some Reach - Some Severity - S2 Severity - S2
Projects
Development

No branches or pull requests

6 participants