You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Kermit Tensmeyer <kl...@eml.cc> on 2003/03/16 19:28:15 UTC
Makefile.PL (build apxs)
I looked thru the archives, i didn't see this from before..
so if this is repetious I apoligize.
make install fails because APACHE_INCLUDEDIR = " "
which is because (....) because two macros inside
the call to ModPerl::MM::WriteMakefile return empty
strings.
(hey I'm trying to cut to the chase as quickly as possible)
macro => {
APACHE_INCLUDEDIR => $build->apxs('-q' => 'includedir'),
}
it interesting because $build->apxs(-q for all arguments)
returns an empty string. the actual apxs script from either
the apache2/support directory or the actual install directory
finds the correct information.
Makefile.Pl "sub configure"
contains a three branched if statement
if ($build->:MP_APXS})
elsif ( ($build->{MP_AP_Prefix})
else {
for my $path ($build->find) {
which only finds the preinstalled apache not the actual apache
install
}
but Apache::Build::apxs processes an array @trys (which contain
target directories for actual installs)
it assumes unless it is a ModPerl build
Apache::TestConfig::which(apxs)
and a hardcoded path '/usr/local/apache' (which may/maynot be
the actual apache2 path)
in either case the code would not appear to send consistent information
unless the APXS code (inside Apache::Build) uses the same data the apxs
script in the target httpd2 installation.
---
summary: the apxs inside the build script is generating empty
strings
when the target httpd2 source tree is used and (MP_APXS is not
defined or
MP_AP_Prefix is not defined in the build script)
How do I track down the cause of this problem. If i find it, I -will-
submit a patch..
-------- details in file Makefile -------
# MakeMaker ARGV: ()
#
# MakeMaker Parameters:
# CCFLAGS => q[ -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-DMOD_PERL]
# DIR => [q[Apache-Test], q[ModPerl-Registry], q[WrapXS], q[xs]]
# INC => q[-I/home/kermit/cvs_stuff/modperl-2.0/src/modules/perl
-I/home/kermit/cvs_stuff/modperl-2.0/xs
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/include
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/srclib/apr/include
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/srclib/apr-util/include
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/os/unix]
# LDDLFLAGS => q[-shared]
# LIBS => q[ ]
# NAME => q[mod_perl]
# OPTIMIZE => q[-O3 --pipe]
# TYPEMAPS => [q[/home/kermit/cvs_stuff/modperl-2.0/xs/typemap]]
# VERSION => q[1.99_09-dev]
# clean => { FILES=>q[src/modules/perl/Makefile.modperl
src/modules/perl/ldopts lib/Apache/BuildConfig.pm lib/typemap
xs/apache_global.exp xs/apache_inline.exp xs/apache_ithreads.exp
xs/modperl_global.exp xs/modperl_inline.exp xs/modperl_ithreads.exp
xs/apache.def xs/modperl.def src/modules/perl/modperl_hooks.c
src/modules/perl/modperl_directives.c src/modules/perl/modperl_flags.c
src/modules/perl/modperl_xsinit.c src/modules/perl/modperl_constants.c
src/modules/perl/modperl_hooks.h src/modules/perl/modperl_directives.h
src/modules/perl/modperl_flags.h src/modules/perl/modperl_trace.h
src/modules/perl/modperl_constants.h] }
# dist => { DIST_DEFAULT=>q[mydist], COMPRESS=>q[gzip -9f],
SUFFIX=>q[gz] }
# dynamic_lib => { OTHERLDFLAGS=>q[] }
# macro => { MODPERL_MAKEFILE=>q[Makefile.modperl],
MODPERL_XS_H_FILES=>q[xs/modperl_xs_sv_convert.h \
xs/modperl_xs_typedefs.h \ xs/modperl_xs_util.h],
APACHE_INCLUDEDIR=>q[], PERL=>q[/usr/bin/perl], APACHE_PREFIX=>q[],
MOD_INSTALL=>q[$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \ -e "BEGIN { eval
{require Apache2} } use ModPerl::MM; \
ModPerl::MM::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');" ],
MODPERL_SRC=>q[src/modules/perl], MAKE_F=>q[$(MAKE) -f],
APACHE_LIBDIR=>q[], MODPERL_LIBMAKE=>q[$(MAKE) -f $(MODPERL_MAKEFILE)] }
# --- MakeMaker post_initialize section:akefile ---
--
Kermit Tensmeyer
klt_7940@emil.cc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: (mp2) Makefile.PL - install target error
Posted by Kermit Tensmeyer <kl...@eml.cc>.
On Sun, 16 Mar 2003 20:53:35 -0600, "Kermit Tensmeyer" <kl...@eml.cc>
said:
OK followup
Makefile.PL fails to generate correct value in call to WriteMakefile
because $build->apxs('-q' => 'includedir') generates a null string
wheras calls to apxs script generate correct strings.
using perl -d Makefile.PL
I can see that the configure routine extracts the correct values for
the Apache2 build variables, but the function takes an error return
because the @trys variable in the apxs function in the build module
does not match any existing directories.
i speculate that it may be caused by external script apxs comparing
@trys variable elements against the Apache2 target_install directory
vs the $build->apxs( ) fuction examining the source_tree directory
this problem -may- only exist where the Makefile.PL follows the third
path
in the sub configure where ($build->{MP_APXS} is not set &&
($build->{MP_AP_PREFIX})
also speculate that if mod-perl is built relative to the install
directory for apache2
this won't be an issue.
there is a difference between what i can verify and what I
speculate
the speculation could be entirely wrong..
--- side question -- when pulling the content via cvs, is
there a way to
grab a version id for the
mod-perl build as a whole?
(date of pull/generated
version id)
--
Kermit Tensmeyer
klt_7940@emil.cc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
(mp2) Makefile.PL - install target error
Posted by Kermit Tensmeyer <kl...@eml.cc>.
On Mon, 17 Mar 2003 10:34:38 +1100, "Stas Bekman" <st...@stason.org> said:
> You will need to provide more information about the cause of the problem.
> Your
> analysis could be much more useful if it was placed into some context.
> e.g. I
> have no clue how did you try to invoked 'perl Makefile.PL', where your
> installed Apache resides, what OS you use, etc. The following guidelines
> should help you to figure out, what information you should supply.
> http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
ok... Linux Suse 8.1
apache2 updated from CVS 3/16/03 ' cvs up -dP'
source tree /home/kermit/cvs_stuff/httpd-2.0
install_home /usr/local/apache2
mod_perl2 updated from CVS 3/16/03 'cvs up -dP
using script :
##########################################
cd httpd-2.0
cvs up -dP
make clean && ./buildconf
./configure --prefix=/usr/local/apache2 --with-mpm=prefork
--enable-modules=mod_info
make && make install
cd ../modperl-2.0
cvs up -dP
make clean
perl Makefile.PL
make && make install
###########################################
error is noticed on "make install in modperl-2.0'
manual edit of Makefile to add correct path of APACHE_INCLUDEDIR
allows completion of ' make install
##############################################
two files appended inline as per/faq
mybugreport (t/REPORT output)
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
make && make install fails in one small area.
files are not copied to a directory because "APACHE_INCLUDEDIR"
is an empty string.
+ APACHE_INCLUDEDIR is built by Makefile.PL by use of the 'macro' hash
in the call of ModPerl::MM:WriteMakefile
APACHE_INCLUDEDIR => $build->apxs('-q' => 'includedir'),
+ $build->apxs('-q' => X for all X) returns an empty string
+ $APACHE2_SOURCE_TREE/support/apxs and $APACHE2_INSTALLED/bin/apxs
return the correct string "/usr/local/apache2/include'
2. Used Components and their Configuration:
*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
MP_GENERATE_XS => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
MP_USE_STATIC => 1
*** The httpd binary was not found
*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.19, archname=i586-linux-thread-multi
uname='linux bloembergen 2.4.19 #1 mon apr 15 08:57:26 gmt 2002 i686
unknown '
config_args='-ds -e -Dprefix=/usr -Dusethreads -Di_db -Di_dbm
-Di_ndbm -Di_gdbm -Duseshrplib=true'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3 --pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing'
ccversion='', gccversion='3.2', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/local/lib
libs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i586-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Sep 9 2002 18:13:56
%ENV:
PERL5LIB="/home/kermit/.perllib"
PERL_LWP_USE_HTTP_10="1"
@INC:
/home/kermit/.perllib
/usr/lib/perl5/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
.
3. This is the core dump trace: (if you get a core dump):
[CORE TRACE COMES HERE]
This report was generated by t/REPORT on Mon Mar 17 02:15:21 2003 GMT.
-------------8<---------- End Bug Report --------------8<----------
included excerpt of Makefile as generated by Makefile.PL
notice that APACHE_INCLUDEDIR=>q[ ] which WriteMakefile generates as
" APACHE_INCLUDIR = "
###############################################################
It was generated automatically by MakeMaker version
# 6.05 (Revision: 1.69) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: ()
#
# MakeMaker Parameters:
# CCFLAGS => q[ -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-DMOD_PERL]
# DIR => [q[Apache-Test], q[ModPerl-Registry], q[WrapXS], q[xs]]
# INC => q[-I/home/kermit/cvs_stuff/modperl-2.0/src/modules/perl
-I/home/kermit/cvs_stuff/modperl-2.0/xs
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/include
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/srclib/apr/include
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/srclib/apr-util/include
-I/home/kermit/cvs_stuff/modperl-2.0/../httpd-2.0/os/unix]
# LDDLFLAGS => q[-shared]
# LIBS => q[ ]
# NAME => q[mod_perl]
# OPTIMIZE => q[-O3 --pipe]
# TYPEMAPS => [q[/home/kermit/cvs_stuff/modperl-2.0/xs/typemap]]
# VERSION => q[1.99_09-dev]
# clean => { FILES=>q[src/modules/perl/Makefile.modperl
src/modules/perl/ldopts lib/Apache/BuildConfig.pm lib/typemap
xs/apache_global.exp xs/apache_inline.exp xs/apache_ithreads.exp
xs/modperl_global.exp xs/modperl_inline.exp xs/modperl_ithreads.exp
xs/apache.def xs/modperl.def src/modules/perl/modperl_hooks.c
src/modules/perl/modperl_directives.c src/modules/perl/modperl_flags.c
src/modules/perl/modperl_xsinit.c src/modules/perl/modperl_constants.c
src/modules/perl/modperl_hooks.h src/modules/perl/modperl_directives.h
src/modules/perl/modperl_flags.h src/modules/perl/modperl_trace.h
src/modules/perl/modperl_constants.h] }
# dist => { DIST_DEFAULT=>q[mydist], COMPRESS=>q[gzip -9f],
SUFFIX=>q[gz] }
# dynamic_lib => { OTHERLDFLAGS=>q[] }
# macro => { MODPERL_MAKEFILE=>q[Makefile.modperl],
MODPERL_XS_H_FILES=>q[xs/modperl_xs_sv_convert.h \
xs/modperl_xs_typedefs.h \ xs/modperl_xs_util.h],
APACHE_INCLUDEDIR=>q[], PERL=>q[/usr/bin/perl], APACHE_PREFIX=>q[],
MOD_INSTALL=>q[$(PERL) -I$(INST_LIB) -I$(PERL_LIB) \ -e "BEGIN { eval
{require Apache2} } use ModPerl::MM; \
ModPerl::MM::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');" ],
MODPERL_SRC=>q[src/modules/perl], MAKE_F=>q[$(MAKE) -f],
APACHE_LIBDIR=>q[], MODPERL_LIBMAKE=>q[$(MAKE) -f $(MODPERL_MAKEFILE)] }
####################################################
--
Kermit Tensmeyer
klt_7940@emil.cc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Makefile.PL (build apxs)
Posted by Stas Bekman <st...@stason.org>.
Kermit Tensmeyer wrote:
> I looked thru the archives, i didn't see this from before..
> so if this is repetious I apoligize.
>
> make install fails because APACHE_INCLUDEDIR = " "
> which is because (....) because two macros inside
> the call to ModPerl::MM::WriteMakefile return empty
> strings.
> (hey I'm trying to cut to the chase as quickly as possible)
>
> macro => {
> APACHE_INCLUDEDIR => $build->apxs('-q' => 'includedir'),
> }
> it interesting because $build->apxs(-q for all arguments)
> returns an empty string. the actual apxs script from either
> the apache2/support directory or the actual install directory
> finds the correct information.
>
> Makefile.Pl "sub configure"
> contains a three branched if statement
> if ($build->:MP_APXS})
> elsif ( ($build->{MP_AP_Prefix})
> else {
> for my $path ($build->find) {
> which only finds the preinstalled apache not the actual apache
> install
> }
>
> but Apache::Build::apxs processes an array @trys (which contain
> target directories for actual installs)
> it assumes unless it is a ModPerl build
> Apache::TestConfig::which(apxs)
> and a hardcoded path '/usr/local/apache' (which may/maynot be
> the actual apache2 path)
>
> in either case the code would not appear to send consistent information
> unless the APXS code (inside Apache::Build) uses the same data the apxs
> script in the target httpd2 installation.
>
> ---
> summary: the apxs inside the build script is generating empty
> strings
> when the target httpd2 source tree is used and (MP_APXS is not
> defined or
> MP_AP_Prefix is not defined in the build script)
> How do I track down the cause of this problem. If i find it, I -will-
> submit a patch..
Kermit,
You will need to provide more information about the cause of the problem. Your
analysis could be much more useful if it was placed into some context. e.g. I
have no clue how did you try to invoked 'perl Makefile.PL', where your
installed Apache resides, what OS you use, etc. The following guidelines
should help you to figure out, what information you should supply.
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
Thanks.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Makefile.PL (build apxs)
Posted by Stas Bekman <st...@stason.org>.
Kermit Tensmeyer wrote:
> On Tue, 18 Mar 2003 16:41:17 +1100, "Stas Bekman" <st...@stason.org> said:
>
>>Kermit Tensmeyer wrote:
>>
>>> I looked thru the archives, i didn't see this from before..
>>> so if this is repetious I apoligize.
>>>
>>> make install fails because APACHE_INCLUDEDIR = " "
>>> which is because (....) because two macros inside
>>> the call to ModPerl::MM::WriteMakefile return empty
>>> strings.
>>> (hey I'm trying to cut to the chase as quickly as possible)
>>>
>>> macro => {
>>> APACHE_INCLUDEDIR => $build->apxs('-q' => 'includedir'),
>>>}
>>
>>That should be fixed now in cvs. Thank you for the detailed report.
>>
>>I've failed to catch it earlier as I was building with MP_APXS and not
>>MP_AP_PREFIX.
>
>
> yes there are some changes
> now Makefile.PL uses the macro
> MODPERL_AP_INCLUDEDIR => $build->apxs('-q' => 'INCLUDEDIR'),
>
> and
>
> modperl_xs_h_install:
> @$(MKPATH) $(MODPERL_AP_INCLUDEDIR)
> $(CP) $(MODPERL_XS_H_FILES) $(MODPERL_AP_INCLUDEDIR)
>
> is still broken because MODPERL_AP_INCLUDIR is empty
> and since $build->apxs('-q' => 'INCLUDEDIR') still returns an empty
> string
>
> but this is the -only- occurance of $build->apxs left in Makefile.PL
>
> the same problem shows up in src/modules/perl/Makefile.modperl
> as the targets MODPERL_AP_INCLUDEDIR and MODPERL_AP_LIBEXECDIR
>
> as I see it there are two alternatives ( get $build->apxs to work
> properly _or_
> parse $build->{dir}/build/config_vers.mk for the variables)
Definitely fix the apxs() function, because it hides the differences for when
the actual apxs script is used or not, and it already parses for variables
when the apxs script is not used.
> is there any other use for Apache::Build::apxs ?
It's used a lot internally, mainly in lib/Apache/Build.pm. You can grep for it
to see for yourself.
Any chance you can trace why this doesn't work for you? I can't seem to
reproduce the problem here.
We should also probably assert in Makefile.PL if $build->apxs('-q' =>
'INCLUDEDIR') fails, rather than silently move on.
Thanks.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Makefile.PL (build apxs)
Posted by Kermit Tensmeyer <kl...@eml.cc>.
On Tue, 18 Mar 2003 16:41:17 +1100, "Stas Bekman" <st...@stason.org> said:
> Kermit Tensmeyer wrote:
> > I looked thru the archives, i didn't see this from before..
> > so if this is repetious I apoligize.
> >
> > make install fails because APACHE_INCLUDEDIR = " "
> > which is because (....) because two macros inside
> > the call to ModPerl::MM::WriteMakefile return empty
> > strings.
> > (hey I'm trying to cut to the chase as quickly as possible)
> >
> > macro => {
> > APACHE_INCLUDEDIR => $build->apxs('-q' => 'includedir'),
> > }
>
> That should be fixed now in cvs. Thank you for the detailed report.
>
> I've failed to catch it earlier as I was building with MP_APXS and not
> MP_AP_PREFIX.
yes there are some changes
now Makefile.PL uses the macro
MODPERL_AP_INCLUDEDIR => $build->apxs('-q' => 'INCLUDEDIR'),
and
modperl_xs_h_install:
@$(MKPATH) $(MODPERL_AP_INCLUDEDIR)
$(CP) $(MODPERL_XS_H_FILES) $(MODPERL_AP_INCLUDEDIR)
is still broken because MODPERL_AP_INCLUDIR is empty
and since $build->apxs('-q' => 'INCLUDEDIR') still returns an empty
string
but this is the -only- occurance of $build->apxs left in Makefile.PL
the same problem shows up in src/modules/perl/Makefile.modperl
as the targets MODPERL_AP_INCLUDEDIR and MODPERL_AP_LIBEXECDIR
as I see it there are two alternatives ( get $build->apxs to work
properly _or_
parse $build->{dir}/build/config_vers.mk for the variables)
is there any other use for Apache::Build::apxs ?
--
Kermit Tensmeyer
klt_7940@emil.cc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Makefile.PL (build apxs)
Posted by Stas Bekman <st...@stason.org>.
Kermit Tensmeyer wrote:
> I looked thru the archives, i didn't see this from before..
> so if this is repetious I apoligize.
>
> make install fails because APACHE_INCLUDEDIR = " "
> which is because (....) because two macros inside
> the call to ModPerl::MM::WriteMakefile return empty
> strings.
> (hey I'm trying to cut to the chase as quickly as possible)
>
> macro => {
> APACHE_INCLUDEDIR => $build->apxs('-q' => 'includedir'),
> }
That should be fixed now in cvs. Thank you for the detailed report.
I've failed to catch it earlier as I was building with MP_APXS and not
MP_AP_PREFIX.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org