Repository navigation
Feature: Mention how to configure path to OpenSSL #1727
Copy link
Copy link
Closed as not planned
Labels
topic-building pythontype-featureAdditions; New content or section neededAdditions; New content or section needed
Description
Activity
- addedtype-featureAdditions; New content or section neededAdditions; New content or section needed
on Jan 25, 2026 Looking at where the error is produced, if
OPENSSL_LDFLAGSwas set, it would have pointed to--with-openssl-rpath=auto:if any( modinfo.name == "_ssl" for modinfo in self.missing + self.failed_on_import ): print("Could not build the ssl module!") print("Python requires a OpenSSL 1.1.1 or newer") if sysconfig.get_config_var("OPENSSL_LDFLAGS"): print("Custom linker flags may require --with-openssl-rpath=auto")
Not sure if I can follow... does this mean I should have set
OPENSSL_LDFLAGS? 🤔Hi @RafaelWO, this is a useful addition to the devguide. I’d like to help clarify or document the steps for configuring the path to OpenSSL and handling --with-openssl-rpath=auto. Could you please assign me so I can contribute?
As I've told you already, we generally don't assign issues here.
Reacted by Muawiya Amir- added a commit that references this issue
on Feb 8, 2026 - addedtype-featureAdditions; New content or section neededAdditions; New content or section neededand removedtype-featureAdditions; New content or section neededAdditions; New content or section needed
on Mar 3, 2026 Closing this issue based on #1731 (comment). I don't think that additional documentation is required now. Thanks for the suggestion though.
Thanks @StanFromIreland. I always forget that option.
Reacted by Stan Ulbrych
Metadata
Metadata
Assignees
Labels
topic-building pythontype-featureAdditions; New content or section neededAdditions; New content or section needed
Describe the enhancement or feature you would like
I would like the devguide (Setup and building / Troubleshoot the build) to mention a solution for troubleshooting issues with building the
sslmodule - specifically, this error:After a lot of trial and error I found this comment on a GH issue which solved my problem. The key is to set
--with-openssl-rpath=autowhen running./configure.If other's agree, I am happy to open a PR that adds this to the devguide 🙂
Describe alternatives you have considered
I searched the web for similar issues and found a not-so-helpful SO answer, but eventually ended up at this comment, which helped me solve my problem.
Additional context
I tried to setup my machine (Linux, Ubuntu, WSL) to compile and build CPython according to the devguide. However, I got stuck with the following error after running
./configure --with-pydebugfollowed bymake:I ran
openssl --versionand gotOpenSSL 3.4.0 22 Oct 2024. Then, I ensured that I had all dependencies installed to build all optional modules. Still, I got the same error.After some searching, I found the configure option
--with-openssl=DIRwhich I pointed to the directory of the openssl binary - did not help.(I wanted to build the
sslmodule because otherwise I could not install packages withpipin my virtual environment created with the built Python.)