Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/configure gets confused by multiple pythons #2263

Open
SebKuzminsky opened this issue Jan 12, 2023 · 1 comment
Open

src/configure gets confused by multiple pythons #2263

SebKuzminsky opened this issue Jan 12, 2023 · 1 comment

Comments

@SebKuzminsky
Copy link
Collaborator

If there are multiple versions of python installed, src/configure can get confused about which one to use, leading to failure to configure.

The configure script first looks for python interpreters, and selects the python version with the highest version number. It then looks for the python libraries for that version only.

Currently on Bookworm, python3 is python3.10, and python3-dev is python3.10-dev. So if somehow python3.11 gets installed, LinuxCNC will fail to configure (unless the developer also installs python3.11-dev, or uninstalls python3.11).

This is problematic because building & installing linuxcnc-uspace.deb on Bookworm currently installs python3.11, which breaks building of linuxcnc.

So the workaround is to make sure that you have installed the python${VERSION}-dev package matching the highest-numbered python${VERSION} package on your system.

I'm not sure what the best way to actually fix this is.

@allistar
Copy link

This happens on Gentoo Linux too. If I have Python 3.9, 3.10 and 3.11 installed but 3.10 is the currently active version, the configure script assumes 3.11 is the correct version to use. My solution for now is to set 3.11 as the active version.

It would be better if the configure script just ran "python" with a default path and ask it what its version is, and use that version.

This is controlled in src/m4/ax_python.m4 in the first few non comment lines in this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants