[Python-Dev] [droux@tuks.co.za: Our application doesn't work with Debian packaged Python]

Neil Schemenauer nas@arctrix.com
Tue, 16 Jan 2001 13:08:23 -0800


This message was on the debian-python list.  Does anyone know why
the patch is needed?

  Neil

----- Forwarded message from Danie Roux <droux@tuks.co.za> -----

Date: Tue, 16 Jan 2001 11:44:48 +0200
From: Danie Roux <droux@tuks.co.za>
Subject: Our application doesn't work with Debian packaged Python
To: Debian Python <debian-python@lists.debian.org>

Good they all,

Our program is an archiver for gnome that uses gnome-python with one
widget written in C.

I converted our program to autoconf and automake so anyone can (and please
do!) compile it and see what I mean.

Everything compiles fine. But when it runs it just throws a weird
exception.

The funny thing is, if I alien RedHat 6.2's python package, and install
that, it works! I need to change nothing else. Only the python package.

I then went and look at the source rpm. They have this patch in there:

--- Python-1.5.2/Python/importdl.c.global	Sat Jul 17 16:52:26 1999
+++ Python-1.5.2/Python/importdl.c	Sat Jul 17 16:53:19 1999
@@ -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);
+			       RTLD_LAZY | RTLD_GLOBAL);
+		handle = dlopen(pathname, RTLD_LAZY | RTLD_GLOBAL);
 #endif /* RTLD_NOW */
 		if (handle == NULL) {
 			PyErr_SetString(PyExc_ImportError, dlerror());

Sure enough this fixes my problem. The thing is that this means our
program only works on Redhat (and who ever patched python 1.5.2 with this).

So what can I do now? How can I get this patch into debian-python? How can
I change my program to not need the patch?

btw the program is garchiver, it will be hosted at sourceforge as soon as
they get back to me, in the mean time I will mail anyone a copy of the
sources.

-- 
Danie Roux *shuffle* Adore Unix


-- 
To UNSUBSCRIBE, email to debian-python-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


----- End forwarded message -----