[New-bugs-announce] [issue34027] python 3.7 openpty/forkpty build failure on macOS

Daiderd Jordan report at bugs.python.org
Mon Jul 2 17:31:08 EDT 2018


New submission from Daiderd Jordan <daiderd at gmail.com>:

I can't really figure out why, but the <util.h> import in posixmodule.c seems to get skipped since python 3.7. The condition doesn't look entirely correct in case libutil.h is also available on macOS, however this has not changed since 3.6 and it worked fine there while both where available.


Part of the configure log:

checking pty.h usability... no
checking pty.h presence... no
checking for pty.h... no
checking libutil.h usability... yes
checking libutil.h presence... yes
checking for libutil.h... yes
...
checking util.h usability... yes
checking util.h presence... yes
checking for util.h... yes


Build error:

./Modules/posixmodule.c:5924:9: error: implicit declaration of function 'openpty' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0)
        ^
./Modules/posixmodule.c:5924:9: note: did you mean 'openat'?
/nix/store/q819d3vjz7vswpvkrfa9gck3ys8rmvcj-Libsystem-osx-10.11.6/include/sys/fcntl.h:480:5: note: 'openat' declared here
int     openat(int, const char *, int, ...) __DARWIN_NOCANCEL(openat) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
        ^
./Modules/posixmodule.c:5924:9: warning: this function declaration is not a prototype [-Wstrict-prototypes]
    if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0)
        ^
./Modules/posixmodule.c:6018:11: error: implicit declaration of function 'forkpty' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    pid = forkpty(&master_fd, NULL, NULL, NULL);
          ^
./Modules/posixmodule.c:6018:11: warning: this function declaration is not a prototype [-Wstrict-prototypes]
2 warnings and 2 errors generated.
make: *** [Makefile:1793: Modules/posixmodule.o] Error 1

----------
components: Build
messages: 320913
nosy: LnL7
priority: normal
severity: normal
status: open
title: python 3.7 openpty/forkpty build failure on macOS
type: compile error
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34027>
_______________________________________


More information about the New-bugs-announce mailing list