Discussion:
Version of OpenSSl ?
(too old to reply)
v***@oqapy.eu
2025-02-09 08:33:57 UTC
Permalink
Hi,

Trying to compile Python-3.12.9 on Ubuntu-24.04

The compilation is complete without errors but I have this message:
--------------------------------------------------------------------------------------------------------
The necessary bits to build these optional modules were not found:
_hashlib _ssl nis
To find the necessary bits, look in configure.ac and config.log.

Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
--------------------------------------------------------------------------------------------------------

But I have a more newer version:

-------------------------------------------------------------------------------------------------------
$ openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
----------------------------------------------------------------------------------------
Keith Thompson
2025-02-09 10:35:31 UTC
Permalink
Post by v***@oqapy.eu
Hi,
Trying to compile Python-3.12.9 on Ubuntu-24.04
--------------------------------------------------------------------------------------------------------
_hashlib _ssl nis
To find the necessary bits, look in configure.ac and config.log.
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
--------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
$ openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
-------------------------------------------------------------------------------------------------------
You have the openssl command, but do you have the openssl development
libraries?

For Ubuntu, you need to install the libssl-dev package.
`dpkg -l libssl-dev` will tell you whether you have it.
If you don't, `sudo apt-get install libssl-dev` will install it.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+***@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Left Right
2025-02-09 12:20:07 UTC
Permalink
HI Vincent.

You need the sources of the OpenSSL library, not the compiled library.
On Ubuntu, the packages with sources are typically named xxx-dev where
xxx is the package that provides the library. I don't have a Ubuntu
currently, but try looking for something like openssl-dev or
libopenssl-dev etc.

On Sun, Feb 9, 2025 at 9:35 AM Vincent Vande Vyvre via Python-list
Post by v***@oqapy.eu
Hi,
Trying to compile Python-3.12.9 on Ubuntu-24.04
--------------------------------------------------------------------------------------------------------
_hashlib _ssl nis
To find the necessary bits, look in configure.ac and config.log.
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
--------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
$ openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
-------------------------------------------------------------------------------------------------------
What can I do for that ?
Vincent.
--
https://mail.python.org/mailman/listinfo/python-list
Jason Friedman
2025-02-09 15:12:56 UTC
Permalink
Post by v***@oqapy.eu
Trying to compile Python-3.12.9 on Ubuntu-24.04
--------------------------------------------------------------------------------------------------------
_hashlib _ssl nis
To find the necessary bits, look in configure.ac and config.log.
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
--------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
$ openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
-------------------------------------------------------------------------------------------------------
import ssl
print('Ok.')
"
Ok.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"

$ apt list --installed | grep ssl

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

libssl-dev/noble-updates,noble-security,now 3.0.13-0ubuntu3.4 amd64
[installed]
libssl3t64/noble-updates,noble-security,now 3.0.13-0ubuntu3.4 amd64
[installed,automatic]
libxmlsec1t64-openssl/noble,now 1.2.39-5build2 amd64 [installed,automatic]
openssl/noble-updates,noble-security,now 3.0.13-0ubuntu3.4 amd64
[installed,automatic]
ssl-cert/noble,noble,now 1.1.2ubuntu1 all [installed,automatic]
Grant Edwards
2025-02-10 17:01:10 UTC
Permalink
Post by Left Right
You need the sources of the OpenSSL library, not the compiled library.
On Ubuntu, the packages with sources are typically named xxx-dev where
xxx is the package that provides the library. I don't have a Ubuntu
currently, but try looking for something like openssl-dev or
libopenssl-dev etc.
Do the <library>-dev packages on Ubuntu really contain the sources for
the libraries?

I knew they contained the static libraries and the include files
required to build against the libraries, but I didn't think they
contained the library sources.

--
Grant
Chris Angelico
2025-02-10 18:04:05 UTC
Permalink
On Tue, 11 Feb 2025 at 04:04, Grant Edwards via Python-list
Post by Grant Edwards
Post by Left Right
You need the sources of the OpenSSL library, not the compiled library.
On Ubuntu, the packages with sources are typically named xxx-dev where
xxx is the package that provides the library. I don't have a Ubuntu
currently, but try looking for something like openssl-dev or
libopenssl-dev etc.
Do the <library>-dev packages on Ubuntu really contain the sources for
the libraries?
No they don't, and Mr "Left Right" is talking out his, uhh, "Back". :)
Post by Grant Edwards
I knew they contained the static libraries and the include files
required to build against the libraries, but I didn't think they
contained the library sources.
They contain everything you need to link to the library. That usually
means headers and libraries, and also pkgconfig files to point to
their locations, plus anything else you might need. But no sources.
That's the job of source archives.

ChrisA
Grant Edwards
2025-02-10 18:54:50 UTC
Permalink
Post by Chris Angelico
Post by Grant Edwards
Post by Left Right
You need the sources of the OpenSSL library, not the compiled library.
On Ubuntu, the packages with sources are typically named xxx-dev [...]
Do the <library>-dev packages on Ubuntu really contain the sources for
the libraries?
No they don't, and Mr "Left Right" is talking out his, uhh, "Back". :)
Post by Grant Edwards
I knew they contained the static libraries and the include files
required to build against the libraries, but I didn't think they
contained the library sources.
They contain everything you need to link to the library. That
usually means headers and libraries, and also pkgconfig files to
point to their locations, plus anything else you might need. But no
sources. That's the job of source archives.
Yep, I got curious and ssh'ed into one of the Ubuntu server machines I
maintain and looked at the files installed by some of the -dev
packages. [Those machines aren't used for development so didn't have
many of them.]

The -dev packages also contain the man pages for the libraries. It
surprised me at first that the man pages weren't installed by the
"normal" lib packages. But, if you're not writing/building apps that
link with library X, you don't need the man pages for library X.

--
Grant
Chris Angelico
2025-02-10 19:00:08 UTC
Permalink
On Tue, 11 Feb 2025 at 05:56, Grant Edwards via Python-list
Post by Grant Edwards
The -dev packages also contain the man pages for the libraries. It
surprised me at first that the man pages weren't installed by the
"normal" lib packages. But, if you're not writing/building apps that
link with library X, you don't need the man pages for library X.
Exactly, yeah. You may find though that there are some files installed
by both such as license files.

ChrisA

Loading...