Make error when installing Python 1.5

S

Steven D'Aprano

Yes, you read the subject line right -- Python 1.5. Yes, I am nuts ;)

(I like having old versions of Python around for testing historical
behaviour.)

On Debian squeeze, when I try to build Python 1.5, I get this error:

fileobject.c:590: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: note: previous declaration of ‘getline’ was here
make[1]: *** [fileobject.o] Error 1
make[1]: Leaving directory `/home/steve/personal/python/Python-1.5.2/
Objects'
make: *** [Objects] Error 2


But when I do the same on Centos 5, it builds successfully and I can then
run "sudo make altinstall" to install it. What's going on here and what
do I need to do to fix this?

Grepping stdio.h gives the same content on both Centos and Debian:

$ grep getline /usr/include/stdio.h
extern _IO_ssize_t getline (char **__restrict __lineptr,


For those wanting to play around with it:

wget http://www.python.org/ftp/python/src/py152.tgz
tar xzf py152.tgz
cd Python-1.5.2/
../configure
make
sudo make altinstall
 
C

Cameron Simpson

| Yes, you read the subject line right -- Python 1.5. Yes, I am nuts ;)
|
| (I like having old versions of Python around for testing historical
| behaviour.)
|
| On Debian squeeze, when I try to build Python 1.5, I get this error:
|
| fileobject.c:590: error: conflicting types for ‘getline’
| /usr/include/stdio.h:651: note: previous declaration of ‘getline’ was here
| make[1]: *** [fileobject.o] Error 1
| make[1]: Leaving directory `/home/steve/personal/python/Python-1.5.2/
| Objects'
| make: *** [Objects] Error 2
[...]

I would take the compile line for fileobject.c and supposing it to look
like this:

gcc -c -blah fileobject.c

run it by hand as:

gcc -E -blah fileobject.c >fileobject.cpp

and examine the preprocessor output (initially with grep, then with
vi/emacs).

I would expect the lines for getline to be different, with some macro
definition occuring between the first and second occurence.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top