[Python-bugs-list] [ python-Bugs-733781 ] fcntl fails to build on old RH Linux
SourceForge.net
noreply@sourceforge.net
Thu, 08 May 2003 04:38:49 -0700
Bugs item #733781, was opened at 2003-05-07 11:24
Message generated for change (Comment added) made by mwh
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=733781&group_id=5470
Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Yitzchak Gale (llxyitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: fcntl fails to build on old RH Linux
Initial Comment:
Python 2.3b1 built from source on an old RH Linux:
kernel 2.2.12-20, libc 2.1.2.
building 'fcntl' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I.
-I/<snip>/Python-2.3b1/./Include -I/usr/local/include
-I/<snip>/Python-2.3b1/Include -I/<snip>/Python-2.3b1
-c /<snip>/Python-2.3b1/Modules/fcntlmodule.c -o
build/temp.linux-i586-2.3/fcntlmodule.o
/<snip>/Python-2.3b1/Modules/fcntlmodule.c: In function
`all_ins':
/<snip>/Python-2.3b1/Modules/fcntlmodule.c:555:
`I_GWROPT' undeclared (first use in this function)
/<snip>/Python-2.3b1/Modules/fcntlmodule.c:555: (Each
undeclared identifier is reported only once
/<snip>/Python-2.3b1/Modules/fcntlmodule.c:555: for
each function it appears in.)
/<snip>/Python-2.3b1/Modules/fcntlmodule.c:564:
`I_GETCLTIME' undeclared (first use in this function)
----------------------------------------------------------------------
>Comment By: Michael Hudson (mwh)
Date: 2003-05-08 12:38
Message:
Logged In: YES
user_id=6656
I think the attached patch is all that is required. Can you
try it?
----------------------------------------------------------------------
Comment By: Yitzchak Gale (llxyitz)
Date: 2003-05-08 09:30
Message:
Logged In: YES
user_id=773482
I checked a clean copy of glib-2.1.2 from gnu.org -
it indeed is missing those two symbols.
Here is how to fix this bug:
1. To configure.in add the line:
AC_CHECK_DECLS([I_GWROPT, I_GETCLTIME],,,[#include
<stropts.h>])
2. In fcntlmodule.c, surround each of the two lines that use
these symbols with an #if, like so:
#if defined(HAVE_DECL_I_GWROPT) && HAVE_DECL_I_GWROPT
...
#endif
...
#if defined(HAVE_DECL_I_GETCLTIME) && HAVE_DECL_I_GETCLTIME
...
#endif
----------------------------------------------------------------------
Comment By: Yitzchak Gale (llxyitz)
Date: 2003-05-08 08:03
Message:
Logged In: YES
user_id=773482
I did a little historical research on this machine.
It seems to have been a vanilla Red Hat 6.1
install. So I think we're going to want to support
this.
I worked around the problem by manually
commenting out those two symbols in
fcntmodule.c. I think configure needs to detect
this problem and do that automatically.
----------------------------------------------------------------------
Comment By: Yitzchak Gale (llxyitz)
Date: 2003-05-07 19:14
Message:
Logged In: YES
user_id=773482
fcntlmodule.c states:
/* Unix 98 guarantees that these are in stropts.h. */
Those two symbols are missing in mine.
----------------------------------------------------------------------
Comment By: Yitzchak Gale (llxyitz)
Date: 2003-05-07 19:07
Message:
Logged In: YES
user_id=773482
fcntlmodule.c states:
/* Unix 98 guarantees that these are in stropts.h. */
Those two symbols are missing in mine.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=733781&group_id=5470