Python 2.3.4 under AT&T MP RAS SVR4: ld: Symbol referencing errors.

A

Alexander Landgraf

Hi group,

I am not sure if this is the correct place for my question.
If not, please tell me.

I tried to compile Python 2.3.4 under AT&T MP RAS SVR4:
$./configure --prefix=${HOME} --with-threads=no
$make
but make fails because each invocation of ld causes errors like:

....
running build
running build_ext
building 'struct' extension
cc -DNDEBUG -O -OPT:Olimit=0 -I. -I/home/q904958/src/python2_3_
4/./Include -I/home/q904958/src/python2_3_4/Include -
I/home/q904958/src/python2_3_4 -c /home/q904958/src/python2_3_
4/Modules/structmodule.c -o build/temp.dwh1-4.0-3446-2.3/structmodule.o
(cc:) Unknown optimization designation: -OPT:Olimit=0. Opt level 0
assumed.
NCR High Performance C Compiler R3.0c
(c) Copyright 1994-98, NCR Corporation
(c) Copyright 1987-98, MetaWare Incorporated
ld build/temp.dwh1-4.0-3446-2.3/structmodule.o -L/usr/local/lib -o
build/lib.dwh1-4.0-3446-2.3/struct.so
Undefined first referenced
symbol in file
strftime build/temp.dwh1-4.0-3446-2.3/structmodule.o
__wcstok_ptr_ build/temp.dwh1-4.0-3446-2.3/structmodule.o
PyLong_FromUnsignedLong build/temp.dwh1-4.0-3446-2.3/structmodule.o
PyInt_Type build/temp.dwh1-4.0-3446-2.3/structmodule.o
PyLong_Type build/temp.dwh1-4.0-3446-2.3/structmodule.o
PyTuple_Type build/temp.dwh1-4.0-3446-2.3/structmodule.o
....
UX:ld: ERROR: build/lib.dwh1-4.0-3446-2.3/struct.so: fatal error: Symbol
referencing errors. No output written to build/lib.dwh1-4.0-3446-
2.3/struct.so
....

My questions are:
1) Does that mean ld is unable to locate libraries?
(Which libraries? strftime() is declared in time.h but
I guess PyInt_Type is Python specific)
2) What is the correct way to specify library locations?
(I tried ./configure --with-libs=-L/usr/lib but
ld arguments did not change)

Thank you for any hints.

Alexander
 
J

Jeff Epler

Python has failed to find the proper way to produce shared libraries on
your system, and instead ld tried to produce an executable program.
(possibly without also including the standard system libraries either)

I have no idea why strftime or __wcstok_ptr_ are required by
structmodule.o, but you surmise correctly that the next names listed are
functions in Python. If a shared module was produced, these symbols
would be found at runtime within the python binary instead of being a
link-time error.

Python can build without shared modules--see Modules/Setup.*. This
isn't used much anymore, as far as I know.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBduRUJd01MZaTXX0RAj6mAJ0ec1wLYaj2RvUGoOGP4EgQu+7pjACeJiwU
QDKj2lZj4ecXYRNoZ4S1LB4=
=ItJd
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top