public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* compilation bug on solaris with perl
@ 2004-09-03  3:32 Edward Peschko
  2004-09-03 19:13 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Edward Peschko @ 2004-09-03  3:32 UTC (permalink / raw)
  To: bug-binutils; +Cc: gcc

hey all,

I think that there is a bug with either gcc or binutils in compiling perl on solaris with
-m64.

uname: SunOS mdssdr01 5.8 Generic_108528-29 sun4u sparc
binutils: GNU ld version 2.14 20030612

gcc: Configured with: /opt/tools/mdss/test/2.8/tools//gcc-3.4.1/configure --prefix=/opt/tools/mdss/test/2.8/ --with-as=/opt/tools/install/bin/as --with-ld=/opt/tools/install/bin/ld --with-libiconv-prefix=/opt/tools/mdss/test/2.8/lib --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --with-local-prefix=/opt/tools/mdss/test/2.8/
Thread model: posix
gcc version 3.4.1

Process:

Compile gcc, then compile perl-5.8.5 with 'configure -Doptimize='-m64 -O3', -Duse64bitint'

Error:

Can't load 'lib/auto/File/Glob/Glob.so' for module File::Glob: ld.so.1: ./perl: fatal: relocation error: R_SPARC_WDISP30: file lib/auto/File/Glob/Glob.so: symbol _exit: value 0x6075ef31 does not fit at lib/XSLoader.pm line 68.
     at lib/File/Glob.pm line 96

If I get rid of the -m64, everything works fine...

I'm assuming that this is a gcc bug since perl works transparently with use64bitint,
but I could be wrong. Let me know if its perl, and I'll post it to perl-porters.

Ed
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compilation bug on solaris with perl
  2004-09-03  3:32 compilation bug on solaris with perl Edward Peschko
@ 2004-09-03 19:13 ` Richard Henderson
  2004-09-03 23:15   ` Edward Peschko
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2004-09-03 19:13 UTC (permalink / raw)
  To: Edward Peschko; +Cc: bug-binutils, gcc

On Thu, Sep 02, 2004 at 08:32:34PM -0700, Edward Peschko wrote:
> relocation error: R_SPARC_WDISP30: file lib/auto/File/Glob/Glob.so:
> symbol _exit: value 0x6075ef31 does not fit at lib/XSLoader.pm line 68.

You failed to compile with -fpic/-fPIC.


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compilation bug on solaris with perl
  2004-09-03 19:13 ` Richard Henderson
@ 2004-09-03 23:15   ` Edward Peschko
  2004-09-03 23:23     ` Richard Henderson
  2004-09-03 23:27     ` Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Edward Peschko @ 2004-09-03 23:15 UTC (permalink / raw)
  To: Richard Henderson, gcc

On Fri, Sep 03, 2004 at 12:13:11PM -0700, Richard Henderson wrote:
> On Thu, Sep 02, 2004 at 08:32:34PM -0700, Edward Peschko wrote:
> > relocation error: R_SPARC_WDISP30: file lib/auto/File/Glob/Glob.so:
> > symbol _exit: value 0x6075ef31 does not fit at lib/XSLoader.pm line 68.
> 
> You failed to compile with -fpic/-fPIC.
> 
> 
> r~

just curious:

	1) what made that particular solution come to mind? why does this not 
           occur when 32bit mode is invoked?

        2) should this be something that is always bundled together w/-m64? if so,
           at the perl config level or the gcc level?

Ed

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compilation bug on solaris with perl
  2004-09-03 23:15   ` Edward Peschko
@ 2004-09-03 23:23     ` Richard Henderson
  2004-09-03 23:27     ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2004-09-03 23:23 UTC (permalink / raw)
  To: Edward Peschko; +Cc: gcc

On Fri, Sep 03, 2004 at 04:08:07PM -0700, Edward Peschko wrote:
> 	1) what made that particular solution come to mind? why does this not 
>            occur when 32bit mode is invoked?

Shared libraries linked via the gcc driver reference libgcc_s.so.1,
which would mean that they would not have unresolved symbols that
the linker would try to resolve from the main application.

I have no idea why 32-bit code would not act the same way.  I can
only guess that the Makefile generated is actually very different.


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: compilation bug on solaris with perl
  2004-09-03 23:15   ` Edward Peschko
  2004-09-03 23:23     ` Richard Henderson
@ 2004-09-03 23:27     ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2004-09-03 23:27 UTC (permalink / raw)
  To: Edward Peschko; +Cc: gcc

On Fri, Sep 03, 2004 at 04:08:07PM -0700, Edward Peschko wrote:
> On Fri, Sep 03, 2004 at 12:13:11PM -0700, Richard Henderson wrote:
> > On Thu, Sep 02, 2004 at 08:32:34PM -0700, Edward Peschko wrote:
> > > relocation error: R_SPARC_WDISP30: file lib/auto/File/Glob/Glob.so:
> > > symbol _exit: value 0x6075ef31 does not fit at lib/XSLoader.pm line 68.
> > 
> > You failed to compile with -fpic/-fPIC.
> > 
> > 
> > r~
> 
> just curious:
> 
> 	1) what made that particular solution come to mind? why does this not 
>            occur when 32bit mode is invoked?

Grr, ignore that last response.  Unless you're interested in the answer
to the above question wrt the *second* problem you posted.  ;-P

R_SPARC_WDISP30 is a direct call relocation.  If you'd used either pic
option the compiler would have generated R_SPARC_WPLT30.

My answer wrt why this doesn't happen for 32-bit mode still applies.

>         2) should this be something that is always bundled together w/-m64?
>	if so, at the perl config level or the gcc level?

Perl.


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-03 23:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-03  3:32 compilation bug on solaris with perl Edward Peschko
2004-09-03 19:13 ` Richard Henderson
2004-09-03 23:15   ` Edward Peschko
2004-09-03 23:23     ` Richard Henderson
2004-09-03 23:27     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).