Summary: | kdecore: -mimpure-text may be needed on Solaris w/ gcc 3.x and above | ||
---|---|---|---|
Product: | [I don't know] kde | Reporter: | Christopher Layne <clayne> |
Component: | general | Assignee: | Thiago Macieira <thiago> |
Status: | RESOLVED NOT A BUG | ||
Severity: | crash | CC: | clayne, thiago |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: |
Description
Christopher Layne
2004-08-14 17:53:44 UTC
Thiago, Opened (this one). 1. "-fPIC" is the real solution. 2. "-z defs" and "-mimpure-text" are the next in line. More information: List: kde-solaris Subject: Re: [kde-solaris] problems building 3.2.0 From: Stefan Teleman <steleman () nyc ! rr ! com> Date: 2004-02-07 5:45:21 Message-ID: <200402070045.21561.steleman () nyc ! rr ! com> [Download message RAW] You might want to check the Makefile as well, and if -z text is defined in there as well, replace it with -z defs. You might also have to do a gmake clean at the top of the khtml directory and then recompile/rebuild that entire directory from scratch. You probably want to remove all '-z text' linker arguments from all the Makefiles, and from all the *.la files (this -z text has most likely been written to *.la files as well). -z text used to be the old SVR4 linker argument for disallowing undefined symbols in shared libraries, but the SunOS linker takes -z defs for that purpose. find . -type f -name "Makefile" - print > ./MakefileList foreach i ( `cat ./MakefileList` ) echo "Processing $i ... " sed -e 's#-z text#-z defs#g' $i > /tmp/foo cp -fp /tmp/foo $i end Yes, editing libtool before running gmake is the right thing to do. The errors you are getting are not undefined symbols errors, they are text relocation errors. -z text causes fatal errors when text relocations remain in the shared object against non-writeable sections of the text segments. Using the SunOS linker is the right thing to do on SunOS. :-) Let me know. --Stefan ----- On Friday 06 February 2004 08:50, Rob Fisher wrote: > > in libtool, replace ' -z text' with ' -z defs'. > > Thanks for responding Stefan, though I found making this change did > not make any difference to my compilation problem. I still get the > unresolved symbol problems I had before. > > I edited the libtool script generated by configure, in the > kdelibs-3.2.0 directory before running gmake. Was that the right > thing to do? If it's a linker problem, does it matter that I'm > using Solaris's own ld rather than gnu ld? > > thanks > > > Rob -- Stefan Teleman 'Nobody Expects the Spanish Inquisition' steleman@nyc.rr.com -Monty Python -z defs nor -z text make any difference. -mimpure-text is the only thing I have found to get past these current linking issues on Solaris. > The errors you are getting are not undefined symbols errors, they are
> text relocation errors. -z text causes fatal errors when text
> relocations remain in the shared object against non-writeable
> sections of the text segments.
Do you know why there are relocations remaining against non-writeable sections of the text segments in the first place? Could there be a gcc argument to make it not generate code that causes those relocations?
Remember when I said that the visibility flag shouldn't be causing the build failure? Well, I think it does. Here's why: even though in the Solaris arch gcc is unable to tell the linker the visibility attribute for a symbol, it is generating code that is invalid. So, I recommend you edit kdelibs/kdecore/kdemacros.h and change KDE_NO_EXPORT to nothing. See if that fixes the problem. It does seem to me, however, that this is a gcc bug. AFAIK,
-fPIC
But that *is* happening. I verified with libtool in non-silent mode.
Everything in kdelibs/kdecore/network is compiled with -fPIC (it's automade anyways).
-cl
On Mon, Aug 16, 2004 at 10:57:16PM -0000, Thiago Macieira wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> You are on the CC list for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=87209
>
>
>
>
> ------- Additional Comments From thiago.macieira kdemail net 2004-08-17 00:57 -------
> > The errors you are getting are not undefined symbols errors, they are
> > text relocation errors. -z text causes fatal errors when text
> > relocations remain in the shared object against non-writeable
> > sections of the text segments.
>
> Do you know why there are relocations remaining against non-writeable sections of the text segments in the first place? Could there be a gcc argument to make it not generate code that causes those relocations?
Will try changing KDE_NO_EXPORT and report back. Guess what.. Undef'ing KDE_NO_EXPORT allows kdecore to link without -mimpure-text. So perhaps they changed something between 3.2.x and 3.4.x in regards to visibility? I'll check around... Compiler problem. Sorry, we can't fix it on our end. |