DynaLoader.a: could not read symbols: Bad value - Can't build on vanilla Red Hat - modperl

This is a discussion on DynaLoader.a: could not read symbols: Bad value - Can't build on vanilla Red Hat - modperl ; Hello, We're running RedHat (x86_64-linux) and have Perl 5.8.8 and Apache 2.2.9 installed, (both from source). The Perl build says that my Linux is: 2.6.18-92.el5xen and /etc/issue says it is: Red Hat Enterprise Linux Server release 5.2 (Tikanga) When I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: DynaLoader.a: could not read symbols: Bad value - Can't build on vanilla Red Hat

  1. DynaLoader.a: could not read symbols: Bad value - Can't build on vanilla Red Hat

    Hello,

    We're running RedHat (x86_64-linux) and have Perl 5.8.8 and Apache 2.2.9
    installed, (both from source).

    The Perl build says that my Linux is: 2.6.18-92.el5xen
    and /etc/issue says it is: Red Hat Enterprise Linux Server release 5.2
    (Tikanga)

    When I try to install mod_perl 2.0.4 I keep getting the same error at
    the 'make' step.

    modperl_exports.lo -Wl,-E -L/usr/local/lib /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a -L/tmp/unisolve/perl/lib/5.8.8/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc
    \
    -o mod_perl.so
    /bin/ld: /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o):
    relocation R_X86_64_32 against `a local symbol' can not be used when making a
    shared object; recompile with -fPIC
    /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a: could
    not read symbols: Bad value
    collect2: ld returned 1 exit status
    make[1]: *** [mod_perl.so] Error 1
    make[1]: Leaving directory `/home/unisolve/mod_perl-2.0.4/src/modules/perl'
    make: *** [modperl_lib] Error 2


    The error above shows that I am using a local version of Perl, but I get the
    same error with the Perl I built in /usr/local/....

    Does anyone have any suggestions?

    Thanks in advance
    Regards

    Bianca
    --
    Unisolve Pty Ltd -
    Melbourne Australia


  2. Re: DynaLoader.a: could not read symbols: Bad value - Can't buildon vanilla Red Hat

    Bianca Taylor wrote:
    > /bin/ld: /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o):
    > relocation R_X86_64_32 against `a local symbol' can not be used when making a
    > shared object; recompile with -fPIC
    > /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a: could
    > not read symbols: Bad value
    > collect2: ld returned 1 exit status
    > make[1]: *** [mod_perl.so] Error 1
    > make[1]: Leaving directory `/home/unisolve/mod_perl-2.0.4/src/modules/perl'
    > make: *** [modperl_lib] Error 2


    Perl itself makes several bad calls w.r.t. CFLAGS, LDFLAGS, SHLDFLAGS etc,
    that are propagated also into config_heavy.pl. On several platforms I've
    noted that -fPIC is ignored, on others I've noted that specific flag values
    are dropped for the building of shared libs.

    It's a matter of working backwards from modperl's build into the config
    script of perl to determine where perl went wrong.


  3. Re: DynaLoader.a: could not read symbols: Bad value - Can't buildon vanilla Red Hat

    William A. Rowe, Jr. wrote:
    > Bianca Taylor wrote:
    >> /bin/ld:
    >> /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o):
    >> relocation R_X86_64_32 against `a local symbol' can not be used when
    >> making a shared object; recompile with -fPIC
    >> /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a:
    >> could not read symbols: Bad value
    >> collect2: ld returned 1 exit status
    >> make[1]: *** [mod_perl.so] Error 1
    >> make[1]: Leaving directory
    >> `/home/unisolve/mod_perl-2.0.4/src/modules/perl'
    >> make: *** [modperl_lib] Error 2

    >
    > Perl itself makes several bad calls w.r.t. CFLAGS, LDFLAGS, SHLDFLAGS etc,
    > that are propagated also into config_heavy.pl. On several platforms I've
    > noted that -fPIC is ignored, on others I've noted that specific flag values
    > are dropped for the building of shared libs.
    >
    > It's a matter of working backwards from modperl's build into the config
    > script of perl to determine where perl went wrong.
    >


    The solution should be as easy as recompiling perl with -fPIC. Here's a
    link to the list archives where this has been discussed in detail.

    http://www.gossamer-threads.com/list...D&sb=post_time


  4. Re: DynaLoader.a: could not read symbols: Bad value - Can't buildon vanilla Red Hat

    Fred Moyer wrote:
    > William A. Rowe, Jr. wrote:
    >> Bianca Taylor wrote:
    >>> /bin/ld:
    >>> /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o):
    >>> relocation R_X86_64_32 against `a local symbol' can not be used when
    >>> making a shared object; recompile with -fPIC
    >>> /tmp/unisolve/perl/lib/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a:
    >>> could not read symbols: Bad value
    >>> collect2: ld returned 1 exit status
    >>> make[1]: *** [mod_perl.so] Error 1
    >>> make[1]: Leaving directory
    >>> `/home/unisolve/mod_perl-2.0.4/src/modules/perl'
    >>> make: *** [modperl_lib] Error 2

    >>
    >> Perl itself makes several bad calls w.r.t. CFLAGS, LDFLAGS, SHLDFLAGS
    >> etc,
    >> that are propagated also into config_heavy.pl. On several platforms I've
    >> noted that -fPIC is ignored, on others I've noted that specific flag
    >> values
    >> are dropped for the building of shared libs.
    >>
    >> It's a matter of working backwards from modperl's build into the config
    >> script of perl to determine where perl went wrong.
    >>

    >
    > The solution should be as easy as recompiling perl with -fPIC. Here's a
    > link to the list archives where this has been discussed in detail.
    >
    > http://www.gossamer-threads.com/list...D&sb=post_time


    Of course, that's what it says above. My point is, I've had perl yank -fPIC
    from my demands on the build on PPC arch. Mighty kind of it, eh?


+ Reply to Thread