Subject: Re: py-qt3-sip on Solaris and ld: fatal: relocations remain against
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/16/2004 10:46:00
On Thu, 2 Dec 2004, Jeremy C. Reed wrote:

> Building py-qt3-sip under Solaris is failing with:
>
> Text relocation remains                         referenced
>     against symbol                  offset      in file
> PyEval_CallObjectWithKeywords       0x654       qtlib.o
> PyMethod_New                        0x5ac       qtlib.o
...
> ld: fatal: relocations remain against allocatable but non-writable
> sections

My work-around is:

-CONFIGURE_ARGS+=       LFLAGS_SHLIB=-shared
+#CONFIGURE_ARGS+=      LFLAGS_SHLIB=-shared
+# gcc3 uses -mimpure-text to not pass -assert pure-text to the linker
+# this may be needed on solaris using gcc
+CONFIGURE_ARGS+=       LFLAGS_SHLIB="-shared -mimpure-text"

I don't know if this is correct or what, but it did build and was packaged
fine.

Anyone have any suggestions on if using -mimpure-text is okay for Solaris?

Also, I assume this should only be done if using GCC. What is the best way
to only do this for GCC?

 Jeremy C. Reed

 	  	 	 open source, Unix, *BSD, Linux training
	  	 	 http://www.pugetsoundtechnology.com/