installation error: version 1.5.2 on Unix

Yueqiang Huang yueqiang at terra.usc.edu
Fri Feb 4 14:38:25 EST 2000


Tom,

I decided to give up yesterday and removed readline from my system,
but I changed my mind when I saw your post today. I downloaded
readline-4.0 from ftp prep.ai.mit.edu:/pub/gnu and py152.tar from
python.org and did the following things:

1./auto/terra-06/wrk6/yueqiang(3): mkdir readline4.0

2./auto/terra-06/wrk6/yueqiang/Python/readline-4.0(24): ./configure --prefix=/auto/terra-06/wrk6/yueqiang/readline4.0

No error message.

3./auto/terra-06/wrk6/yueqiang/Python/readline-4.0(25): make

No error message.

4./auto/terra-06/wrk6/yueqiang/Python/readline-4.0(26): make install

Now I begin to have error messages. The output of 4:




/bin/sh ./support/mkdirs /auto/terra-06/wrk6/yueqiang/readline4.0/include \
        /auto/terra-06/wrk6/yueqiang/readline4.0/include/readline /auto/terra-06/wrk6/yueqiang/readline4.0/lib /auto/terra-06/wrk6/yueqiang/readline4.0/info /auto/terra-06/wrk6/yueqiang/readline4.0/man/man3
mkdir /auto/terra-06/wrk6/yueqiang/readline4.0/include
mkdir /auto/terra-06/wrk6/yueqiang/readline4.0/include/readline
mkdir /auto/terra-06/wrk6/yueqiang/readline4.0/lib
mkdir /auto/terra-06/wrk6/yueqiang/readline4.0/info
mkdir /auto/terra-06/wrk6/yueqiang/readline4.0/man
mkdir /auto/terra-06/wrk6/yueqiang/readline4.0/man/man3
for f in readline.h chardefs.h keymaps.h history.h tilde.h  rlstdc.h rlconf.h; do \
        ./support/install.sh -c -m 644 ./$f /auto/terra-06/wrk6/yueqiang/readline4.0/include/readline ; \
done
mv /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libreadline.a /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libreadline.old
mv: cannot access /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libreadline.a
*** Error code 2 (ignored)
./support/install.sh -c -m 644 libreadline.a /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libreadline.a
test -n "ranlib" && ranlib -t /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libreadline.a
fake ranlib -t /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libreadline.a
mv /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libhistory.a /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libhistory.old
mv: cannot access /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libhistory.a
*** Error code 2 (ignored)
./support/install.sh -c -m 644 libhistory.a /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libhistory.a
test -n "ranlib" && ranlib -t /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libhistory.a
fake ranlib -t /auto/terra-06/wrk6/yueqiang/readline4.0/lib/libhistory.a
( if test -d doc ; then \
        cd doc && \
        make  infodir=/auto/terra-06/wrk6/yueqiang/readline4.0/info install; \
  fi )
/bin/sh ../support/mkdirs /auto/terra-06/wrk6/yueqiang/readline4.0/info /auto/terra-06/wrk6/yueqiang/readline4.0/man/man3
if test -f readline.info; then \
        .././support/install.sh -c -m 644 readline.info /auto/terra-06/wrk6/yueqiang/readline4.0/info/readline.info; \
else \
        .././support/install.sh -c -m 644 ./readline.info /auto/terra-06/wrk6/yueqiang/readline4.0/info/readline.info; \
fi
if test -f history.info; then \
        .././support/install.sh -c -m 644 history.info /auto/terra-06/wrk6/yueqiang/readline4.0/info/history.info; \
else \
        .././support/install.sh -c -m 644 ./history.info /auto/terra-06/wrk6/yueqiang/readline4.0/info/history.info; \
fi
if /bin/sh -c 'install-info --version' >/dev/null 2>&1; then \
        install-info --dir-file=/auto/terra-06/wrk6/yueqiang/readline4.0/info/dir /auto/terra-06/wrk6/yueqiang/readline4.0/info/readline.info ; \
        install-info --dir-file=/auto/terra-06/wrk6/yueqiang/readline4.0/info/dir /auto/terra-06/wrk6/yueqiang/readline4.0/info/history.info ; \
else true; fi
.././support/install.sh -c -m 644 ./readline.3 /auto/terra-06/wrk6/yueqiang/readline4.0/man/man3/readline.3


However, after step 4, I have the following things under the target
directory of my installation:


talc:/auto/terra-06/wrk6/yueqiang/readline4.0(14): ls -lR
total 4
drwxr-xr-x   3 yueqiang      512 Feb  4 11:04 include
drwxr-xr-x   2 yueqiang      512 Feb  4 11:04 info
drwxr-xr-x   2 yueqiang      512 Feb  4 11:04 lib
drwxr-xr-x   3 yueqiang      512 Feb  4 11:04 man

include:
total 1
drwxr-xr-x   2 yueqiang      512 Feb  4 11:04 readline

include/readline:
total 50
-rw-r--r--   1 yueqiang     3838 Feb  4 11:04 chardefs.h
-rw-r--r--   1 yueqiang     9263 Feb  4 11:04 history.h
-rw-r--r--   1 yueqiang     3449 Feb  4 11:04 keymaps.h
-rw-r--r--   1 yueqiang    24120 Feb  4 11:04 readline.h
-rw-r--r--   1 yueqiang     2195 Feb  4 11:04 rlconf.h
-rw-r--r--   1 yueqiang     2032 Feb  4 11:04 rlstdc.h
-rw-r--r--   1 yueqiang     2724 Feb  4 11:04 tilde.h

info:
total 158
-rw-r--r--   1 yueqiang    29798 Feb  4 11:04 history.info
-rw-r--r--   1 yueqiang   119904 Feb  4 11:04 readline.info

lib:
total 856
-rw-r--r--   1 yueqiang   113836 Feb  4 11:04 libhistory.a
-rw-r--r--   1 yueqiang   742672 Feb  4 11:04 libreadline.a

man:
total 1
drwxr-xr-x   2 yueqiang      512 Feb  4 11:04 man3

man/man3:
total 34
-rw-r--r--   1 yueqiang    34168 Feb  4 11:04 readline.3


Now I assume the installation of readline-4.0 is OK. Then I go on to
install python-1.5.2


5./auto/terra-06/wrk6/yueqiang/Python/Python-1.5.2/Modules(33): emacs Setup.in

I added the following lines after "#readline readline.c -lreadline -ltermcap" in Setup.in:

readline -I/auto/terra-06/wrk6/yueqiang/readline4.0/include -L/auto/terra-06/wrk6/yueqiang/readline4.0/lib -ltermcap

6./auto/terra-06/wrk6/yueqiang(23): mkdir py152

7./auto/terra-06/wrk6/yueqiang/Python/Python-1.5.2(36): ./configure --prefix=/auto/terra-06/wrk6/yueqiang/py152

8./auto/terra-06/wrk6/yueqiang/Python/Python-1.5.2(37): make

All ouput of step 8:


(cd Modules; make -f Makefile.pre Makefile)
cp ./Setup.in Setup
echo "# Edit this file for local setup changes" >Setup.local
rm -f ../libpython1.5.a
/bin/sh ./makesetup Setup.thread Setup.local Setup
making Makefile in subdirectory .
`Makefile' is up to date.
making Makefile in subdirectory Parser
`Makefile' is up to date.
making Makefile in subdirectory Objects
`Makefile' is up to date.
making Makefile in subdirectory Python
`Makefile' is up to date.
making Makefile in subdirectory Modules
`Makefile' is up to date.
(rm -f Modules/hassignal; cd Modules; make hassignal)
rm -f hassignal
for i in regexmodule.o regexpr.o  pcremodule.o pypcre.o  posixmodule.o  signalmodule.o   arraymodule.o  cmathmodule.o  mathmodule.o  stropmodule.o  structmodule.o  timemodule.o  operator.o  fcntlmodule.o  pwdmodule.o  grpmodule.o  selectmodule.o  socketmodule.o  errnomodule.o  md5module.o md5c.o  shamodule.o  rotormodule.o  newmodule.o  binascii.o  parsermodule.o  cStringIO.o  cPickle.o config.o getpath.o main.o getbuildinfo.o; do \
            if test "$i" = "signalmodule.o"; then \
               echo yes >hassignal; break; \
            fi; \
        done
cd Parser ; make OPT="-g -O2" VERSION="1.5" \
                prefix="/auto/terra-06/wrk6/yueqiang/py152" exec_prefix="/auto/terra-06/wrk6/yueqiang/py152" all
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  pgenmain.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  acceler.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  grammar1.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  listnode.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  node.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  parser.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  parsetok.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  tokenizer.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  bitset.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  metagrammar.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  firstsets.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  grammar.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  pgen.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  printgrammar.c
gcc -g -O2 pgenmain.o acceler.o grammar1.o  listnode.o node.o parser.o  parsetok.o tokenizer.o bitset.o  metagrammar.o firstsets.o grammar.o pgen.o printgrammar.o -lsocket -lnsl -ldl -o pgen
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  myreadline.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  intrcheck.c
cd Objects ; make OPT="-g -O2" VERSION="1.5" \
                prefix="/auto/terra-06/wrk6/yueqiang/py152" exec_prefix="/auto/terra-06/wrk6/yueqiang/py152" all
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  abstract.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  bufferobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  classobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  cobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  complexobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  fileobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  floatobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  frameobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  funcobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  intobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  listobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  longobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  dictobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  methodobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  moduleobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  object.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  rangeobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  sliceobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  stringobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  tupleobject.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  typeobject.c
cd Python ; make OPT="-g -O2" VERSION="1.5" \
                prefix="/auto/terra-06/wrk6/yueqiang/py152" exec_prefix="/auto/terra-06/wrk6/yueqiang/py152" all
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  bltinmodule.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  ceval.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  compile.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  errors.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  frozen.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  frozenmain.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  getargs.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  getcompiler.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  getcopyright.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  getmtime.c
gcc -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -DPLATFORM='"sunos5"' \
              ./getplatform.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  getversion.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  graminit.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  import.c
gcc -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -I/ ./importdl.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  marshal.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  modsupport.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  mystrtoul.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  pyfpe.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  pystate.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  pythonrun.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  structmember.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  sysmodule.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  traceback.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  sigcheck.c
cd Modules ; make OPT="-g -O2" VERSION="1.5" \
                prefix="/auto/terra-06/wrk6/yueqiang/py152" exec_prefix="/auto/terra-06/wrk6/yueqiang/py152" all
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./regexmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./regexpr.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./pcremodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./pypcre.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./posixmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./signalmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./arraymodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./cmathmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./mathmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./stropmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./structmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./timemodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./operator.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./fcntlmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./pwdmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./grpmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./selectmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./socketmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./errnomodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./md5module.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./md5c.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./shamodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./rotormodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./newmodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./binascii.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./parsermodule.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./cStringIO.c
gcc  -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ./cPickle.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  config.c
gcc -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -DPYTHONPATH='":plat-sunos5:lib-tk"' \
              -DPREFIX='"/auto/terra-06/wrk6/yueqiang/py152"' \
              -DEXEC_PREFIX='"/auto/terra-06/wrk6/yueqiang/py152"' \
              -DVERSION='"1.5"' \
              -DVPATH='""' \
              ./getpath.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  main.c
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  getbuildinfo.c
if test ! -f libpython1.5.a; \
        then for i in Parser Objects Python Modules; do rm -f $i/add2lib; done; true; \
        else true; fi
for i in Parser Objects Python Modules; do \
                (cd $i; make VERSION="1.5" add2lib); done
ar cr ../libpython1.5.a acceler.o grammar1.o  listnode.o node.o parser.o  parsetok.o tokenizer.o bitset.o  metagrammar.o myreadline.o
if test ! -f ../Modules/hassignal; \
        then echo adding intrcheck.o; ar r ../libpython1.5.a intrcheck.o; \
        else echo leaving intrcheck.o out; fi
leaving intrcheck.o out
touch add2lib
ar cr ../libpython1.5.a abstract.o bufferobject.o  classobject.o cobject.o complexobject.o  fileobject.o floatobject.o  frameobject.o funcobject.o intobject.o listobject.o  longobject.o dictobject.o methodobject.o  moduleobject.o object.o rangeobject.o  sliceobject.o stringobject.o  tupleobject.o typeobject.o
touch add2lib
ar cr ../libpython1.5.a bltinmodule.o  ceval.o compile.o  errors.o  frozen.o frozenmain.o  getargs.o getcompiler.o getcopyright.o getmtime.o  getplatform.o getversion.o graminit.o  import.o importdl.o  marshal.o modsupport.o mystrtoul.o  pyfpe.o pystate.o pythonrun.o  structmember.o sysmodule.o  traceback.o  
if test ! -f ../Modules/hassignal; \
        then echo adding sigcheck.o; ar r ../libpython1.5.a sigcheck.o; \
        else echo leaving sigcheck.o out; fi
leaving sigcheck.o out
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)
ar cr ../libpython1.5.a regexmodule.o regexpr.o  pcremodule.o pypcre.o  posixmodule.o  signalmodule.o   arraymodule.o  cmathmodule.o  mathmodule.o  stropmodule.o  structmodule.o  timemodule.o  operator.o  fcntlmodule.o  pwdmodule.o  grpmodule.o  selectmodule.o  socketmodule.o  errnomodule.o  md5module.o md5c.o  shamodule.o  rotormodule.o  newmodule.o  binascii.o  parsermodule.o  cStringIO.o  cPickle.o config.o getpath.o main.o getbuildinfo.o
touch add2lib
echo 0 >buildno
cd Modules; make OPT="-g -O2" python.o
gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -c  python.c
expr `cat buildno` + 1 >buildno1
mv -f buildno1 buildno
gcc -c -g -O2 -I. -DHAVE_CONFIG_H -DBUILD=`cat buildno` \
              ./Modules/getbuildinfo.c
ar cr libpython1.5.a getbuildinfo.o
ranlib libpython1.5.a
fake ranlib libpython1.5.a
true
cd Modules;  make OPT="-g -O2" VERSION="1.5" \
                prefix="/auto/terra-06/wrk6/yueqiang/py152" exec_prefix="/auto/terra-06/wrk6/yueqiang/py152" \
                LIBRARY=../libpython1.5.a link
gcc   python.o \
          ../libpython1.5.a -L/auto/terra-06/wrk6/yueqiang/readline4.0/lib -ltermcap  -lsocket -lnsl -ldl -lm  -o python 
Undefined                       first referenced
 symbol                             in file
initreadline                        ../libpython1.5.a(config.o)
ld: fatal: Symbol referencing errors. No output written to python
*** Error code 1
make: Fatal error: Command failed for target `link'
Current working directory /auto/terra-06/wrk6/yueqiang/Python/Python-1.5.2/Modules
*** Error code 1
make: Fatal error: Command failed for target `python'



I tried the follwoing:

9./auto/terra-06/wrk6/yueqiang/Python/Python-1.5.2/Modules(39): grep initreadline *

Output of step 9:

config.c:extern void initreadline();
config.c:{"readline", initreadline},
readline.c:initreadline()



Note that this readline.c is the one with the python-1.5.2 distribution, not the one with the readline-4.0 distribution.

10./auto/terra-06/wrk6/yueqiang/Python/readline-4.0(34): grep initreadline *

No output. Note that the dir in step 10 is the source of readline-4.0. So initreadline() is NOT defined in the readline-4.0 distribution.

As you mentioned in your post, maybe the only way out is to hack up a version of readline.c for readline-4.0.

I really appreciate your willingness to help. Thanks a lot!

yueqiang

_______________________________________________________________________
Yueqiang Huang, Department of Earth Sciences, University of Southern CA
Los Angeles, CA 90089-0740 USA 


On Thu, 3 Feb 2000, Thomas A. Bryan wrote:

> 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