I do have the same problem: doing some search resulted in the following:
(the python faq):
3.36. relocations remain against allocatable but non-writable sections *
This linker error occurs on Solaris if you attempt to build an extension module which incorporates position-dependent (non-PIC) code. A common source of problems is that a static library (.a file), such as libreadline.a or libcrypto.a is linked with the extension module. The error specifically occurs when using gcc as the compiler, but /usr/ccs/bin/ld as the linker.
The following solutions and work-arounds are known:
1. Rebuild the libraries (libreadline, libcrypto) with -fPIC (-KPIC if using the system compiler). This is recommended; all object files in a shared library should be position-independent.
2. Statically link the extension module and its libraries into the Python interpreter, by editing Modules/Setup.
3. Use GNU ld instead of /usr/ccs/bin/ld; GNU ld will accept non-PIC code in shared libraries (and mark the section writable)
4. Pass -mimpure-text to GCC when linking the module. This will force gcc to not pass -z text to ld; in turn, ld will make all text sections writable.
Options 3 and 4 are not recommended, since the ability to share code across processes is lost.
So: does anyone know how to solve the problem, given this information?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, trying to build MySQL-python for solaris but these messages:
gcc -shared build/temp.solaris-2.8-sun4u-2.1/_mysql.o -L/opt4/local/mysql/lib -lmysqlclient -lz -o build/lib.solaris-2.8-sun4u-2.1/_mysql.so
Text relocation remains referenced
against symbol offset in file
<unknown> 0x968 /opt4/local/mysql/lib/libmysqlclient.a(libmysql.o)
<unknown> 0x96c /opt4/local/mysql/lib/libmysqlclient.a(libmysql.o)
<unknown> 0x970 /opt4/local/mysql/lib/libmysqlclient.a(libmysql.o)
<unknown> 0x974 /opt4/local/mysql/lib/libmysqlclient.a(libmysql.o)
<unknown> 0x978 /opt4/local/mysql/lib/libmysqlclient.a(libmysql.o)
<unknown> 0x97c /opt4/local/mysql/lib/libmysqlclient.a(libmysql.o)
<unknown> 0x980 /opt4/local/mysql/lib/libmysqlclient.a(libmysql.o)
...and so on and so forh for a couple of hundred lines...
Any suggestions?
I do have the same problem: doing some search resulted in the following:
(the python faq):
3.36. relocations remain against allocatable but non-writable sections *
This linker error occurs on Solaris if you attempt to build an extension module which incorporates position-dependent (non-PIC) code. A common source of problems is that a static library (.a file), such as libreadline.a or libcrypto.a is linked with the extension module. The error specifically occurs when using gcc as the compiler, but /usr/ccs/bin/ld as the linker.
The following solutions and work-arounds are known:
1. Rebuild the libraries (libreadline, libcrypto) with -fPIC (-KPIC if using the system compiler). This is recommended; all object files in a shared library should be position-independent.
2. Statically link the extension module and its libraries into the Python interpreter, by editing Modules/Setup.
3. Use GNU ld instead of /usr/ccs/bin/ld; GNU ld will accept non-PIC code in shared libraries (and mark the section writable)
4. Pass -mimpure-text to GCC when linking the module. This will force gcc to not pass -z text to ld; in turn, ld will make all text sections writable.
Options 3 and 4 are not recommended, since the ability to share code across processes is lost.
So: does anyone know how to solve the problem, given this information?