1.5.2 broke IRIX module loading

Randall Hopper aa8vb at vislab.epa.gov
Wed Apr 14 11:01:16 EDT 1999


     I built and tried 1.5.2 this morning, and it failed to load a module
that worked fine on 1.5.1.  See below for the errors.

     This is a C library I don't have source for which has references to a
number of zeroed-out internal symbols which aren't used.  In this case (see
errors), "currstepc" is the exported C interface wrapper, and "currstep" is
the internal FORTRAN routine which has been zeroed-out.

     To convince Python to load this again, I found I had to reverse one of
the 1.5.1 changes to importdl.c (patch attached).  I believe this news post
describes the problem I'm running into:

          http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=289722207

Could we consider reversing this change to importdl.c in the Python dist?

Randall

-------------------------------------------------------------------------------

> python
Python 1.5.2 (#1, Apr 14 1999, 08:42:47) [C] on irix646-o32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Util
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "Util.py", line 2, in ?
    import Utilc
ImportError: 1380391:python-o32: rld: Fatal Error: unresolvable symbol in /home/rhh/work/libUtil.so: currstep

-------------------------------------------------------------------------------

> nm -Bo libUtil.so | grep currstep
libModels3.so: 5ffccda0 B currstep
libModels3.so: 5fe1e6c0 T currstep_
libModels3.so: 5fe1e880 T currstepc

-------------------------------------------------------------------------------

-------------- next part --------------
--- Python/ORIG/importdl.c	Wed Jan 27 12:53:10 1999
+++ Python/importdl.c	Wed Apr 14 10:41:40 1999
@@ -441,7 +441,7 @@
 #ifdef RTLD_NOW
 		/* RTLD_NOW: resolve externals now
 		   (i.e. core dump now if some are missing) */
-		void *handle = dlopen(pathname, RTLD_NOW);
+		void *handle = dlopen(pathname, RTLD_NOW | RTLD_GLOBAL);
 #else
 		void *handle;
 		if (Py_VerboseFlag)


More information about the Python-list mailing list