<div dir="ltr"><div dir="ltr">Chris.. an RSB feature submission question at the bottom.<div><br></div><div>Rest inlined.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 9, 2024 at 9:30 AM Michael G. South <<a href="mailto:msouth@msouth.org">msouth@msouth.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> On Jan 8, 2024, at 10:53 , Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
> <br>
> <br>
> <br>
> On Mon, Jan 8, 2024 at 10:13 AM Frank Kühndel <<a href="mailto:frank.kuehndel@embedded-brains.de" target="_blank">frank.kuehndel@embedded-brains.de</a>> wrote:<br>
> Hi Joel,<br>
> <br>
> have a great 2024!<br>
> <br>
> On 12/24/23 22:16, Joel Sherrill wrote:<br>
> > Hi<br>
> ><br>
> > Trying to bring up Coverity builds on a Centos 8 machine, I ran into <br>
> this:<br>
> ><br>
> > + ../source-builder/sb-set-builder --log=l-sparc.txt<br>
> > --prefix=/home/joel/rtems-cron-coverity/tools/6 --mail --mail-to=<br>
> > <a href="mailto:build@rtems.org" target="_blank">build@rtems.org</a> --mail-from=<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a> 6/rtems-sparc<br>
> ><br>
> > /usr/bin/env: ‘python’: No such file or directory<br>
> ><br>
> > There is, in fact, no python executable -- there is python2 and python3.<br>
> ><br>
> > Suggestions other than adding a symlink?<br>
> <br>
> In RHEL 9.3 there exists the package python-unversioned-command which <br>
> creates a "python" command for "python3". I do not know whether it <br>
> exists in CentOS 8.<br></blockquote><div><br></div><div>It appears to exist via Google but this was also suggested:<br><br>$ alternatives --set python /usr/bin/python3<br></div><div><br></div><div>Or select Python 2. </div><div><br></div><div>FWIW I think CentOS 8 is the last RHEL version to include Python 2.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> Thanks. It looks like CentOS 8 has that package but the computer is down right now.<br>
> <br>
> It is on a UPS that needs a new battery. So not much use. :(<br>
> <br>
> --joel <br>
> <br>
> Greetings,<br>
> Frank<br>
> <br>
> -- <br>
> embedded brains GmbH & Co. KG<br>
> Herr Frank KÜHNDEL<br>
> Dornierstr. 4<br>
> 82178 Puchheim<br>
> Germany<br>
> email: <a href="mailto:frank.kuehndel@embedded-brains.de" target="_blank">frank.kuehndel@embedded-brains.de</a><br>
> phone: +49-89-18 94 741 - 23<br>
> mobile: +49-176-15 22 06 - 11<br>
> <br>
> Registergericht: Amtsgericht München<br>
> Registernummer: HRA 117265<br>
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
> Unsere Datenschutzerklärung finden Sie hier:<br>
> <a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
<br>
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 ( <a href="https://peps.python.org/pep-0394/" rel="noreferrer" target="_blank">https://peps.python.org/pep-0394/</a> ) 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.<br></blockquote><div><br></div><div>Yep. I think the Python folks really made a mess with this transition. And there are bumps in the 3.x series where things change. It is just messy.<br><br>In my standards work, I remind folks that if we need to fix/change something that we should find a way to fix the issue so the fewest set of users are impacted. The Python authors are a much smaller subset than Python users. This is just whining I suppose. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
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?<br></blockquote><div><br></div><div>User facing tools like the RSBand waf are supposed to work with Python 2 or 3. OAR actively tests on CentOS 7 which is Python 2.</div><div><br></div><div>But.. developer facing tools can require Python 3. The documentation uses Sphinx which requires Python 3. I had a virtual environment on CentOS 7 to build this. CentOS/RHEL have a concept of software collections to let you get newer tools like gcc or Python.</div><div><br></div><div>At some point, I assume Python 2 will become rare enough in the user community that we won't care to support it any longer. Guessing, I would suspect RTEMS 6 could be the last major release to worry about Python 2.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
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 <a href="http://python.org" rel="noreferrer" target="_blank">python.org</a> 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.<br>
<br>
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.<br>
<br>
Would you be interested in a patch to <a href="http://linux.py/rest" rel="noreferrer" target="_blank">linux.py/rest</a> of SB that implemented such a thing?<br></blockquote><div><br></div><div>I cc'ed Chris about this. I expect it would be appreciated. If he doesn't reply to this email thread, please just email the patch to devel@ and let's see the reaction.</div><div><br></div><div>--joel</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Mike<br>
<br>
--<br>
<br>
Michael South<br>
<a href="mailto:msouth@msouth.org" target="_blank">msouth@msouth.org</a><br>
LinkedIn: <a href="http://www.linkedin.com/in/msouth" rel="noreferrer" target="_blank">www.linkedin.com/in/msouth</a><br>
<br>
<br>
<br>
</blockquote></div></div>