Problems building on SunOS
zack at rabi.phys.columbia.edu
Sun Sep 6 00:00:57 CEST 1998
On 05 Sep 1998 19:04:28 -0700, Brian Warner wrote:
>zack at rabi.phys.columbia.edu (Zack Weinberg) writes:
>> On Fri, 4 Sep 1998 16:26:44 -0400 (EDT), "Paul D. Smith" wrote:
>> >%% Brian Warner <warner at lothar.com> writes:
>> > bw> tiger.c, uses a long long multiply which, when compiled for a
>> > bw> sparc, requires a function from -lgcc called __muldi3. Because
>> > bw> tiger.c is compiled directly into a shared object, and because
>> > bw> libgcc.a is not shared, tiger (the shared object) doesn't get
>> > bw> __muldi3 included in it.
>> >Doh! _That's_ what caused that. I saw this too but didn't see any
>> >obvious reason and I didn't get around to finding the problem.
>> I don't have the source code in front of me, but this problem might go
>> away if you add -lgcc to the linker command line when building the
>> shared object. If you make the shared object with gcc -shared it
>> ought to do that automatically. (You may also need magic flags for
>> the linker.)
>I'm not sure how the flags get set up, but under solaris the -shared was
>already present and didn't seem to help. Adding -lgcc caused other problems:
>ld: fatal: relocations remain against allocatable but non-writable sections
>20:warner at snurfle%
This is telling you that libgcc was not compiled PIC. You definitely
don't want to take out the -z text; text relocations in shared
libraries subvert the whole purpose of shared libraries.
As to why that's so, you're using gcc 184.108.40.206 and I seem to remember
this being a bug that was fixed in egcs and/or gcc 2.8. You might
want to try one of them (I'd go with egcs myself).
More information about the Gnupg-devel