FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Undeclared function 'is_pad' on macos-13 GitHub runners · Issue #115383 · python/cpython · GitHub

Repository navigation

Undeclared function 'is_pad' on macos-13 GitHub runners #115383

Closed

Description

Bug report

It looks like it's only on the macos-13 runner. I'm not sure what changed. The failures look to be on unrelated commits and PRs.

./Modules/_cursesmodule.c:1336:9: error: call to undeclared function 'is_pad'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if (py_is_pad(self->win)) {
        ^
./Modules/_cursesmodule.c:1159:29: note: expanded from macro 'py_is_pad'
#define py_is_pad(win)      is_pad(win)
                            ^
./Modules/_cursesmodule.c:2024:9: error: call to undeclared function 'is_pad'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if (py_is_pad(self->win)) {
        ^
./Modules/_cursesmodule.c:1159:29: note: expanded from macro 'py_is_pad'
#define py_is_pad(win)      is_pad(win)
                            ^
./Modules/_cursesmodule.c:2248:9: error: call to undeclared function 'is_pad'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if (py_is_pad(self->win)) {
        ^
./Modules/_cursesmodule.c:1159:29: note: expanded from macro 'py_is_pad'
#define py_is_pad(win)      is_pad(win)
                            ^
./Modules/_cursesmodule.c:2324:9: error: call to undeclared function 'is_pad'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if (py_is_pad(self->win)) {
        ^
./Modules/_cursesmodule.c:1159:29: note: expanded from macro 'py_is_pad'
#define py_is_pad(win)      is_pad(win)
                            ^
4 errors generated.
make: *** [Modules/_cursesmodule.o] Error 1

Seen in:

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    buildThe build process and cross-build
    on Feb 13, 2024
  2. hugovk commented on Feb 13, 2024

    Member

    Theory: those failures are both using version 20240114.1 of the runner image, passing builds are using newer 20240204.1 (visible in the logs under Set up job > Runner Image).

    Perhaps some tools/compilers have changed and we're restoring some caches for the wrong ones?

  3. vstinner commented on Feb 13, 2024

    Member

    @sobolevn: oh, do you recall that issue?

  4. sobolevn commented on Feb 13, 2024

    Member

    Docs: https://manpages.debian.org/experimental/ncurses-doc/is_pad.3ncurses.en.html
    We have this configuration:

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_is_pad" >&5
    printf "%s\n" "$ac_cv_lib_curses_is_pad" >&6; }
      if test "x$ac_cv_lib_curses_is_pad" = xyes
    then :
    
    printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
    
    fi

    And then we use this macro:

    #if defined(HAVE_CURSES_IS_PAD)
    #define py_is_pad(win) is_pad(win)
    #elif defined(WINDOW_HAS_FLAGS)
    #define py_is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
    #endif

    Refs 8bc7d63

    Interesting that the configure did detect is_pad:

    checking for curses function is_pad... (cached) yes

    I think that the only thing that can change here is the curses version.

  5. sobolevn commented on Feb 13, 2024

    Member

    Let's try to brew install ncurses?

  6. added a commit that references this issue on Feb 13, 2024
  7. sobolevn commented on Feb 13, 2024

    Member

    Ok, it didn't work. The second idea: we can try to delete the builder cache: https://github.com/python/cpython/actions/caches?query=macos (@hugovk?)

  8. hugovk commented on Feb 13, 2024

    Member

    We could try that, but it might re-occur as new caches are saved. It could at least help isolate the problem.

    If this is only a problem with the older 20240114.1 images, I expect they're currently rolling out the newer 20240204.1 across the builders, so the problem would eventually go away. But it could potentially re-occur. Perhaps we also need to add an extra key to the cache.


    Comparing failing/passing logs:

    The failure is with Xcode 14.3.1:

    2024-02-13T01:03:53.7711130Z ./Modules/_cursesmodule.c:1336:9: error: call to undeclared function 'is_pad'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2024-02-13T01:03:53.8018530Z     if (py_is_pad(self->win)) {
    2024-02-13T01:03:53.8019670Z         ^
    2024-02-13T01:03:53.8021030Z ./Modules/_cursesmodule.c:1159:29: note: expanded from macro 'py_is_pad'
    2024-02-13T01:03:53.8022380Z #define py_is_pad(win)      is_pad(win)
    2024-02-13T01:03:53.8023430Z                             ^
    

    The passing build is with Xcode 15.0.1, we don't get an error, but we do get a warning:

    2024-02-13T06:33:40.8044080Z ./Modules/_cursesmodule.c:1336:9: warning: 'is_pad' is only available on macOS 14.0 or newer [-Wunguarded-availability-new]
    2024-02-13T06:33:40.8160730Z     if (py_is_pad(self->win)) {
    2024-02-13T06:33:40.8185070Z         ^~~~~~~~~~~~~~~~~~~~
    2024-02-13T06:33:40.8336470Z ./Modules/_cursesmodule.c:1159:29: note: expanded from macro 'py_is_pad'
    2024-02-13T06:33:40.8340060Z gcc -I./Modules/_sqlite -fno-strict-overflow -Wsign-compare -g -Og -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include     -c ./Modules/_sqlite/connection.c -o Modules/_sqlite/connection.o
    2024-02-13T06:33:40.8362630Z #define py_is_pad(win)      is_pad(win)
    2024-02-13T06:33:40.8366430Z                             ^~~~~~
    2024-02-13T06:33:40.8389540Z /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ncurses.h:964:29: note: 'is_pad' has been marked as being introduced in macOS 14.0 here, but the deployment target is macOS 13.6.0
    2024-02-13T06:33:40.8392810Z extern NCURSES_EXPORT(bool) is_pad (const WINDOW *);            /* generated */
    2024-02-13T06:33:40.8501350Z                             ^
    2024-02-13T06:33:40.8527550Z ./Modules/_cursesmodule.c:1336:9: note: enclose 'is_pad' in a __builtin_available check to silence this warning
    2024-02-13T06:33:40.8590660Z     if (py_is_pad(self->win)) {
    2024-02-13T06:33:40.8773050Z         ^~~~~~~~~~~~~~~~~~~~
    2024-02-13T06:33:40.9074800Z ./Modules/_cursesmodule.c:1159:29: note: expanded from macro 'py_is_pad'
    2024-02-13T06:33:40.9322140Z #define py_is_pad(win)      is_pad(win)
    2024-02-13T06:33:40.9325580Z gcc -I./Modules/_sqlite -fno-strict-overflow -Wsign-compare -g -Og -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include     -c ./Modules/_sqlite/cursor.c -o Modules/_sqlite/cursor.o
    2024-02-13T06:33:40.9348610Z                             ^~~~~~
    
  9. hugovk commented on Feb 13, 2024

    Member

    Related? #109617 "Refresh Screen Provided By curses.wrapper Causes Seg Fault (macOS, xcode 15 Apple supplied ncurses 6.0 breakage)"

  10. sobolevn commented on Feb 13, 2024

    Member

    This looks like a fix #111258

  11. hugovk commented on Feb 13, 2024

    Member

    That looks good: #111258 (comment)

  12. sorcio commented on Feb 13, 2024

    Contributor

    Note that #111258 applies only to builds that use Apple-provided ncurses. If I remember correctly, official macOS builds ship a specific ncurses and are not affected by either issue. So this is one way that GitHub runners are not aligned with official builds, in a way that is not well documented.

  13. 4 remaining items

  14. hugovk commented on Feb 13, 2024

    Member

    From #111258 (comment):

    The free-threaded build ran on the older 20240114.1 with Xcode 14 (which has recently started failing):

    And the regular build ran on the newer 20240204.1 with Xcode 15:

    And both passed 👍

    Both ran with no cache restored:

    Cache not found for input keys: build_macos-macos-13-1fbf1eb725ce1b5db0f36e7494693622bbfb08954e2caf20404e308fed7ff9f9
    
  15. colesbury commented on Feb 13, 2024

    ContributorAuthor

    These both restored the same cache...

    Yeah, my comment wasn't accurate. I should have said the failing builds appear to be both running image 20240114.1 AND also restore config.cache. For example, here's a job that passes: even though it uses 20240114.1, it doesn't restore from cache (because it changes configure.ac) https://github.com/python/cpython/actions/runs/7888270010/job/21525416714.

  16. added a commit that references this issue on Feb 13, 2024
  17. added a commit that references this issue on Feb 13, 2024
  18. added 3 commits that reference this issue on Feb 13, 2024
  19. added a commit that references this issue on Feb 14, 2024
  20. itamaro commented on Feb 15, 2024

    Contributor

    anything left to do here?

  21. hugovk commented on Feb 15, 2024

    Member

    CI is green, let's close. Thanks everyone for the investigation!

  22. ambv commented on May 4, 2024

    Contributor

    We're hitting this again with the pyrepl PR. The image now is at 20240421.1 so way past the versions discussed above. I'm leaning towards landing GH-111258 to address this properly.

  23. reopened this on May 4, 2024
  24. ambv commented on May 5, 2024

    Contributor

    The PR landed and fixed the issue on our PR, too. This can be closed again :D

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

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL