You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gregory Gabriel <sa...@gmail.com> on 2011/03/10 11:52:11 UTC

mod_perl 2.0.5/httpd-2.2.17 on Solaris 10: fatal relocation error

Hi,

Does anyone have experience with this? I'm trying to build mod_perl
2.0.5 on Solaris 10x86_64 with SunStudio 12u1. Perl 5.12.2 is custom
build. Whenever I try to start httpd I get this error


httpd: Syntax error on line 412 of /opt/httpd-2.2.17/conf/httpd.conf:
Syntax error on line 1 of /opt/httpd-2.2.17/conf/rt3.conf: Cannot load
/opt/httpd-2.2.17/modules/mod_perl.so into server: ld.so.1: httpd:
fatal: relocation error: R_AMD64_32: file
/opt/httpd-2.2.17/modules/mod_perl.so: symbol PL_mod_latin1_uc: value
0xfffffd7ffda48b84 does not fit

This has something to do with position independent code. Here's the
perl -V output

  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -m64 -xarch=generic64
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV',
    optimize='-O',
    cppflags='-D_REENTRANT -m64'
    ccversion='Sun C 5.10 SunOS_i386 2009/06/03', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -xarch=generic64 '
    libpth=/usr/lib/amd64 /usr/ccs/lib/amd64
/opt/sunstudio/prod/lib/amd64 /lib/amd64
    libs=-lsocket -lnsl -ldl -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -m64'

I'm a bit worried about that -KPIC not appearing in the cflags/ldflags
but I'm not versed enough in this to see the light at the moment.

Any help would be appreciated

Gregory

Re: mod_perl 2.0.5/httpd-2.2.17 on Solaris 10: fatal relocation error

Posted by Gregory Gabriel <sa...@gmail.com>.
As a follow-up on my own problem

recompiling perl from scratch with -KPIC resolved the issue -
apologies for the list pollution

 Compiler:
    cc='cc', ccflags ='-D_REENTRANT -m64 -KPIC -xarch=generic64
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV',
    optimize='-O',
    cppflags='-D_REENTRANT -m64 -KPIC'
    ccversion='Sun C 5.10 SunOS_i386 2009/06/03', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-KPIC -xarch=generic64 '
    libpth=/usr/lib/amd64 /usr/ccs/lib/amd64
/opt/sunstudio/prod/lib/amd64 /lib/amd64
    libs=-lsocket -lnsl -ldl -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-KPIC'
    cccdlflags='-KPIC', lddlflags='-G -m64 -KPIC'



On Thu, Mar 10, 2011 at 11:52 AM, Gregory Gabriel <sa...@gmail.com> wrote:
> Hi,
>
> Does anyone have experience with this? I'm trying to build mod_perl
> 2.0.5 on Solaris 10x86_64 with SunStudio 12u1. Perl 5.12.2 is custom
> build. Whenever I try to start httpd I get this error
>
>
> httpd: Syntax error on line 412 of /opt/httpd-2.2.17/conf/httpd.conf:
> Syntax error on line 1 of /opt/httpd-2.2.17/conf/rt3.conf: Cannot load
> /opt/httpd-2.2.17/modules/mod_perl.so into server: ld.so.1: httpd:
> fatal: relocation error: R_AMD64_32: file
> /opt/httpd-2.2.17/modules/mod_perl.so: symbol PL_mod_latin1_uc: value
> 0xfffffd7ffda48b84 does not fit
>
> This has something to do with position independent code. Here's the
> perl -V output
>
>  Compiler:
>    cc='cc', ccflags ='-D_REENTRANT -m64 -xarch=generic64
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV',
>    optimize='-O',
>    cppflags='-D_REENTRANT -m64'
>    ccversion='Sun C 5.10 SunOS_i386 2009/06/03', gccversion='', gccosandvers=''
>    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
>    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
>    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=8
>    alignbytes=8, prototype=define
>  Linker and Libraries:
>    ld='cc', ldflags =' -xarch=generic64 '
>    libpth=/usr/lib/amd64 /usr/ccs/lib/amd64
> /opt/sunstudio/prod/lib/amd64 /lib/amd64
>    libs=-lsocket -lnsl -ldl -lm -lpthread -lc
>    perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
>    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
>    gnulibc_version=''
>  Dynamic Linking:
>    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
>    cccdlflags='-KPIC', lddlflags='-G -m64'
>
> I'm a bit worried about that -KPIC not appearing in the cflags/ldflags
> but I'm not versed enough in this to see the light at the moment.
>
> Any help would be appreciated
>
> Gregory
>