Hi Fred Thanks for the answer. getting correct -fPIC is probably the solution, but how?
On perl 5.10.0 it turned up under config flags, but here it does not, but under cccdlflags in dynamic linking? There is probably some parsing in the Configure script that rearrange it. platform is CentOS 5.2 (latest patches) Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=linux, osvers=2.6.18-164.9.1.el5, archname=x86_64-linux-thread-multi uname='linux mortenb5.secana.local 2.6.18-164.9.1.el5 #1 smp tue dec 15 20:57:57 est 2009 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -A ccflags=-DPERL_USE_SAFE_PUTENV -Dusethreads -Dprefix=/opt/perl -Dinstallprefix=/opt/perl' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-46)', 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 =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector' -----Original Message----- From: Fred Moyer [mailto:f...@redhotpenguin.com] Sent: 11. januar 2010 22:29 To: Morten Bjørnsvik Cc: mod_perl list Subject: Re: unable to compile perl under perl 5.10.1 Have you verified perl was actually compiled with fpic? perl -V On Mon, Jan 11, 2010 at 7:23 AM, Morten Bjørnsvik <morten.bjorns...@experian-da.no> wrote: > Hi all > I'm unable to compile mod_perl-2.0.x from svn(trunk 2.0.5-dev) or cpan(2.0.4) > on perl 5.10.1, do anyone have some > black belt options that make it works, I believed the -fPIC now is embedded > in the -Dusethreads, because > I see it appear lots of places in the perl compile output > > I've tried compiling perl 5.10.1 with the following options > > ./Configure -des -A ccflags="-O2 -DPERL_USE_SAFE_PUTENV -fPIC" -Dusethreads > -Duse64bitall \ > -Dprefix=/opt/perl -Dinstallprefix=/opt/perl > > ./Configure -des -A ccflags=-DPERL_USE_SAFE_PUTENV -Accflags="-fPIC" > -Dusethreads \ > -Duse64bitall -Dprefix=/opt/perl -Dinstallprefix=/opt/perl > > ./Configure -des -A -Dusethreads -Duse64bitall -Dinstallprefix=/opt/perl > > perl always compiles and seem to work fine with other modules. > > Mod_perl2.0 build: > Both cpan and and the svn checkout version, shows the same error: > build cmd: cd '/usr/tmp/cpan_extract/mod_perl-2.0'; /opt/perl/bin/perl > Makefile.PL MP_APXS=/opt/apache/bin/apxs > > cc -shared -O2 -L/usr/local/lib -fstack-protector \ > \ > mod_perl.lo modperl_interp.lo modperl_tipool.lo modperl_log.lo > modperl_config.lo modperl_cmd.lo modperl_options.lo modperl_callback.lo > modperl_handler.lo modperl_gtop.lo modperl_util.lo modperl_io.lo > modperl_io_apache.lo modperl_filter.lo modperl_bucket.lo modperl_mgv.lo > modperl_pcw.lo modperl_global.lo modperl_env.lo modperl_cgi.lo > modperl_perl.lo modperl_perl_global.lo modperl_perl_pp.lo modperl_sys.lo > modperl_module.lo modperl_svptr_table.lo modperl_const.lo > modperl_constants.lo modperl_apache_compat.lo modperl_error.lo > modperl_debug.lo modperl_common_util.lo modperl_common_log.lo > modperl_hooks.lo modperl_directives.lo modperl_flags.lo modperl_xsinit.lo > modperl_exports.lo -Wl,-E -fstack-protector -L/usr/local/lib > -L/opt/perl/lib/5.10.1/x86_64-linux-thread-multi/CORE -lperl -lnsl -ldl -lm > -lcrypt -lutil -lpthread -lc \ > -o mod_perl.so > /usr/bin/ld: > /opt/perl/lib/5.10.1/x86_64-linux-thread-multi/CORE/libperl.a(op.o): > relocation R_X86_64_32 against `a local symbol' can not be used when making a > shared object; recompile with -fPIC > /opt/perl/lib/5.10.1/x86_64-linux-thread-multi/CORE/libperl.a: could not read > symbols: Bad value > collect2: ld returned 1 exit status > make[1]: *** [mod_perl.so] Error 1 > make[1]: Leaving directory > `/var/tmp/cpan_extract/mod_perl-2.0/src/modules/perl' > make: *** [modperl_lib] Error 2 > > > Any ideas greatly appreciated. > > Thanks > ---------------------------------------------------------------- > Morten Bjørnsvik, Experian Decision Analytics AS, Oslo, Norway > ---------------------------------------------------------------- > > >