Skip to content

Issues building Python main on Solaris #91962

Closed
@kulikjak

Description

@kulikjak

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.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    • Status

      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions