[Python-Dev] Python build trouble with the new gcc/binutils
Zack Weinberg
zack@codesourcery.com
Fri, 16 Aug 2002 12:51:15 -0700
On Fri, Aug 16, 2002 at 03:03:41PM -0400, Andrew Koenig wrote:
> However, when I write a little C program that just calls dlopen with the
> file in question:
>
> #include <stdio.h>
> void *dlopen(const char *, int);
>
> main()
> {
> void *handle = dlopen("/export/spurr1/homes1/ark/test-python/Python-2.2.1/build/lib.solaris-2.7-sun4u-2.2/struct.so", 2);
> printf ("Handle = %x\n", handle);
> }
>
> it quietly succeds and prints "Handle = 0"
Handle = 0 indicates a *failure*. Either try the test script I sent
you, or change your test program to read
#include <stdio.h>
#include <dlfcn.h>
main()
{
void *handle = dlopen("/export/spurr1/homes1/ark/test-python/"
"Python-2.2.1/build/lib.solaris-2.7-sun4u-2.2/"
"struct.so", 2);
printf ("Handle = %x\n", handle);
if (handle == 0)
printf("Error: %s\n", dlerror();
}
and try it again, or, better, both.
zw