This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 2.3.3 make fails build posix_openpty'
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: dcd, loewis
Priority: normal Keywords:

Created on 2004-01-21 00:28 by dcd, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
configure.in.patch dcd, 2004-01-21 19:37 patch to configure.in to check libbsd for openpty also
Messages (4)
msg19732 - (view) Author: David Dyck (dcd) Date: 2004-01-21 00:28
I'm trying to build 2.3.3 on an older slackware system
that is still libc5 based. (gcc version egcs-2.91.66.1)

configure / make reports errors 
 after stripping warnings the error is reported as:

./Modules/posixmodule.c: In function `posix_openpty':
./Modules/posixmodule.c:2623: `I_PUSH' undeclared 
(first use in this function)
./Modules/posixmodule.c:2623: (Each undeclared 
identifier is reported only once
./Modules/posixmodule.c:2623: for each function it 
appears in.)

pyconfig.h only defined HAVE_DEV_PTMX 

#define HAVE_DEV_PTMX 1
/* #undef HAVE_OPENPTY */
/* #undef HAVE__GETPTY */

(I have a recent 2.4.25-pre6 kernel so I do 
have /dev/ptmx that configure uses to check for
HAVE_DEV_PTMX)
msg19733 - (view) Author: David Dyck (dcd) Date: 2004-01-21 18:58
Logged In: YES 
user_id=53855

I have found that I have libbsd.a but
not libutil (that is checked for openpty by configure)

cd /usr/lib
nm -g libbsd.a | grep ' T openpty'
00000000 T openpty

If I create a fake libutil.a as a symlink to libbsd.a
 (ln -s libbsd.a libutil.a)
configure and make run to completion

It would have been "nicer" if configure had looked for
libbsd

looks like configure.in could be modified to
check for libbsd by adding a line like
AC_CHECK_FUNCS(openpty,,
AC_CHECK_LIB(bsd,openpty,[AC_DEFINE(HAVE_OPENPTY) LIB
S="$LIBS -lbsd"]))
after
AC_CHECK_FUNCS(openpty,, AC_CHECK_LIB(util,openpty,
[AC_DEFINE(HAVE_OPENPTY) LIB
S="$LIBS -lutil"]))

msg19734 - (view) Author: David Dyck (dcd) Date: 2004-01-24 06:17
Logged In: YES 
user_id=53855

I submitted a patch # 881820
relative to 2.4 
msg19735 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-01-08 10:08
Logged In: YES 
user_id=21627

This should be fixed with patch #881820 now.
History
Date User Action Args
2022-04-11 14:56:02adminsetgithub: 39842
2004-01-21 00:28:42dcdcreate