Title: make fails when compiling Python 2.6 from source (posixmodule.c)
Type: compile error Stage: resolved
Components: Installation Versions:
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Oguz_eren, ned.deily, pablogsal
Priority: normal Keywords:

Created on 2019-08-23 13:49 by Oguz_eren, last changed 2019-08-23 18:59 by ned.deily. This issue is now closed.

File name Uploaded Description Edit
config.log Oguz_eren, 2019-08-23 13:52 config log
Messages (3)
msg350283 - (view) Author: Oguz_eren (Oguz_eren) Date: 2019-08-23 13:49
I'm trying to compile Python 2.6.8 on Kubuntu 19.04.

Current system version is Python 2.7.16. See below the error message I receive, during make.

oguz@dikanka:~$ tar -xvzf Python-2.6.8.tgz
oguz@dikanka:~$ cd Python-2.6.8/

oguz@dikanka:~/Python-2.6.8$ ./configure

oguz@dikanka:~/Python-2.6.8$ make

gcc -pthread  -Xlinker -export-dynamic -o python \ 
               Modules/python.o \ 
               libpython2.6.a -lpthread -ldl  -lutil   -lm   
/usr/bin/ld: libpython2.6.a(posixmodule.o): in function `posix_tmpnam': 
/home/oguz/Python-2.6.8/./Modules/posixmodule.c:7261: warning: the use of `tmpnam_r' is dangerous, better use `
/usr/bin/ld: libpython2.6.a(posixmodule.o): in function `posix_tempnam': 
/home/oguz/Python-2.6.8/./Modules/posixmodule.c:7216: warning: the use of `tempnam' is dangerous, better use `m
Segmentation fault (core dumped) 
make: *** [Makefile:414: sharedmods] Error 139 

I found this python bug to be very similar to my case, but it's a rather old bug :

Here it says, posixmodule fails because resource.h is not detected properly by configure. Similarly in my case, pyconfig.h file's HAVE_SYS_RESOURCE_H line is commented out. I also realized that my c lib headers are not under /usr/include/sys and /usr/include/bits. Instead, I can find them under the following locations :

oguz@dikanka:/usr/include/linux$ find /usr/include -name resource.h

I tried symlinks to x86_64-linux-gnu/sys and x86_64-linux-gnu/bits, but the the issue persists.

Any ideas ? Thanks in advance!
msg350302 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-08-23 14:54
Hi Oguz,

Sadly Python 2.6.8 is not supported anymore
msg350325 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-08-23 18:59
Python 2.6 reached end-of-life in 2013, six years ago, and has not received any non-security bug fixes since 2010.  We strongly recommend thst you migrate to a modern, supported version of Python, if not Python 3.7, then at least Python 2.7 which itself will reach end-of-life in 2020.
Date User Action Args
2019-08-23 18:59:13ned.deilysetstatus: open -> closed

nosy: + ned.deily
messages: + msg350325

resolution: out of date
stage: resolved
2019-08-23 14:54:26pablogsalsetnosy: + pablogsal
messages: + msg350302
2019-08-23 13:52:05Oguz_erensetfiles: + config.log
2019-08-23 13:49:47Oguz_erencreate