Re: compile problems
[prev]
[thread]
[next]
[Date index for 2004/12/20]
Found a solution worth writing about. I went through the perl
configuration interactively, specifying the following non-defaults:
- compile perl as shared
- use gcc, not cc, as the compiler
- provide -fPIC to the compiler
After this, everything worked like a charm!
On Dec 17, 2004, at 2:05 AM, Matthew Berk wrote:
> Apologies if I'm posting in the wrong place, but here goes:
>
> AMD Opteron, Suse 9.1, perl 5.8.6, Apache 2.0.52, mod_perl 1.99_17
>
> Apache compiles fine. When compiling mod_perl, I execute
> "/usr/local/bin/perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs"
> and then make, and get:
>
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-
> linux/bin/ld:
> /usr/local/lib/perl5/5.8.6/x86_64-linux/auto/DynaLoader/
> DynaLoader.a(DynaLoader.o): relocation R_X86_64_32 can not be used
> when making a shared object; recompile with -fPIC
> /usr/local/lib/perl5/5.8.6/x86_64-linux/auto/DynaLoader/DynaLoader.a:
> could not read symbols: Bad value
> collect2: ld returned 1 exit status
>
> A perl -V reveals:
>
> Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
> Platform:
> osname=linux, osvers=2.6.5-7.95-smp, archname=x86_64-linux
> uname='linux local03 2.6.5-7.95-smp #1 smp thu jul 1 15:23:45 utc
> 2004 x86_64 x86_64 x86_64 gnulinux '
> config_args='-des -Dcccdlflags=-fPIC'
> hint=previous, useposix=true, d_sigaction=define
> usethreads=undef use5005threads=undef useithreads=undef
> usemultiplicity=undef
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=define use64bitall=define uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-O2',
> cppflags='-fno-strict-aliasing -pipe -I/usr/local/include
> -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
> ccversion='', gccversion='3.3.3 (SuSE Linux)', 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 =' -L/usr/local/lib'
> libpth=/usr/local/lib /lib /usr/lib
> libs=-lnsl -ldl -lm -lcrypt -lutil -lc
> perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
> libc=, so=so, useshrplib=false, libperl=libperl.a
> gnulibc_version='2.3.3'
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
> cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
> Built under linux
> Compiled at Dec 16 2004 22:56:14
> @INC:
> /usr/local/lib/perl5/5.8.6/x86_64-linux
> /usr/local/lib/perl5/5.8.6
> /usr/local/lib/perl5/site_perl/5.8.6/x86_64-linux
> /usr/local/lib/perl5/site_perl/5.8.6
> /usr/local/lib/perl5/site_perl
> .
>
> Any thoughts?
>
> Thanks,
>
> Matthew
>
>
>
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html