[Zope-Perl] Python 1.5.2 or Pythnon 1.6a2(?)

Gisle Aas gisle@ActiveState.com
04 Aug 2000 09:04:55 +0200


Scott Langley <langles@nwlink.com> writes:

> Before I try to build this, could you clarify one point for me?

Sure.

> The patches/README says the python-dynload-global patch is for Python 
> 1.6a2(?), while the main README says you've tested this with Python 
> 1.5.2. which needs the Distutils package.

Correct.  I started out doing development with CVS HEAD python, but
got into trouble when I tried to run Zope with it, so I switched back
to py152.  The python-dynload-global was generated in the CVS HEAD
period.

> Does this mean, to get it to work with Python 1.6a2, you need the 
> python-dynload-global patch, but don't need to install the Distutils 
> package?

Correct.  I have not tried a build with CVS HEAD python for a while,
so things might have changed.  It looks like Distutils change a lot
all the time.

> Likewise, while Python 1.5.2 needs the Distutils package, it doesn't 
> need the python-dynload-global patch?

It need both, but if you start with the a1 zope-perl-dist you need to
manually backport the python-dynload-global patch.  I'll include the
following 1.5.2-version of the patch with the next release.

--- Python-1.5.2/Python/importdl.c.dist	Wed Jan 27 18:53:10 1999
+++ Python-1.5.2/Python/importdl.c	Fri Aug  4 08:48:46 2000
@@ -441,13 +441,13 @@
 #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)
 			printf("dlopen(\"%s\", %d);\n", pathname,
 			       RTLD_LAZY);
-		handle = dlopen(pathname, RTLD_LAZY);
+		handle = dlopen(pathname, RTLD_LAZY | RTLD_GLOBAL);
 #endif /* RTLD_NOW */
 		if (handle == NULL) {
 			PyErr_SetString(PyExc_ImportError, dlerror());

Thanks for you feedback!

Regards,
Gisle