Skip to content

Fix building Python3 on linux#490

Open
ardovm wants to merge 5 commits into
trunkfrom
python3-linux
Open

Fix building Python3 on linux#490
ardovm wants to merge 5 commits into
trunkfrom
python3-linux

Conversation

@ardovm

@ardovm ardovm commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

These commits should allow to compile Python 3.11.15 on Linux.

However, after applying them, Python macros do not seem to work. But at least, we can get to compile trunk again.

ardovm added 3 commits July 5, 2026 16:51
Apply the same logic as for the _md5 and _shaXXX modules.
Explicitly name the possible _sysconfigdata_XXX.py files.
Copy the cpython include subdirectory.
@ardovm ardovm requested a review from jimjag July 5, 2026 15:01
@ardovm

ardovm commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Requesting @jimjag's review in particular for the name of the sysconfigdata file in b0bc83f.

@DamjanJovanovic

Copy link
Copy Markdown
Contributor

Why don't we use the system Python on Linux? Do macros work with it?

@ardovm

ardovm commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

I suppose we are not using system-provided Python (and also other additional dependencies) due to the possible age difference between the distro of the build system and the distro of the actual systems on which AOO will run.
I'll see if I can build with system Python.

@leginee

leginee commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

main\pyuno\source\module\pyuno_dlopenwrapper.c
links against
#include <Python.h>

Isnt that an issue?

what we need is a dialog similar or same that lists as with java, so we can point python to a sandbox.
That would be cool and not that difficult i think.

@ardovm

ardovm commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

main\pyuno\source\module\pyuno_dlopenwrapper.c links against #include <Python.h>

Isnt that an issue?

I suppose not. The build system should take care of indicating the proper include file paths: either local to the AOO build tree, or at system level.

@leginee

leginee commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

I suppose not. The build system should take care of indicating the proper include file paths: either local to the AOO build tree, or at system level.
But we do not build for a specific distro, but in general. And if you build against the distros python, is it compatible to other distros python?

@ardovm

ardovm commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Why don't we use the system Python on Linux? Do macros work with it?

I just built on openSUSE Leap 16.0, that ships Python 3.13.13. Macros are accessible when using system Python.
Macros are not accessible when using the "bundled" Python 3.11.5.

@ardovm

ardovm commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

I suppose not. The build system should take care of indicating the proper include file paths: either local to the AOO build tree, or at system level.

But we do not build for a specific distro, but in general. And if you build against the distros python, is it compatible to other distros python?

I am afraid that using system level Python would make the AOO binary incompatible, or would raise compatibility issues, with other distributions having other system Python versions.

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.

3 participants