[New-bugs-announce] [issue37360] Building without OpenPTY and without stropts.h

Nick Papior report at bugs.python.org
Fri Jun 21 05:45:22 EDT 2019


New submission from Nick Papior <nickpapior at gmail.com>:

When trying to compile Python without OpenPTY and without stropts.h the compilation fails at Modules/posixmodule.c.

Apparently there is a failed logic in the def's.

It goes something like this:

#ifdef HAVE_OPENPTY
...
#elif defined(HAVE__GETPTY)
...
#else
...
#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC)
    ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */
...
#endif
#endif

However, in the top of the file there is:
#if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX)
#ifdef HAVE_PTY_H
#include <pty.h>
#else
#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
#else
#ifdef HAVE_UTIL_H
#include <util.h>
#endif /* HAVE_UTIL_H */
#endif /* HAVE_LIBUTIL_H */
#endif /* HAVE_PTY_H */
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif


However, if stropts.h is not present (then I_PUSH isn't either) then the logic fails if OpenPTY isn't present as well... :(

This came up when I tried to compile Python using Intel compiler suite on our cluster.
It succesfully compiles using GNU, but fails with Intel due to this rare hickup.

If you need additional details, please let me now!

----------
messages: 346200
nosy: nickpapior
priority: normal
severity: normal
status: open
title: Building without OpenPTY and without stropts.h
type: compile error
versions: Python 2.7, Python 3.7

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


More information about the New-bugs-announce mailing list