[kronolith] MCAL and Solaris problem

Mike Hardy mhardy@h3c.com
Tue, 8 Jan 2002 13:41:05 -0800 (PST)


On Tue, 8 Jan 2002, C. M. Rahman (jr.) wrote:

> I am on Sun Solaris 2.8 and getting this error everytime I try to compile
> MCAL. Can somebody help on this issue? I tryed on Solaris 2.7 as well. but
> no luck

Solaris...

> ld: fatal: relocations remain against allocatable but non-writable sections
> collect2: ld returned 1 exit status
> make: *** [libmcal.so] Error 1

...with relocation linkage problems

The only thing I remember about building .so's on Solaris was that it was
a PITA (pain in the butt)

You might try altering the makefile so that gcc uses a "-v" argument, it
will then print out the command line it calls the linker with. Take that
command line and start changing options on it until it works (I'm serious
- this worked for me)

I had to xterms up with one used for trying new link-lines, and the other
holding the ld manpage on Solaris playing with its dynamic-linking
arguments, and got it right in around 10 minutes. It wasn't fun, but it
did work.

Of course, there's only so many arguments to play with, if none of them
work, its a deeper problem...

Googling for the error message before spending any time is also a good way
to find the linker line (or whatever problem it is if its not linkage)

Hope this helps somewhat-
-Mike