[mp2][configure/make]

[mp2][configure/make]

am 27.08.2008 10:19:28 von Ebner.EJ.Johannes

1. Problem Description:
=20
I cannot compile mod_perl for Apache2. There seem to be two issues =
with the Configure.PL/make-process. Configure runs through without an =
error but with a warning that header files have been found in an =
unexpected directory (see warning message below) although I have =
supplied the MP_AP_PREFIX specifying the correct path (see 2.) ):

************* WARNING *************

Apache headers found in unexpected location: ``/usr/local/include'', =
suggestions:
*) Remove via ``rpm -e apache''
*) Remove by hand
*) Complain to your os vendor about their poor layout choice
*) Complain to your sysadmin about their poor layout choice


************* WARNING *************


Furthermore, make stops with the following error:


------------- MAKE TRACE ----------

-c modperl_xsinit.c && mv modperl_xsinit.o modperl_xsinit.lo
cc -I/opt/mod_perl-2.0.4/src/modules/perl -I/opt/mod_perl-2.0.4/xs =
-I/usr/local/apache2/include -I/usr/local/apache2/include =
-I/usr/local/apache2/include -fno-strict-aliasing -pipe =
-I/usr/local/include -I/opt/perl/lib/5.10.0/x86_64-linux/CORE -DMOD_PERL =
-DLINUX=3D2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER =
-O2 -fPIC \
-c modperl_exports.c && mv modperl_exports.o modperl_exports.lo
rm -f mod_perl.so
cc -shared -O2 -L/usr/local/lib \
\
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 -L/usr/local/lib =
-L/opt/perl/lib/5.10.0/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt =
-lutil -lc \
-o mod_perl.so
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-su se-linux/bin/=
ld: /opt/perl/lib/5.10.0/x86_64-linux/CORE/libperl.a(gv.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.0/x86_64-linux/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 `/opt/mod_perl-2.0.4/src/modules/perl'
make: *** [modperl_lib] Error 2

------------- /MAKE TRACE ----------

As you can see, I have used Perl 5.10.0, but the error is the same when =
using Perl 5.8.8

What is also very confusing: the COnfigure.PL program is unable to find =
the httpd binary. Again, I have specified MP_AP_PREFIX.


Thak you very much in advance!
=20
2. Used Components and their Configuration:

*** mod_perl version 2.000004

*** using /opt/mod_perl-2.0.4/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
MP_APR_LIB =3D> aprext
MP_AP_PREFIX =3D> /usr/local/apache2
MP_COMPAT_1X =3D> 0
MP_GENERATE_XS =3D> 1
MP_LIBNAME =3D> mod_perl
MP_USE_DSO =3D> 1


*** The httpd binary was not found


*** (apr|apu)-config linking info

-L/usr/local/apache2/lib -laprutil-0 -lexpat
-L/usr/local/apache2/lib -lapr-0 -lrt -lm -lcrypt -lnsl -lpthread -ldl



*** /opt/perl/bin/perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=3Dlinux, osvers=3D2.6.16.54-0.2.5-smp, =
archname=3Dx86_64-linux
uname=3D'linux ccintrav1 2.6.16.54-0.2.5-smp #1 smp mon jan 21 =
13:29:51 utc 2008 x86_64 x86_64 x86_64 gnulinux '
config_args=3D'-ds -e -Dprefix=3D/opt/perl'
hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
useithreads=3Dundef, usemultiplicity=3Dundef
useperlio=3Ddefine, d_sfio=3Dundef, uselargefiles=3Ddefine, =
usesocks=3Dundef
use64bitint=3Ddefine, use64bitall=3Ddefine, uselongdouble=3Dundef
usemymalloc=3Dn, bincompat5005=3Dundef
Compiler:
cc=3D'cc', ccflags =3D'-fno-strict-aliasing -pipe =
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64',
optimize=3D'-O2',
cppflags=3D'-fno-strict-aliasing -pipe -I/usr/local/include'
ccversion=3D'', gccversion=3D'4.1.0 (SUSE Linux)', gccosandvers=3D''
intsize=3D4, longsize=3D8, ptrsize=3D8, doublesize=3D8, =
byteorder=3D12345678
d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, =
longdblsize=3D16
ivtype=3D'long', ivsize=3D8, nvtype=3D'double', nvsize=3D8, =
Off_t=3D'off_t', lseeksize=3D8
alignbytes=3D8, prototype=3Ddefine
Linker and Libraries:
ld=3D'cc', ldflags =3D' -L/usr/local/lib'
libpth=3D/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 =
/usr/local/lib64
libs=3D-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=3D-lnsl -ldl -lm -lcrypt -lutil -lc
libc=3D/lib/libc-2.4.so, so=3Dso, useshrplib=3Dfalse, =
libperl=3Dlibperl.a
gnulibc_version=3D'2.4'
Dynamic Linking:
dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, =
ccdlflags=3D'-Wl,-E'
cccdlflags=3D'-fPIC', lddlflags=3D'-shared -O2 -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP =
USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
Built under linux
Compiled at Aug 26 2008 19:53:03
%ENV:
PERL_LWP_USE_HTTP_10=3D"1"
@INC:
/opt/perl/lib/5.10.0/x86_64-linux
/opt/perl/lib/5.10.0
/opt/perl/lib/site_perl/5.10.0/x86_64-linux
/opt/perl/lib/site_perl/5.10.0
.

*** Packages of interest status:

Apache2 : -
Apache2::Request : -
CGI : 3.29
ExtUtils::MakeMaker: 6.42
LWP : -
mod_perl : -
mod_perl2 : -


3. This is the core dump trace: (if you get a core dump):

[CORE TRACE COMES HERE]

This report was generated by ./REPORT on Wed Aug 27 07:42:38 2008 GMT.
=20
---------------------------------------------------
Johannes Ebner
Junior System Engineer
=20
Computacenter AG & Co oHG für FZ-442
Programmentwicklung NAS-SoD Betrieb
Tel: 089/45712-989
Mobile: 0172/8462335
mailto: Ebner.EJ.Johann@partner.bmw.de
---------------------------------------------------

Re: [mp2][configure/make]

am 27.08.2008 10:33:07 von Fred Moyer

Ebner.EJ.Johannes@partner.bmw.de wrote:
> 1. Problem Description:
>
> I cannot compile mod_perl for Apache2. There seem to be two issues with the Configure.PL/make-process. Configure runs through without an error but with a warning that header files have been found in an unexpected directory (see warning message below) although I have supplied the MP_AP_PREFIX specifying the correct path (see 2.) ):

> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-su se-linux/bin/ld: /opt/perl/lib/5.10.0/x86_64-linux/CORE/libperl.a(gv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

You need to use a perl binary that has been compiled with -fPIC (there
is a current thread on the list regarding this issue). I have compiled
5.8.8 with -fPIC and was able to build mod_perl successfully repeatedly
on x86_64. The exact commands aren't in my shell history any more, but
all of the generated Makefiles have

CCFLAGS = -fPIC

in them. I'll try to build later this week and post the exact process I
used back to the list.

> /opt/perl/lib/5.10.0/x86_64-linux/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 `/opt/mod_perl-2.0.4/src/modules/perl'
> make: *** [modperl_lib] Error 2
>
> ------------- /MAKE TRACE ----------
>
> As you can see, I have used Perl 5.10.0, but the error is the same when using Perl 5.8.8
>
> What is also very confusing: the COnfigure.PL program is unable to find the httpd binary. Again, I have specified MP_AP_PREFIX.
>
>
> Thak you very much in advance!
>
> 2. Used Components and their Configuration:
>
> *** mod_perl version 2.000004
>
> *** using /opt/mod_perl-2.0.4/lib/Apache2/BuildConfig.pm
>
> *** Makefile.PL options:
> MP_APR_LIB => aprext
> MP_AP_PREFIX => /usr/local/apache2
> MP_COMPAT_1X => 0
> MP_GENERATE_XS => 1
> MP_LIBNAME => mod_perl
> MP_USE_DSO => 1
>
>
> *** The httpd binary was not found
>
>
> *** (apr|apu)-config linking info
>
> -L/usr/local/apache2/lib -laprutil-0 -lexpat
> -L/usr/local/apache2/lib -lapr-0 -lrt -lm -lcrypt -lnsl -lpthread -ldl
>
>
>
> *** /opt/perl/bin/perl -V
> Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
> Platform:
> osname=linux, osvers=2.6.16.54-0.2.5-smp, archname=x86_64-linux
> uname='linux ccintrav1 2.6.16.54-0.2.5-smp #1 smp mon jan 21 13:29:51 utc 2008 x86_64 x86_64 x86_64 gnulinux '
> config_args='-ds -e -Dprefix=/opt/perl'
> hint=recommended, useposix=true, d_sigaction=define
> 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'
> ccversion='', gccversion='4.1.0 (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 /lib64 /usr/lib64 /usr/local/lib64
> libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
> perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
> libc=/lib/libc-2.4.so, so=so, useshrplib=false, libperl=libperl.a
> gnulibc_version='2.4'
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
> cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL
> USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
> Built under linux
> Compiled at Aug 26 2008 19:53:03
> %ENV:
> PERL_LWP_USE_HTTP_10="1"
> @INC:
> /opt/perl/lib/5.10.0/x86_64-linux
> /opt/perl/lib/5.10.0
> /opt/perl/lib/site_perl/5.10.0/x86_64-linux
> /opt/perl/lib/site_perl/5.10.0
> .
>
> *** Packages of interest status:
>
> Apache2 : -
> Apache2::Request : -
> CGI : 3.29
> ExtUtils::MakeMaker: 6.42
> LWP : -
> mod_perl : -
> mod_perl2 : -
>
>
> 3. This is the core dump trace: (if you get a core dump):
>
> [CORE TRACE COMES HERE]
>
> This report was generated by ./REPORT on Wed Aug 27 07:42:38 2008 GMT.
>
> ---------------------------------------------------
> Johannes Ebner
> Junior System Engineer
>
> Computacenter AG & Co oHG für FZ-442
> Programmentwicklung NAS-SoD Betrieb
> Tel: 089/45712-989
> Mobile: 0172/8462335
> mailto: Ebner.EJ.Johann@partner.bmw.de
> ---------------------------------------------------
>


--
Red Hot Penguin Consulting LLC
mod_perl/PostgreSQL consulting and implementation
http://www.redhotpenguin.com/

AW: [mp2][configure/make]

am 27.08.2008 11:31:05 von Ebner.EJ.Johannes

Thank you very much for that info.

I configured it with: ./Configure -de -Accflags=3D'-fPIC' =
-Dprefix=3D/path/to/perl

as Dan Axtell sugfgested.

Worked perfectly. Thanks alot!

=20

>-----Ursprüngliche Nachricht-----
>Von: Fred Moyer [mailto:fred@redhotpenguin.com]=20
>Gesendet: Mittwoch, 27. August 2008 10:33
>An: Ebner Johannes, (Ebner.EJ.Johannes@partner.bmw.de)
>Cc: modperl@perl.apache.org
>Betreff: Re: [mp2][configure/make]
>
>Ebner.EJ.Johannes@partner.bmw.de wrote:
>> 1. Problem Description:
>> =20
>> I cannot compile mod_perl for Apache2. There seem to be=20
>two issues with the Configure.PL/make-process. Configure runs=20
>through without an error but with a warning that header files=20
>have been found in an unexpected directory (see warning=20
>message below) although I have supplied the MP_AP_PREFIX=20
>specifying the correct path (see 2.) ):
>
>>=20
>/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-s use-
>linux/bin/ld:=20
>/opt/perl/lib/5.10.0/x86_64-linux/CORE/libperl.a(gv.o):=20
>relocation R_X86_64_32 against `a local symbol' can not be=20
>used when making a shared object; recompile with -fPIC
>
>You need to use a perl binary that has been compiled with -fPIC (there=20
>is a current thread on the list regarding this issue). I have=20
>compiled=20
>5.8.8 with -fPIC and was able to build mod_perl successfully=20
>repeatedly=20
>on x86_64. The exact commands aren't in my shell history any=20
>more, but=20
>all of the generated Makefiles have
>
>CCFLAGS =3D -fPIC
>
>in them. I'll try to build later this week and post the exact=20
>process I=20
>used back to the list.
>
>> /opt/perl/lib/5.10.0/x86_64-linux/CORE/libperl.a: could not=20
>read symbols: Bad value
>> collect2: ld returned 1 exit status
>> make[1]: *** [mod_perl.so] Error 1
>> make[1]: Leaving directory `/opt/mod_perl-2.0.4/src/modules/perl'
>> make: *** [modperl_lib] Error 2
>>=20
>> ------------- /MAKE TRACE ----------
>>=20
>> As you can see, I have used Perl 5.10.0, but the error is=20
>the same when using Perl 5.8.8
>>=20
>> What is also very confusing: the COnfigure.PL program is=20
>unable to find the httpd binary. Again, I have specified MP_AP_PREFIX.
>>=20
>>=20
>> Thak you very much in advance!
>> =20
>> 2. Used Components and their Configuration:
>>=20
>> *** mod_perl version 2.000004
>>=20
>> *** using /opt/mod_perl-2.0.4/lib/Apache2/BuildConfig.pm
>>=20
>> *** Makefile.PL options:
>> MP_APR_LIB =3D> aprext
>> MP_AP_PREFIX =3D> /usr/local/apache2
>> MP_COMPAT_1X =3D> 0
>> MP_GENERATE_XS =3D> 1
>> MP_LIBNAME =3D> mod_perl
>> MP_USE_DSO =3D> 1
>>=20
>>=20
>> *** The httpd binary was not found
>>=20
>>=20
>> *** (apr|apu)-config linking info
>>=20
>> -L/usr/local/apache2/lib -laprutil-0 -lexpat
>> -L/usr/local/apache2/lib -lapr-0 -lrt -lm -lcrypt -lnsl =20
>-lpthread -ldl
>>=20
>>=20
>>=20
>> *** /opt/perl/bin/perl -V
>> Summary of my perl5 (revision 5 version 10 subversion 0)=20
>configuration:
>> Platform:
>> osname=3Dlinux, osvers=3D2.6.16.54-0.2.5-smp, =
archname=3Dx86_64-linux
>> uname=3D'linux ccintrav1 2.6.16.54-0.2.5-smp #1 smp mon=20
>jan 21 13:29:51 utc 2008 x86_64 x86_64 x86_64 gnulinux '
>> config_args=3D'-ds -e -Dprefix=3D/opt/perl'
>> hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
>> useithreads=3Dundef, usemultiplicity=3Dundef
>> useperlio=3Ddefine, d_sfio=3Dundef, uselargefiles=3Ddefine,=20
>usesocks=3Dundef
>> use64bitint=3Ddefine, use64bitall=3Ddefine, uselongdouble=3Dundef
>> usemymalloc=3Dn, bincompat5005=3Dundef
>> Compiler:
>> cc=3D'cc', ccflags =3D'-fno-strict-aliasing -pipe=20
>-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64',
>> optimize=3D'-O2',
>> cppflags=3D'-fno-strict-aliasing -pipe -I/usr/local/include'
>> ccversion=3D'', gccversion=3D'4.1.0 (SUSE Linux)', =
gccosandvers=3D''
>> intsize=3D4, longsize=3D8, ptrsize=3D8, doublesize=3D8,=20
>byteorder=3D12345678
>> d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine,=20
>longdblsize=3D16
>> ivtype=3D'long', ivsize=3D8, nvtype=3D'double', nvsize=3D8,=20
>Off_t=3D'off_t', lseeksize=3D8
>> alignbytes=3D8, prototype=3Ddefine
>> Linker and Libraries:
>> ld=3D'cc', ldflags =3D' -L/usr/local/lib'
>> libpth=3D/usr/local/lib /lib /usr/lib /lib64 /usr/lib64=20
>/usr/local/lib64
>> libs=3D-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
>> perllibs=3D-lnsl -ldl -lm -lcrypt -lutil -lc
>> libc=3D/lib/libc-2.4.so, so=3Dso, useshrplib=3Dfalse, =
libperl=3Dlibperl.a
>> gnulibc_version=3D'2.4'
>> Dynamic Linking:
>> dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, =
ccdlflags=3D'-Wl,-E'
>> cccdlflags=3D'-fPIC', lddlflags=3D'-shared -O2 -L/usr/local/lib'
>>=20
>>=20
>> Characteristics of this binary (from libperl):
>> Compile-time options: PERL_DONT_CREATE_GVSV=20
>PERL_MALLOC_WRAP USE_64_BIT_ALL
>> USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
>> Built under linux
>> Compiled at Aug 26 2008 19:53:03
>> %ENV:
>> PERL_LWP_USE_HTTP_10=3D"1"
>> @INC:
>> /opt/perl/lib/5.10.0/x86_64-linux
>> /opt/perl/lib/5.10.0
>> /opt/perl/lib/site_perl/5.10.0/x86_64-linux
>> /opt/perl/lib/site_perl/5.10.0
>> .
>>=20
>> *** Packages of interest status:
>>=20
>> Apache2 : -
>> Apache2::Request : -
>> CGI : 3.29
>> ExtUtils::MakeMaker: 6.42
>> LWP : -
>> mod_perl : -
>> mod_perl2 : -
>>=20
>>=20
>> 3. This is the core dump trace: (if you get a core dump):
>>=20
>> [CORE TRACE COMES HERE]
>>=20
>> This report was generated by ./REPORT on Wed Aug 27 07:42:38=20
>2008 GMT.
>> =20
>> ---------------------------------------------------
>> Johannes Ebner
>> Junior System Engineer
>> =20
>> Computacenter AG & Co oHG für FZ-442
>> Programmentwicklung NAS-SoD Betrieb
>> Tel: 089/45712-989
>> Mobile: 0172/8462335
>> mailto: Ebner.EJ.Johann@partner.bmw.de
>> ---------------------------------------------------
>>=20
>
>
>--=20
>Red Hot Penguin Consulting LLC
>mod_perl/PostgreSQL consulting and implementation
>http://www.redhotpenguin.com/
>
>