This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python expects __eprintf on Solaris
Type: Stage:
Components: Build Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: gpk, jwkaltz, loewis
Priority: normal Keywords:

Created on 2002-02-23 03:58 by gpk, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (4)
msg9356 - (view) Author: Greg Kochanski (gpk) Date: 2002-02-23 03:58
ftp_up.py
Traceback (most recent call last):
  File "/usr/local/bin/ftp_up.py", line 10, in ?
    import ftplib
  File "/usr/local/lib/python2.1/ftplib.py", line 46,
in ?
    import socket
  File "/usr/local/lib/python2.1/socket.py", line 41,
in ?
    from _socket import *
ImportError: ld.so.1: /usr/local/bin/python: fatal:
relocation error: file
/usr/local/lib/python2.1/lib-dynload/_socket.so: symbol
__eprintf: referenced symbol not found


On Solaris 2.6 (current patches), Python 2.1.2
out-of-the-box install.

nm *.a | grep eprintf   shows nothing in /lib and
/usr/lib.  Presumably, the build system is expecting
that function to exist, when it really doesn't.

Same problem on Solaris 2.7:

/usr/local/bin/python
Python 2.1.2 (#1, Jan 23 2002, 10:44:53) [C] on sunos5
Type "copyright", "credits" or "license" for more
information.
>>> import _socket
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: ld.so.1: /usr/local/bin/python: fatal:
relocation error: file
/usr/local/lib/python2.1/lib-dynload/_socket.so: symbol
__eprintf: referenced symbol not found
>>> 
msg9357 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-02-23 23:09
Logged In: YES 
user_id=21627

This is not a bug in Python, but in your installation.
Python does not, in itself, ever call __eprintf. Instead,
certain versions of gcc emit references to this symbol when
expanding the assert macro. In turn, you need to link such
object files with libgcc.a.

Are you certain that you have build all relevant objects
with the system compiler (including, for example, any
OpenSSL installation)?
msg9358 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-03-27 16:49
Logged In: YES 
user_id=21627

Closed for lack of feedback.
msg9359 - (view) Author: Wolfgang Kaltz (jwkaltz) Date: 2002-05-15 16:35
Logged In: YES 
user_id=387111

> Are you certain that you have build all relevant objects
with the system compiler (including, for example, any
OpenSSL installation)?

I want to add a comment on that, because this was the only
useful suggestion I found on the Internet to help me solve a
similar problem. 
The issue is, under Solaris, if you have built gcc BEFORE
installing gnu binutils, be sure to recompile gcc entirely
afterwards, to that gcc itself is built with gnu ld.
Otherwise you will get strange effects like your "referenced
symbol not found".
To recompile gcc use the configure parameters --with-gnu-ld
and --with-gnu-as - otherwise it may use the Sun linker
anyway and your problem will remain.
History
Date User Action Args
2022-04-10 16:05:01adminsetgithub: 36142
2002-02-23 03:58:54gpkcreate