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

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

am 10.03.2011 11:52:11 von Gregory Gabriel

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

am 10.03.2011 13:44:35 von Gregory Gabriel

As a follow-up on my own problem

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

Compiler:
cc=3D'cc', ccflags =3D'-D_REENTRANT -m64 -KPIC -xarch=3Dgeneric64
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -DPERL_USE_SAFE_PUTENV',
optimize=3D'-O',
cppflags=3D'-D_REENTRANT -m64 -KPIC'
ccversion=3D'Sun C 5.10 SunOS_i386 2009/06/03', gccversion=3D'', gccosa=
ndvers=3D''
intsize=3D4, longsize=3D8, ptrsize=3D8, doublesize=3D8, byteorder=3D123=
45678
d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsize=
=3D16
ivtype=3D'long', ivsize=3D8, nvtype=3D'double', nvsize=3D8, Off_t=3D'of=
f_t',
lseeksize=3D8
alignbytes=3D8, prototype=3Ddefine
Linker and Libraries:
ld=3D'cc', ldflags =3D'-KPIC -xarch=3Dgeneric64 '
libpth=3D/usr/lib/amd64 /usr/ccs/lib/amd64
/opt/sunstudio/prod/lib/amd64 /lib/amd64
libs=3D-lsocket -lnsl -ldl -lm -lpthread -lc
perllibs=3D-lsocket -lnsl -ldl -lm -lpthread -lc
libc=3D/lib/libc.so, so=3Dso, useshrplib=3Dfalse, libperl=3Dlibperl.a
gnulibc_version=3D''
Dynamic Linking:
dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D'-KPIC=
'
cccdlflags=3D'-KPIC', lddlflags=3D'-G -m64 -KPIC'



On Thu, Mar 10, 2011 at 11:52 AM, Gregory Gabriel 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
>
> =A0Compiler:
> =A0 =A0cc=3D'cc', ccflags =3D'-D_REENTRANT -m64 -xarch=3Dgeneric64
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -DPERL_USE_SAFE_PUTENV',
> =A0 =A0optimize=3D'-O',
> =A0 =A0cppflags=3D'-D_REENTRANT -m64'
> =A0 =A0ccversion=3D'Sun C 5.10 SunOS_i386 2009/06/03', gccversion=3D'', g=
ccosandvers=3D''
> =A0 =A0intsize=3D4, longsize=3D8, ptrsize=3D8, doublesize=3D8, byteorder=
=3D12345678
> =A0 =A0d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdbl=
size=3D16
> =A0 =A0ivtype=3D'long', ivsize=3D8, nvtype=3D'double', nvsize=3D8, Off_t=
=3D'off_t',
> lseeksize=3D8
> =A0 =A0alignbytes=3D8, prototype=3Ddefine
> =A0Linker and Libraries:
> =A0 =A0ld=3D'cc', ldflags =3D' -xarch=3Dgeneric64 '
> =A0 =A0libpth=3D/usr/lib/amd64 /usr/ccs/lib/amd64
> /opt/sunstudio/prod/lib/amd64 /lib/amd64
> =A0 =A0libs=3D-lsocket -lnsl -ldl -lm -lpthread -lc
> =A0 =A0perllibs=3D-lsocket -lnsl -ldl -lm -lpthread -lc
> =A0 =A0libc=3D/lib/libc.so, so=3Dso, useshrplib=3Dfalse, libperl=3Dlibper=
l.a
> =A0 =A0gnulibc_version=3D''
> =A0Dynamic Linking:
> =A0 =A0dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D'=
'
> =A0 =A0cccdlflags=3D'-KPIC', lddlflags=3D'-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
>