[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Christian Heimes
Christian Heimes added the comment: Chris, please try the fix from bpo-45371. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Christian Heimes
Christian Heimes added the comment: Chris, this bug report is closed. Please open a new bug report. I think it's a bug in distutils. UnixCCompiler.runtime_library_dir_option() may not support clang and add wrong option "-R/home/chaz/.local/local/openssl-3.0.0/lib64". -- ___

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Chris Hills
Chris Hills added the comment: If I set LDFLAGS as with previous versions, it works as expected. I do not know if it is related, but I noticed that by default rpath does not get set for the files in DESTDIR/bin/* (e.g. python3.10 or pip3.10) hence the inclusion of /home/chaz/.local/local/pyt

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Chris Hills
Chris Hills added the comment: The new behaviour seems broken on my system. $ PYTHON_VERSION=3.10.0 $ PKG_CONFIG_PATH="/home/chaz/.local/local/sqlite3/lib/pkgconfig:/home/chaz/.local/local/openssl3/lib64/pkgconfig" $ LLVM_PROFDATA=/home/chaz/.local/local/clang+llvm/bin/llvm-profdata CC=clan

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-04-26 Thread Christian Heimes
Christian Heimes added the comment: New changeset 5f87915d4af724f375b00dde2b948468d3e4ca97 by Christian Heimes in branch 'master': bpo-43466: Link with libz in PY_UNSUPPORTED_OPENSSL_BUILD path (GH-25587) https://github.com/python/cpython/commit/5f87915d4af724f375b00dde2b948468d3e4ca97

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-04-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +24306 pull_request: https://github.com/python/cpython/pull/25587 ___ Python tracker ___

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-04-19 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +24200 pull_request: https://github.com/python/cpython/pull/25475 ___ Python tracker ___ ___

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-29 Thread Christian Heimes
Christian Heimes added the comment: There are now multiple ways to build Python with a custom OpenSSL build on Linux and BSD-like platforms: 1) Tools/ssl/multissltest.py 2) ./configure --with-openssl=/path/to/openssl --with-openssl-rpath=auto 3) undocumented hack from commit bacefbf41461ab703

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-27 Thread miss-islington
miss-islington added the comment: New changeset bacefbf41461ab703b8d561f0e3d766427eab367 by Christian Heimes in branch 'master': bpo-43466: Unsupported static build hack (GH-25002) https://github.com/python/cpython/commit/bacefbf41461ab703b8d561f0e3d766427eab367 -- nosy: +miss-islin

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-23 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +23760 pull_request: https://github.com/python/cpython/pull/25002 ___ Python tracker ___

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-23 Thread Christian Heimes
Christian Heimes added the comment: GH-24989 adds -Wl,--exclude-libs just for libssl.a and libcrypto.a IFF support for -Wl,--exclude-libs,ALL is detected by configure. This puts the symbols from the OpenSSL archive files into the LOCAL segment of ELF binaries. The PR does not set -Wl,--exclu

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-23 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +23748 pull_request: https://github.com/python/cpython/pull/24989 ___ Python tracker ___

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-19 Thread Christian Heimes
Christian Heimes added the comment: I'm leaving the ticket open as a reminder for me to update whatsnew. -- components: +Documentation ___ Python tracker ___ _

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-19 Thread Christian Heimes
Christian Heimes added the comment: New changeset 32eba61ea431c76f15a910c0a4eded7f5f8b9b34 by Christian Heimes in branch 'master': bpo-43466: Add --with-openssl-rpath configure option (GH-24820) https://github.com/python/cpython/commit/32eba61ea431c76f15a910c0a4eded7f5f8b9b34 -- __

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread STINNER Victor
STINNER Victor added the comment: > The default settings for --with-openssl-rpath=no (--without-openssl-rpath) is > backwards compatible with previous Python versions. The default behavor stays > the same. Ok. That makes sense. -- ___ Python trac

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread Christian Heimes
Christian Heimes added the comment: It's a compromise. The default settings for --with-openssl-rpath=no (--without-openssl-rpath) is backwards compatible with previous Python versions. The default behavor stays the same. I don't want to set an rpath *unless* the user specifies that they wan

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread STINNER Victor
STINNER Victor added the comment: Should the rpath be set on OpenSSL, on the Python ssl module, or on the Python executable? > no (default): don't set an rpath If most users get it wrong, why not using "auto: auto-detect rpath from OPENSSL_LDFLAGS (--with-openssl or pkg-config)" by default?

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Would you mind if I regenerate configure with 2.69 and we stick with stable > version for a little bit longer? Please, go ahead. I need to remember then to use a docker container or something like that for the release then. What's the problem that

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread Christian Heimes
Christian Heimes added the comment: Pablo, in cc12888f9b4b69247f342fe1304984c3eb3d9647 you have regenerated configure with autoconf 2.71. The version is brand new and was released just 6 weeks ago. All my Linux machines have autoconf 2.69 from 2012 (!). Apparently 2.70 had some issues. Woul

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > AFAIK this won't play will with static linking. It should not be any problem as long as we expose the SSL symbols in the dynamic table of the extension (this happens by default). The only nuisance would be that users will still need those shared obj

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-11 Thread Christian Heimes
Christian Heimes added the comment: It's very much the same for OpenSSL 3.0.0: libssl.so and libcrypto.so. $ ldd build/lib.linux-x86_64-3.10/_ssl.cpython-310-x86_64-linux-gnu.so linux-vdso.so.1 (0x7a3cc000) libssl.so.3 => /home/heimes/dev/python/multissl/openssl/3.0.0

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The problem is that some features are not baked into the .a files. Oh, I see. So when using modern versions of openssl what shared objects do we expect to be in the NEEDED section? Right now, I see this in python3.8 in Ubuntu with OpenSSL 1.1.1: ❯

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Christian Heimes
Christian Heimes added the comment: > Not sure I follow. What's the problem here? The advantage of static linking > here will be to not have a dependency on the shared object, which can be > quite beneficial. The problem is that some features are not baked into the .a files. They are always

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Note that I am not proposing to statically link the extensions into the core, I am proposing to statically link openssl into the extensions, so the symbols are in the text segment of the extension. -- ___ P

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > OpenSSL uses dynamic linking by default. As long as OpenSSL provide a .a file (they do) you can always static link. That is a decision of how you integrate the library. > Static linking is problematic for dynamic engine support. Not sure I follow.

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Christian Heimes
Christian Heimes added the comment: I would rather not support static linking. OpenSSL uses dynamic linking by default. Static linking is problematic for dynamic engine support. This is going to become an even bigger issue with OSSL providers in OpenSSL 3.0.0. I don't know yet how well OpenS

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Christian Heimes
Christian Heimes added the comment: $ tar -xzf openssl-1.1.1j.tar.gz $ pushd openssl-1.1.1j $ ./config \ --prefix=/home/heimes/dev/python/custom-openssl \ --openssldir=\ $(find /etc/ -name openssl.cnf -quit -printf "%h" 2>/dev/null) $ make $ make install_sw $ popd $ pushd cpyth

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have a suggestion (I am ok with also doing both). We should add also a flag that allows to statically compile openssl into the extension modules (if the .a are available) so there will be no shared object dependency. This allows us to have artifacts

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +23586 pull_request: https://github.com/python/cpython/pull/24820 ___ Python tracker ___ ___

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-10 Thread Christian Heimes
New submission from Christian Heimes : Python's configure script has the option --with-openssl. It sets a path to a custom OpenSSL installation. Internally it provides OPENSSL_INCLUDES, OPENSSL_LIBS, and OPENSSL_LDFLAGS. The setup.py script turns the variables into include_dirs, library_dirs,