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: LINKCC->CXX, -ltermcap->-lncurses
Type: compile error Stage: resolved
Components: Build Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, nikiwaibel
Priority: normal Keywords: patch

Created on 2005-06-08 07:30 by nikiwaibel, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.4.1.nww.patch nikiwaibel, 2005-06-08 07:30 Makefile.pre.in: LINKCC->CXX; configure.in: -ltermcap->-lncurses
Messages (4)
msg25511 - (view) Author: Niki W. Waibel (nikiwaibel) Date: 2005-06-08 07:30
had troubles building python on various platforms
(using gcc-4.0.0 and binutils-2.16.90.0.3):

a) Makefile.pre.in
had to change
    $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
to
    $(CXX) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
for the $(BUILDPYTHON) target. LINKCC was ok for sparc
and x86_64 cpus, but *NOT* ok on intel (x86) cpus
(solaris AND linux os!).
the following error is gone now (using CXX):
  Modules/ccpython.o:(.eh_frame+0x12): undefined
reference to `__gxx_personality_v0'
seems that ccpython.cc is c++ code and so python needs
libstdc++ (for some reason only on the intel (x86) cpu.
the cleanest way to include that lib is to use g++
instead of gcc. (i dont know wether you need the PURIFY
var as well...).

b) configure.in:
i had to change -ltermcap to -lncurses. otherwise the
readline lib on all of my systems was not found. maybe
it should be checked in configure wether readline needs
termcap or ncurses or none of the libs.

c) unfort all my add libs are not in the std
include/lib path, neither in /usr/local. so i had to
"tune" setup.py. i just changed the lines
  add_dir_to_list(self.compiler.library_dirs,
'/usr/local/lib')
  add_dir_to_list(self.compiler.include_dirs,
'/usr/local/include')
which is a bad solution. it would be much easier to
have variables like LIBDIR and INCLUDEDIR (maybe
SYSTEM_LIBDIR, SYSTEM_INCLUDEDIR?) which could be
defined as variables or within System.local. the
cleanest solution imho would be to use CFLAGS, LDFLAGS
and LIBS when building the modules.

hope this helps, niki
msg82206 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-16 02:25
Can the patch / ideas be salvaged for current versions?
msg82226 - (view) Author: Niki W. Waibel (nikiwaibel) Date: 2009-02-16 08:59
this issue seems resolved with 2.6.1 and 3.0
msg82227 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-16 09:26
Thanks for the feedback, Niki.
History
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 42062
2009-02-16 09:26:16ajaksu2setstatus: open -> closed
resolution: out of date
messages: + msg82227
stage: test needed -> resolved
2009-02-16 08:59:21nikiwaibelsetmessages: + msg82226
2009-02-16 02:25:31ajaksu2setversions: + Python 2.6, - Python 2.4
nosy: + ajaksu2
messages: + msg82206
keywords: + patch
type: compile error
stage: test needed
2005-06-08 07:30:54nikiwaibelcreate