[Python-Dev] build problems under Solaris

Martin von Loewis loewis@informatik.hu-berlin.de
Fri, 3 Nov 2000 19:51:49 +0100 (MET)


>  Text relocation remains                         referenced
>      against symbol                  offset      in file
[...]

> I have no idea what's going on here.  I've updated the bug report,
> and I am definitely -1 on "gcc -shared" for GCC on Solaris!  Unless,
> of course, there are other linker options that make it work right...

That happens only when using the system linker (/usr/ccs/bin/ld). The
GNU linker won't complain, and the resulting executables will run
fine.

To make the system linker happy, you also need to compile the modules
with -fPIC - which, according to Sun, we should have done all the time
when building shared libraries. The linker complains about relocations
in the text segment, which shouldn't be there - shared libraries
should be position independent.

Alternatively, you can use 'gcc -shared -mimpure-text'; that does not
request that remaining relocations cause errors.

Regards,
Martin