installation error: version 1.5.2 on Unix

Yueqiang Huang yueqiang at talc.usc.edu
Thu Feb 3 15:28:58 EST 2000


> Yueqiang Huang wrote:
> > 
> > The error message is
> > 
> > gcc   python.o \
> >           ../libpython1.5.a   -lsocket -lnsl -ldl -lm  -o python
> > Undefined                       first referenced
> >  symbol                             in file
> > Py_Main                             python.o
> > ld: fatal: Symbol referencing errors. No output written to python
> > *** Error code 1
> > make: Fatal error: Command failed for target `link'
> > 
> > Any idea? Thanks in advance!
> 
> Was this your first try at running make, or had you already 
> run make once before?  If the Python build proceeds far enough, 
> it will leave some garbage around that will cause subsequent makes
> to fail.  The solution in that case is to run 'make clobber' before 
> building.  Note that 'make clean' won't solve the problem.  If you 
> also want to reconfigure, you should use 'make distclean'.
> 
> Please tell me if that helps.  I wrote a FAQ entry on make clobber 
> after I wasted nearly a day trying to make Python compile with a 
> half-built libpython1.5.a lying around that I didn't notice at first.
> I had run 'make clean', but that didn't get rid of the faulty library.
> 
> ---Tom

Tom,

At the first run without 'readline', everything was OK except for one
error message:

.
.
touch add2lib
if test -f hassignal; \
        then echo removing sigcheck.o intrcheck.o; \
             ar d ../libpython1.5.a sigcheck.o intrcheck.o 2>/dev/null; \
        else echo leaving sigcheck.o intrcheck.o in; fi
removing sigcheck.o intrcheck.o
*** Error code 2 (ignored)
.
.

However python executable was built and working.

Then I wanted to install python-1.5.2 with readline 4.0. I first installed
readline, then modified /Modules/Setup.in, using the *.h and libreadline.a
from readline 4.0 (readline.c is the one with the python distribution).
The compilation of readline.c was OK, but I got the message I mentioned
in the previous post. 'make clobber' and 'make distclean; ./configure ...;
make' will solve that problem, but introduce another problem associated
with readline. 

Have you installed readline with your python? It seems that a function
'initreadline' which is required by /Modules/config.c is not inside the
readline package.

Thanks!

yueqiang




More information about the Python-list mailing list