GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `grp` module attempts to build even if `getgrent` family of functions are unavailable · Issue #114875 · python/cpython

grp module attempts to build even if getgrent family of functions are unavailable #114875

New issue
Copy link
New issue
Copy link
Closed
#114876
Closed
grp module attempts to build even if getgrent family of functions are unavailable#114875
#114876
Copy link
Labels
buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@mhsmith
mhsmith
opened on Feb 1, 2024
Issue body actions

Bug report

Bug description:

In the configure script, the only prerequisite for the grp module is currently the getgrgid function. Older versions of Android have this function, but they don't have the getgrent function, which the grp module uses unconditionally. This causes the build to fail as follows:

/Users/msmith/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/bin/x86_64-linux-android21-clang  -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -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/grpmodule.c -o Modules/grpmodule.o
./Modules/grpmodule.c:127:24: warning: unused variable 'buf2' [-Wunused-variable]
    char *buf = NULL, *buf2 = NULL;
                       ^
./Modules/grpmodule.c:205:24: warning: unused variable 'buf2' [-Wunused-variable]
    char *buf = NULL, *buf2 = NULL, *name_chars;
                       ^
./Modules/grpmodule.c:287:5: error: implicit declaration of function 'setgrent' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    setgrent();
    ^
./Modules/grpmodule.c:288:17: error: implicit declaration of function 'getgrent' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    while ((p = getgrent()) != NULL) {
                ^

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

  • gh-114875: Add getgrent as a prerequisite for building the grp module #114876

Activity

  1. mhsmith
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Feb 1, 2024
  2. Eclips4
    added
    buildThe build process and cross-buildThe build process and cross-build
    on Feb 1, 2024
  3. erlend-aasland
    closed this as completedin #114876on Feb 2, 2024
  4. erlend-aasland
    added a commit that references this issue on Feb 2, 2024

    gh-114875: Require getgrent for building the grp extension module (#1…

    f35c7c0
  5. aisk
    added a commit that references this issue on Feb 11, 2024

    pythongh-114875: Require getgrent for building the grp extension modu…

    b5273ef
  6. fsc-eriker
    added a commit that references this issue on Feb 14, 2024

    pythongh-114875: Require getgrent for building the grp extension modu…

    73b7e69
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-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.