Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.
This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.
Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
-
coltson
- Apollo supporter

- Posts: 33
- Joined: 2018-10-06, 13:03
Post
by coltson » 2026-04-11, 20:55
When trying to run
Code: Select all
PATH=/arquivos/Python-2.7.18/bin/:$PATH ./mach build/
to build from source, I get:
Code: Select all
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/arquivos/Python-2.7.18/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/arquivos/Python-2.7.18/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/arquivos/Python-2.7.18/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/arquivos/Python-2.7.18/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
.....
.....
.....
Code: Select all
0:06.77 'Failed to create virtualenv: %s' % self.virtualenv_root)
INFO:mach.commands.59ecdc3635e711f182e20ceee6fcb709.BuildOutputManager:{line}
0:06.77 Exception: Failed to create virtualenv: /media/34GB/Arquivos-de-Programas-Linux/pale-moon/obj-x86_64-pc-linux-gnu/_virtualenv
INFO:mach.commands.59ecdc3635e711f182e20ceee6fcb709.BuildOutputManager:{line}
0:06.77 *** Fix above errors and then restart with\
INFO:mach.commands.59ecdc3635e711f182e20ceee6fcb709.BuildOutputManager:{line}
0:06.77 "/usr/bin/make -f client.mk build"
INFO:mach.commands.59ecdc3635e711f182e20ceee6fcb709.BuildOutputManager:{line}
0:06.77 make: *** [configure] Error 1
INFO:mach.commands.59ecdc3635e711f182e20ceee6fcb709.BuildOutputManager:{line}
I can provide the full error message if required (51k)
-
athenian200
- Contributing developer

- Posts: 1749
- Joined: 2018-10-28, 19:56
- Location: Georgia
Post
by athenian200 » 2026-04-11, 21:32
Well, Python 2 by default requires an ancient version of OpenSSL that most modern Linux distros don't have, or it won't build the SSL module... and unfortunately hashlib itself doesn't seem to work properly if the SSL module isn't built. Python will happily let you build and use a half-busted version of itself with little warning in this situation. If you are trying to build Pale Moon 34.2.0, try this instead:
https://github.com/naftaliharris/tauthon
This one is a little more forgiving than Python 2.7 itself... Python 2.7 requires an ancient version of OpenSSL and a special configure option like -std=gnu17 just to produce a working version. Tauthon is less of a pain to build on modern Linux, at least.
We're currently trying to migrate to Python 3 because these issues have gotten a little out of hand... though the most recent release is still on Python 2, as you've seen.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
micwoj92
- Fanatic

- Posts: 198
- Joined: 2020-12-22, 20:57
Post
by micwoj92 » 2026-04-13, 19:14
Python2 supports openssl 1.1, last release 1.1.1w was in september 2023, which is by no means ancient (although end of life).
There exist patches for openssl3 compat:
https://github.com/tiran/cpython/commit ... -openssl3/
-
coltson
- Apollo supporter

- Posts: 33
- Joined: 2018-10-06, 13:03
Post
by coltson » 2026-04-15, 22:19
Someone on a Python message board told me that no Python prior to 3.0 supports OpenSSL, but showed a Python module related to Openssl to bypass this issue. Not sure if I would be able to install it, or if it would require too much work. On the other hand, this Tauthon has no release, so it would also be problematic. Trying to decide which path is less trouble.
-
athenian200
- Contributing developer

- Posts: 1749
- Joined: 2018-10-28, 19:56
- Location: Georgia
Post
by athenian200 » 2026-04-16, 00:31
coltson wrote: ↑2026-04-15, 22:19
Someone on a Python message board told me that no Python prior to 3.0 supports OpenSSL, but showed a Python module related to Openssl to bypass this issue. Not sure if I would be able to install it, or if it would require too much work. On the other hand, this Tauthon has no release, so it would also be problematic. Trying to decide which path is less trouble.
Honestly, the easiest path for now is to use a Docker container to install something like Oracle Linux 8... and use the Python 2 from that environment. It shouldn't be needed, but it honestly sounds like there's way too much conflicting information around the Python 2 build process for an average user to make heads or tales of it. Which is why the next release should be compatible with Python 3...
I can only tell you that the person on the message board was probably thinking chronologically... Python 3.0 came out in 2008, but the last version of Python 2 came out in 2020. Most of the people in the Python community aren't knowledgeable about the later versions of Python 2, seeing it only as "legacy."
The reality seems to be that Python 2.7 expects something like OpenSSL 0.x.x out of the box, and can probably be made to work with OpenSSL 1.x easily, and later versions with more patching, but that one sticking point is basically why it can't be built easily.
Tauthon, on the other hand, should build out of the box on any modern Linux distro. With that project, you basically just build against current master because the code is very stable and it's really just fixing up things that break compilation on newer systems at this point.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
Basilisk-Dev
- Astronaut

- Posts: 636
- Joined: 2022-03-23, 16:41
- Location: Chamber of Secrets
Post
by Basilisk-Dev » 2026-04-16, 18:42
athenian200 wrote: ↑2026-04-16, 00:31
Honestly, the easiest path for now is to use a Docker container to install something like Oracle Linux 8... and use the Python 2 from that environment.
Agreed about using the docker container.
athenian200 wrote: ↑2026-04-16, 00:31
It shouldn't be needed, but it honestly sounds like there's way too much conflicting information around the Python 2 build process for an average user to make heads or tales of it.
You can build Python 2 with pyenv extremely easily. After installing pyenv you just run pyenv install 2.7, then point your $PATH to the folder containing the python2 binary so UXP picks up the new Python 2 build.
-
athenian200
- Contributing developer

- Posts: 1749
- Joined: 2018-10-28, 19:56
- Location: Georgia
Post
by athenian200 » 2026-04-17, 00:16
Basilisk-Dev wrote: ↑2026-04-16, 18:42
You can build Python 2 with pyenv extremely easily. After installing pyenv you just run pyenv install 2.7, then point your $PATH to the folder containing the python2 binary so UXP picks up the new Python 2 build.
Oddly, that's very close to what I actually did on Linux and MSYS1 without pyenv... I guess they pretty much automated that idea of using PATH manipulation to point to various copies of Python.
Though from what I'm reading, the biggest sticking point, the need to get an outdated OpenSSL package that most users wouldn't know how to find, still applies even with pyenv, and they don't automate that part of the process (though they do at least warn you that you need the package rather than silently hand you a Python 2 with no hashlib). Which is what really makes the Docker container still the best turnkey solution available for an average Linux user.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
JayByrd
- Hobby Astronomer

- Posts: 23
- Joined: 2024-06-02, 19:57
Post
by JayByrd » 2026-04-17, 17:27
micwoj92 wrote: ↑2026-04-13, 19:14
Python2 supports openssl 1.1, last release 1.1.1w was in september 2023, which is by no means ancient (although end of life).
...
For the record, Slackware 15.0 (with latest updates) has openssl-1.1.1zg, dated April 11, along with python2-2.7.18.
...Might be worth a look for a containerized development environment...

-
coltson
- Apollo supporter

- Posts: 33
- Joined: 2018-10-06, 13:03
Post
by coltson » 2026-04-25, 00:33
athenian200 wrote: ↑2026-04-16, 00:31
Honestly, the easiest path for now is to use a Docker container to install something like Oracle Linux 8... and use the Python 2 from that environment.
I am not sure of what in Python 2.7 from Oracle Linux 8 is different compared to my Python 2.7 that allows it to work with Openssl. Anyway, that suggestion is not doable for me.
athenian200 wrote: ↑2026-04-16, 00:31
Tauthon, on the other hand, should build out of the box on any modern Linux distro. With that project, you basically just build against current master because the code is very stable and it's really just fixing up things that break compilation on newer systems at this point.
Without a release, I will have to get git first, which could be troublesome to some extent. Still it look like far simpler than the first option that I doesn't even know how to start. I am starting to consider my option number three that I mentioned last time and also an option n°4.
For the record, Slackware 15.0 (with latest updates) has openssl-1.1.1zg, dated April 11, along with python2-2.7.18.
...Might be worth a look for a containerized development environment...

[/quote]
How the hell they made Python detect OpenSSL.