CentOS 8 - no python

Michael G. South msouth at msouth.org
Tue Jan 9 15:28:56 UTC 2024


> On Jan 8, 2024, at 10:53 , Joel Sherrill <joel at rtems.org> wrote:
> 
> 
> 
> On Mon, Jan 8, 2024 at 10:13 AM Frank Kühndel <frank.kuehndel at embedded-brains.de> wrote:
> Hi Joel,
> 
> have a great 2024!
> 
> On 12/24/23 22:16, Joel Sherrill wrote:
>  > Hi
>  >
>  > Trying to bring up Coverity builds on a Centos 8 machine, I ran into 
> this:
>  >
>  > + ../source-builder/sb-set-builder --log=l-sparc.txt
>  > --prefix=/home/joel/rtems-cron-coverity/tools/6 --mail --mail-to=
>  > build at rtems.org  --mail-from=joel at rtems.org 6/rtems-sparc
>  >
>  > /usr/bin/env: ‘python’: No such file or directory
>  >
>  > There is, in fact, no python executable -- there is python2 and python3.
>  >
>  > Suggestions other than adding a symlink?
> 
> In RHEL 9.3 there exists the package python-unversioned-command which 
> creates a "python" command for "python3". I do not know whether it 
> exists in CentOS 8.
> 
> Thanks. It looks like CentOS 8 has that package but the computer is down right now.
> 
> It is on a UPS that needs a new battery. So not much use. :(
> 
> --joel 
> 
> Greetings,
> Frank
> 
> -- 
> embedded brains GmbH & Co. KG
> Herr Frank KÜHNDEL
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: frank.kuehndel at embedded-brains.de
> phone:  +49-89-18 94 741 - 23
> mobile: +49-176-15 22 06 - 11
> 
> Registergericht: Amtsgericht München
> Registernummer: HRA 117265
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

This might become an ongoing problem. As distros drop Python 2 support they have a tendency to also just drop “python” -> “pythonX” links. The Official Word ( https://peps.python.org/pep-0394/ ) is kind of weak-kneed about how “Python script publishers” should approach the issue, but basically says to either use a virtual environment, or figure out whether “python” or “python3” works and then use that.

Does source builder still work with Python 2? I seem to recall the answer is “no,” that the gcc (or maybe lib?) build breaks with p2. If it does still work, is that an explicit goal for SB, and are there regression tests to avoid bit rot?

As an aside, SB isn’t building on macOS Catalina for a similarish reason; there’s a path issue with the default Apple Python install, same issue with the official python.org  macOS bundles, and Homebrew patched it but no longer supports an old-enough python3 version that doesn’t break the GCC builds for other reasons.

I think “the right way” would be to have sb/linux.py figure out the correct path for Python and pass that to the rest of the build. Though a lot more work in this particular case.

Would you be interested in a patch to linux.py/rest of SB that implemented such a thing?

Mike

--

Michael South
msouth at msouth.org
LinkedIn:  www.linkedin.com/in/msouth





More information about the devel mailing list