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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexander Landgraf

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

    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_FromUnsi gnedLong 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
  • Jeff Epler

    #2
    Re: Python 2.3.4 under AT&T MP RAS SVR4: ld: Symbol referencingerro rs.

    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)

    iD8DBQFBduRUJd0 1MZaTXX0RAj6mAJ 0ec1wLYaj2RvUGo OGP4EgQu+7pjACe JiwU
    QDKj2lZj4ecXYRN oZ4S1LB4=
    =ItJd
    -----END PGP SIGNATURE-----

    Comment

    Working...