installation error: version 1.5.2 on Unix
Thomas A. Bryan
tbryan at python.net
Thu Feb 3 21:34:35 EST 2000
Yueqiang Huang wrote:
>
> > 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
> >
> > 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'.
> >
> 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.
Okay.
> 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).
This process sounds spookily familiar. The time I wasted a half-day compiling
Python was on a Solaris box. I think that the first build was successful, but
I realized that I had forgotten to build it with readline support.
> 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.
Now that I think about it, I think that there was some strange problem with
typedefs or macros when I finally did the 'make distclean'. I'm no longer
at that job, but I'll e-mail my former co-workers and find out what we changed.
Could you post the error you get after doing the 'make distclean'... I
seem to remember that one of my co-workers simply modified a file (readline.c?)
in the Python distribution to get it to compile.
> 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.
Like I said, post the error. Perhaps it's the same problem I had. If so,
then I can probably get the hacked up version of readline.c or config.c for
you.
helping-python-one-installation-at-a-time-ly yours
---Tom
More information about the Python-list
mailing list