GNU ld (gcc >=2.x.x) does handle shared libraries on SunOS 4.1(3?).
> Would the people who have these problems be so kind to try out the
> following (yes *unofficial*) patch to configure and Python/import.c?
> It adds a test for the dlopen() function and turns on use of shared
> libraries only if that exists as well. Let me know if it works!
I'm not sure what those complaints might be, but I did find that import.c
broke between 1.0.0beta and the official release. (See below the offending
code). I thought that
#ifndef RTLD_NOW
#define RTLD_NOW 2
#endif
was a nice, undocumented (at least in <dlfcn.h>) feature of 4.1.3 dlopen().
The problem is, it simply does not work ("dlopen: invalid mode") in my
installation (sparc10, SunOs 4.1.3). The old RTLD_LAZY (1) works like a charm.
diff -c Python/import.c~ Python/import.c
*** Python/import.c~ Wed Jan 12 10:53:19 1994
--- Python/import.c Tue Feb 1 12:09:05 1994
***************
*** 308,314 ****
{
/* RTLD_NOW: resolve externals now
(i.e. core dump now if some are missing) */
! void *handle = dlopen(namebuf, RTLD_NOW);
if (handle == NULL) {
err_setstr(ImportError, dlerror());
return NULL;
--- 308,315 ----
{
/* RTLD_NOW: resolve externals now
(i.e. core dump now if some are missing) */
! /*JMP void *handle = dlopen(namebuf, RTLD_NOW); */
! void *handle = dlopen(namebuf, RTLD_LAZY);
if (handle == NULL) {
err_setstr(ImportError, dlerror());
return NULL;