You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As previously mentioned here #89886 (comment), Python main branch currently doesn't build on Solaris due to a problem with hstrerror detection and libncurses library.
hstrerror not found issue
hstrerror detection changed in #89886 (changing from AC_LINK_IFELSE to AC_COMPILE_IFELSE) and because on Oracle Solaris you can compile a program with hstrerror but need -lresolv for linking, it's now detected as available. Later, this results in hstrerror compilation failing at the end with relocation error "symbol hstrerror: referenced symbol not found".
I think that the real issue is in the "needs -lresolv" detection few lines above:
dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
dnl On others, they are in the C library, so we to take no action
AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_TRUE],
AC_CHECK_LIB(resolv, inet_aton)
)
The problem here is that while hstrerror still needs -lresolv, inet_aton does not, and since only the latter is checked here, the system incorrectly determines that it's not necessary. When this detection gets updated to check both, -lresolv is correctly appended to PATH and this issue is gone.
curses build issue
The curses build issue is related to several missing defines and include path. With those added for Solaris, the build of _curses module succeeds.
Just got to this issue. Could you update the linked PRs, and check that they still help Solaris? I have no problem merging them for 3.13 -- they're small, clearly platform-specific, and shouldn't break other builds. Making sure that they continue working is of course up to you.
Hi Petr, thank you! I will rebase/update linked PRs onto the current main as soon as possible.
As for the "community support", I am all for it. Solaris (both Oracle and OpenSolaris forks) depend on Python a lot, and while it is not officially supported here, we support it internally. Being informed about issues reported here makes sense, as we would most likely hit those soon anyway.
Also, once this gets merged, we should hopefully have a working (green) Solaris buildbot worker (https://buildbot.python.org/all/#/workers/47 - currently offline due to maintenance, but should be up again soon); that should also help us with the support.
The hsterror detection PR is rebased and seems to work as expected.
The ncurses related PR was just closed because setup.py is no longer used (it's in Python 3.11, but I don't think you will backport such a change all the way there).
I wanted to create a similar patch for main and found that it works much better now and that while I need to pass some additional env variables to the build (specifically CFLAGS=-I/usr/include/ncurses and LIBREADLINE_LIBS=-lncursesw -lreadline), touching _XOPEN_SOURCE_EXTENDED or HAVE_NCURSESW is no longer required.
Oh, and I need to correct the info about Solaris buildbot worker a little. This won't make the test suite green, but it should make it successfully build all extensions (configure and compile steps).
We have it green internally, but several more PRs will have to be merged to make the tests green here.
Activity
encukou commentedon Jan 31, 2024
Just got to this issue. Could you update the linked PRs, and check that they still help Solaris? I have no problem merging them for 3.13 -- they're small, clearly platform-specific, and shouldn't break other builds. Making sure that they continue working is of course up to you.
encukou commentedon Jan 31, 2024
Jakub, would you like to help me figure out what “community support” for a platform should look like, with Solaris as guinea pig № 2?
If so, please check out https://discuss.python.org/t/community-support-for-a-platform/44621, and python/devguide#1267
kulikjak commentedon Feb 1, 2024
Hi Petr, thank you! I will rebase/update linked PRs onto the current main as soon as possible.
As for the "community support", I am all for it. Solaris (both Oracle and OpenSolaris forks) depend on Python a lot, and while it is not officially supported here, we support it internally. Being informed about issues reported here makes sense, as we would most likely hit those soon anyway.
Also, once this gets merged, we should hopefully have a working (green) Solaris buildbot worker (https://buildbot.python.org/all/#/workers/47 - currently offline due to maintenance, but should be up again soon); that should also help us with the support.
pythongh-91962: Fix hstrerror detection issues on Solaris
kulikjak commentedon Feb 13, 2024
The
hsterrordetection PR is rebased and seems to work as expected.The ncurses related PR was just closed because
setup.pyis no longer used (it's in Python 3.11, but I don't think you will backport such a change all the way there).I wanted to create a similar patch for
mainand found that it works much better now and that while I need to pass some additional env variables to the build (specificallyCFLAGS=-I/usr/include/ncursesandLIBREADLINE_LIBS=-lncursesw -lreadline), touching_XOPEN_SOURCE_EXTENDEDorHAVE_NCURSESWis no longer required.kulikjak commentedon Feb 13, 2024
Oh, and I need to correct the info about Solaris buildbot worker a little. This won't make the test suite green, but it should make it successfully build all extensions (configure and compile steps).
We have it green internally, but several more PRs will have to be merged to make the tests green here.
gh-91962: Fix `hstrerror` detection issues on Solaris (GH-91963)
kulikjak commentedon Oct 30, 2024
After the recent merge, the Solaris SPARC buildbot successfully builds all the modules. Thank you!
https://buildbot.python.org/#/builders/742
pythongh-91962: Fix `hstrerror` detection issues on Solaris (pythonGH…
pythongh-91962: Fix `hstrerror` detection issues on Solaris (pythonGH…