Skip to content

build: Select the libboost_python matching the python version.#4209

Merged
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:fix_libboost_python-versioning
Jun 29, 2026
Merged

build: Select the libboost_python matching the python version.#4209
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:fix_libboost_python-versioning

Conversation

@BsAtHome

Copy link
Copy Markdown
Contributor

Recent changes in Debian sid cause the wrong libboost_python to be selected in configure (313 instead of 314) causing a crash in milltask.
The python version is now extracted and used to test the "proper" library first before a generic test of which potential libraries are available on the filesystem.

@grandixximo

grandixximo commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Saw you flagged this as "a bit hackery". I think reusing what configure already has would help make it less so.

AX_PYTHON_DEVEL already extracts the version into $ac_python_version (e.g. 3.14) and builds PYTHON_LIBS=-lpython$ac_python_version from it. So instead of shelling out to $PYTHON_BIN again:

ax_python_lib="boost_python`echo $ac_python_version | tr -d .` boost_python"

No extra subprocess, and the boost suffix is guaranteed to match the libpython the build already links. The ordering idea itself is right (CMake derives the same python3xx name the same way). Does that feel less hackery to you?

@BsAtHome BsAtHome force-pushed the fix_libboost_python-versioning branch from e7a7d56 to 6246b2a Compare June 29, 2026 09:15
@BsAtHome

Copy link
Copy Markdown
Contributor Author

Well, yes... I was looking for it but overlooked it. Now it is used with the python method as fallback. Now it feels a lot more resilient.

BTW, your version also creates a sub-process. How else is tr run? ;-)

@grandixximo grandixximo merged commit de863df into LinuxCNC:master Jun 29, 2026
16 checks passed
@grandixximo

grandixximo commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Yeah tr to get rid of the period is less extra lol
Can you backport/cherry-pick to 2.9 as well? There is a bunch of stuff hanging there as well...

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

Successfully merging this pull request may close these issues.

2 participants