[issue34027] python 3.7 openpty/forkpty build failure on macOS
New submission from Daiderd Jordan : I can't really figure out why, but the 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 <https://bugs.python.org/issue34027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34027] python 3.7 openpty/forkpty build failure on macOS
Change by Daiderd Jordan : -- keywords: +patch pull_requests: +7664 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34027] python 3.7 openpty/forkpty build failure on macOS
Daiderd Jordan added the comment: This is a build using the nix package manager, we use all of the opensource components provided by apple instead of relying on xcode. The libutil.h that's found in this case is the one from the 10.11.6 sources. https://opensource.apple.com/source/libutil/libutil-43/ -- ___ Python tracker <https://bugs.python.org/issue34027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34027] python 3.7 openpty/forkpty build failure on macOS
Daiderd Jordan added the comment: The headers end up in the build environment because of Libsystem which is part of our base environment. But yes, this is also the case with 3.6 and that builds just fine so I'm not sure why it's failing now. These are the logs from our build service for reference: python37.x86_64-darwin https://hydra.nixos.org/build/76780195/nixlog/2 python36.x86_64-darwin https://hydra.nixos.org/build/76018915/nixlog/1 -- ___ Python tracker <https://bugs.python.org/issue34027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34027] python 3.7 openpty/forkpty build failure on macOS
Daiderd Jordan added the comment: Oh interesting, so it only used to worked by accident. I should have looked at the 3.6 log more closely. -- ___ Python tracker <https://bugs.python.org/issue34027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment
Daiderd Jordan added the comment: Even tho it's headers are not /usr/lib/libutil.dylib is available on every macOS system. Unlike on bsd this doesn't include the relevant symbols for openpty/forkpty, that's why I used an __APPLE__ condition but including both also works fine. Assuming it's headers are not available doesn't seem like a good assumption, even tho they won't be in most cases. -- ___ Python tracker <https://bugs.python.org/issue34027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment
Daiderd Jordan added the comment: Either patch looks fine to me, should I close the pull request? -- ___ Python tracker <https://bugs.python.org/issue34027> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com