Re: DynaLoader.a: could not read symbols: Bad value - Can't build on vanilla Red Hat
Hello again,
....[color=blue][color=green]
>> 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.
>>
>>
>>[url]http://www.gossamer-threads.com/lists/engine?list=modperl;do=search_results[/url]
>>;search_forum=forum_8;search_string=fpic;search_type=AND&sb=post_time[/color]
>
>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?[/color]
We attempted to compile perl with:
ccflags='-fPIC' sh Configure -de
(yes, make clean first)
but unfortunately to no avail. Like you said, Perl didn't seem to care -fPIC
is not used when Perl is built.
Next, we changed config.sh from -fpic to -fPIC and did the make again.
In this case Perl did use -fPIC but we get the same error, mod_perl is not
happy with the DynaLoader.
Also tried to clean everything out with 'make cleandist' first and
run ./Configure with -Doptimize='-g' to really make sure the -fPIC is passed
in.
I definitely see the -fPIC option, for example:
"...cc -c -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -g -DVERSION=\"0.94\" -DXS_VERSION=\"0.94\" -fPIC "-I../../.."
shared.c..."
Everything seems happy until the make step in mod_perl, where I still get:
...lib/perl5/5.8.8/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc
\ -o mod_perl.so
/bin/ld:
/usr/local/lib/perl5/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a(DynaLoa
der.o): relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
/usr/local/lib/perl5/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a: could
not read symbols: Bad value
collect2: ld returned 1 exit status...
So at this point, I am confident that I compile Perl with -fPIC. I read all
the ducumentation you pointed me to and that I could find, but it keeps
coming back to the same error.
Thanks again
Bianca
--
Unisolve Pty Ltd -
Melbourne Australia
Re: DynaLoader.a: could not read symbols: Bad value - Can't buildon vanilla Red Hat
Bianca Taylor wrote:[color=blue]
>
> So at this point, I am confident that I compile Perl with -fPIC. I read all
> the ducumentation you pointed me to and that I could find, but it keeps
> coming back to the same error.[/color]
You aren't... please review your shared cc flags from perl. The flag you
looked at was not a shlib cflag, but a program cflag.
Re: DynaLoader.a: could not read symbols: Bad value - Can't build on vanilla Red Hat
[color=blue]
> Bianca Taylor wrote:[color=green]
> > So at this point, I am confident that I compile Perl with -fPIC. I read
> > all the ducumentation you pointed me to and that I could find, but it
> > keeps coming back to the same error.[/color]
>
> On Wednesday 17 September 2008 12:08, William A. Rowe, Jr. wrote:
> You aren't... please review your shared cc flags from perl. The flag you
> looked at was not a shlib cflag, but a program cflag.[/color]
Here the whole snip for attrs.c whilst 'make'
"cc -c -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -g -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" -fPIC "-I../.."
attrs.c
Running Mkbootstrap for attrs ()
chmod 644 attrs.bs
rm -f ../../lib/auto/attrs/attrs.so
cc -shared -L/usr/local/lib attrs.o -o ../../lib/auto/attrs/attrs.so \
\
chmod 755 ../../lib/auto/attrs/attrs.so
cp attrs.bs ../../lib/auto/attrs/attrs.bs
chmod 644 ../../lib/auto/attrs/attrs.bs
make[1]: Leaving directory `/home/unisolve/perl-5.8.8/ext/attrs' "
ok, so how do I do it?
where do I go wrong?
Thanks again
Re: DynaLoader.a: could not read symbols: Bad value - Can't build on vanilla Red Hat
On Wednesday 17 September 2008 12:08, you wrote:[color=blue]
> Bianca Taylor wrote:[color=green]
> > So at this point, I am confident that I compile Perl with -fPIC. I read
> > all the ducumentation you pointed me to and that I could find, but it
> > keeps coming back to the same error.[/color]
>
> You aren't... please review your shared cc flags from perl. The flag you
> looked at was not a shlib cflag, but a program cflag.[/color]
Ok I see now what you mean.
I added -fPIC to the definitions of ccflags and cppflags in config.sh and now
I can successfully build mod_perl.
Since the makefile is being build incorrectly by the Perl installation
process, who can I report this bug to?
Kind regards
Bianca
--
Unisolve Pty Ltd -
Melbourne Australia