You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Joe Schaefer <jo...@sunstarsys.com> on 2004/07/13 23:39:17 UTC

new apreq2 snapshot

Folks, I just put a new snapshot of current cvs at

  http://cvs.apache.org/~joes/libapreq2-2.04-dev.tar.gz

Please test it, paying particular attention to the
new multivalued key functionality for the APR::Table
derived APIs.  Conceptually there are two new fixes 
available to perl 5.8.1+ users

  1) table iteration now properly pairs current key 
     with current value, so each(), keys() and values()
     all work nicely with multivalued entries.

  2) Calling $req->param, $req->args, $req->body, $req->upload
     or $jar->get in list context will return the list of keys,
     but the individual keys are augmented with v-string magic
     that reminds the key which object and table-entry it came
     from.  Invoking one of those methods above on such a magic
     key will bypass the apr_table lookup, using the key's v-string
     magic to get the return value instead (this shortcut 
     only happens in scalar context;  list context will still 
     return all values associated to that key).


I don't believe (1) is controversial, so I've backported it to
mp2 and submitted a patch to do the same thing for APR::Table.
However (2) might be, so I'd appreciate some feedback on whether
you like the idea or think it totally sucks.

Thanks!

-- 
Joe Schaefer


Re: new apreq2 snapshot

Posted by "Edward J. Sabol" <sa...@alderaan.gsfc.nasa.gov>.
>> Unsurprisingly, it failed to build, but, for some reason, the mod_perl
>> version test in build/version_check.pl didn't do its job. It never
>> informed me that my mod_perl version was insufficient.
>
> Please see if this patch fixes the prereq test:

Yeah, that works.

build/version_check.pl failed: mod_perl version 1.9913 unsupported (1.9915 or greater is required).
Please upgrade mod_perl first.

Thanks,
Ed

Re: new apreq2 snapshot

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Joe Schaefer wrote:
> 
>> "Edward J. Sabol" <sa...@alderaan.gsfc.nasa.gov> writes:
>>
>> [...]
>>
>>
>>> Unsurprisingly, it failed to build, but, for some reason, the mod_perl
>>> version test in build/version_check.pl didn't do its job. It never
>>> informed me that my mod_perl version was insufficient.
>>
>>
>>
>> Please see if this patch fixes the prereq test:
>>
>> Index: build/version_check.pl
>> ===================================================================
>> RCS file: /home/cvs/httpd-apreq-2/build/version_check.pl,v
>> retrieving revision 1.16
>> diff -u -r1.16 version_check.pl
>> --- build/version_check.pl      5 Jul 2004 05:22:17 -0000       1.16
>> +++ build/version_check.pl      14 Jul 2004 18:53:46 -0000
>> @@ -57,7 +57,8 @@
>>           "Apache::Test" => { version => "1.04",    test => 
>> \&a_t_version,
>>                               comment => "Win32 requires version 
>> 1.06"    },
>>    "ExtUtils::XSBuilder" => { version => "0.23",    test => 
>> \&xsb_version },
>> -              mod_perl  => { version => "1.99_15", test => 
>> \&mp2_version },
>> +                 # mp2 does not contain "_" in its reported version 
>> number
> 
> 
> it's not mp, it's how perl converts x.xx_xx versions

doh! please ignore me.


-- 
__________________________________________________________________
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

Re: new apreq2 snapshot

Posted by Stas Bekman <st...@stason.org>.
Joe Schaefer wrote:
> "Edward J. Sabol" <sa...@alderaan.gsfc.nasa.gov> writes:
> 
> [...]
> 
> 
>>Unsurprisingly, it failed to build, but, for some reason, the mod_perl
>>version test in build/version_check.pl didn't do its job. It never
>>informed me that my mod_perl version was insufficient.
> 
> 
> Please see if this patch fixes the prereq test:
> 
> Index: build/version_check.pl
> ===================================================================
> RCS file: /home/cvs/httpd-apreq-2/build/version_check.pl,v
> retrieving revision 1.16
> diff -u -r1.16 version_check.pl
> --- build/version_check.pl      5 Jul 2004 05:22:17 -0000       1.16
> +++ build/version_check.pl      14 Jul 2004 18:53:46 -0000
> @@ -57,7 +57,8 @@
>           "Apache::Test" => { version => "1.04",    test => \&a_t_version,
>                               comment => "Win32 requires version 1.06"    },
>    "ExtUtils::XSBuilder" => { version => "0.23",    test => \&xsb_version },
> -              mod_perl  => { version => "1.99_15", test => \&mp2_version },
> +                 # mp2 does not contain "_" in its reported version number

it's not mp, it's how perl converts x.xx_xx versions

> +              mod_perl  => { version => "1.9915", test => \&mp2_version },
>    "ExtUtils::MakeMaker" => { version => "6.15",    test => \&mm_version  },
>                  );
> 


-- 
__________________________________________________________________
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

Re: new apreq2 snapshot

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Edward J. Sabol" <sa...@alderaan.gsfc.nasa.gov> writes:

[...]

> Unsurprisingly, it failed to build, but, for some reason, the mod_perl
> version test in build/version_check.pl didn't do its job. It never
> informed me that my mod_perl version was insufficient.

Please see if this patch fixes the prereq test:

Index: build/version_check.pl
===================================================================
RCS file: /home/cvs/httpd-apreq-2/build/version_check.pl,v
retrieving revision 1.16
diff -u -r1.16 version_check.pl
--- build/version_check.pl      5 Jul 2004 05:22:17 -0000       1.16
+++ build/version_check.pl      14 Jul 2004 18:53:46 -0000
@@ -57,7 +57,8 @@
          "Apache::Test" => { version => "1.04",    test => \&a_t_version,
                              comment => "Win32 requires version 1.06"    },
   "ExtUtils::XSBuilder" => { version => "0.23",    test => \&xsb_version },
-              mod_perl  => { version => "1.99_15", test => \&mp2_version },
+                 # mp2 does not contain "_" in its reported version number
+              mod_perl  => { version => "1.9915", test => \&mp2_version },
   "ExtUtils::MakeMaker" => { version => "6.15",    test => \&mm_version  },
                 );

-- 
Joe Schaefer


Re: new apreq2 snapshot

Posted by "Edward J. Sabol" <sa...@alderaan.gsfc.nasa.gov>.
> Folks, I just put a new snapshot of current cvs at
> http://cvs.apache.org/~joes/libapreq2-2.04-dev.tar.gz
>
> Please test it, paying particular attention to the new multivalued key
> functionality for the APR::Table derived APIs. Conceptually there are
> two new fixes available to perl 5.8.1+ users

I only have mod_perl 1.99_13 installed. Ignorant of the new 1.99_15
requirement, I blindly tried to install libapreq2-2.04-dev anyway.
Unsurprisingly, it failed to build, but, for some reason, the mod_perl
version test in build/version_check.pl didn't do its job. It never informed
me that my mod_perl version was insufficient.

Re: new apreq2 snapshot

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>all tests pass for against 2.0, prefork and worker.  compiler warnings can
>>be slienced with the attached patch.
> 
> 
> +1, please commit.

blarg - committed, but the cvs mail bounced since I'm not subscribed via my
apache.org address and apparently the list isn't moderated so that someone
could have let it by.

--Geoff

cvs lists commit messages

Posted by Stas Bekman <st...@stason.org>.
Hi apmail folks,

Again and again we hit this -cvs lists problems. On unmoderated lists 
legitimate commit mails don't get posted if the committer is not 
subscribed from their apache.org address. On moderated lists we get this 
useless spam work. Yes, the former issue can be fixed by asking one of 
you to add the user to the allow list, or to make the list moderated, 
but this happens again and again. Can we please resolve this -cvs lists 
issue once and for all: automatically allow all posts originating form 
the machine sending cvs commit mail and automatically block any other 
email? there is no point in requiring moderation of the -cvs lists. All 
discussion should happen on the parallel -dev lists.

Thanks a lot!

Joe Schaefer wrote:

> +1, please commit.  Btw- have you fixed the apreq-cvs@
> issue, so the commit e-mail will go through?



-- 
__________________________________________________________________
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

Re: new apreq2 snapshot

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Geoffrey Young <ge...@modperlcookbook.org> writes:


[...]

> oh, and 2.1 passes all tests for me too :)

+1, please commit.  Btw- have you fixed the apreq-cvs@
issue, so the commit e-mail will go through?

-- 
Joe Schaefer


Re: new apreq2 snapshot

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Joe Schaefer wrote:
> Joe Schaefer <jo...@sunstarsys.com> writes:
> 
> 
>>  EXTRA_CPPFLAGS = "$EXTRA_CPPFLAGS `$APR_CONFIG --cppflags`"
>>
>>and see if you can get it to build (try using CPPFLAGS if
>>EXTRA_CPPFLAGS isn't working for you). 
> 
> 
> Sorry Geoffrey, you need to use CPPFLAGS.  

yes, I had noticed :)

> I committed this fix
> to cvs, does it help any?  Be sure to start fresh with ./buildconf ...

sorry for not getting back any sooner - I was working from Borders (you need
time away when you work from home :)

anyway, this is the patch I came up with, pretty much stolen right from httpd.

oh, and 2.1 passes all tests for me too :)

--Geoff

Re: new apreq2 snapshot

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Joe Schaefer <jo...@sunstarsys.com> writes:

> 
>   EXTRA_CPPFLAGS = "$EXTRA_CPPFLAGS `$APR_CONFIG --cppflags`"
> 
> and see if you can get it to build (try using CPPFLAGS if
> EXTRA_CPPFLAGS isn't working for you). 

Sorry Geoffrey, you need to use CPPFLAGS.  I committed this fix
to cvs, does it help any?  Be sure to start fresh with ./buildconf ...

-- 
Joe Schaefer


Re: new apreq2 snapshot

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Geoffrey Young <ge...@modperlcookbook.org> writes:

[...]

> it works.  so, I guess that apreq needs to pick up on that flag somehow? and
> I guess that somehow needs to not be perl (which is where mod_perl intuits
> it IIRC).

+1-  we should be able to get that flag from apr-config --cppflags.
Please tinker with acinclude.m4, adding

  EXTRA_CPPFLAGS = "$EXTRA_CPPFLAGS `$APR_CONFIG --cppflags`"

and see if you can get it to build (try using CPPFLAGS if
EXTRA_CPPFLAGS isn't working for you).  I'll be glad to clean
this up for you once we have a working patch to look at.

-- 
Joe Schaefer


Re: new apreq2 snapshot

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Joe Schaefer wrote:
> Geoffrey Young <ge...@modperlcookbook.org> writes:
> 
> [...]
> 
> 
>>anyway, can you get it to compile against 2.1 ok?  I didn't know how
>>much of a concern 2.1 is to apreq, and it's certainly less of an issue
>>if the issue is just mine.
> 
> 
> I do all my local development with HEAD for mp2, apr, apr-util, and
> httpd; in fact the snapshots I've been making have always been generated 
> from successful builds against HEAD.  So it should compile/test ok 
> for you (in principle, anyways :-).

hmph.

just to be sure, I started with fresh checkouts again.  I've been feeling
kind of out of touch lately, so I may be missing something due to some
missing grey matter, but here's what I just did.

$ cvs -d"cvs.apache.org:/home/cvs" checkout -d httpd-2.1 httpd-2.0
$ cd httpd-2.1/srclib
$ cvs -d":pserver:anoncvs@cvs.apache.org:/home/cvspublic" checkout apr
$ cvs -d":pserver:anoncvs@cvs.apache.org:/home/cvspublic" checkout apr-util
$ cd ../

$ ./buildconf
$ NOTEST_CFLAGS="-Werror"  CFLAGS="-DAP_UNSAFE_ERROR_LOG_UNESCAPED"
./configure --prefix=/apache/2.1/prefork/noperl --with-mpm=prefork
--enable-maintainer-mode --enable-mods-shared=all --without-execstrip
--enable-modules=all  --enable-deflate=shared  --enable-proxy=shared
--disable-log-forensic
$ make && sudo make install

now from a fresh checkout of httpd-apreq-2

$ ./buildconf
$ ./configure --with-apache2-apxs=/apache/2.1/prefork/noperl/bin/apxs
$ make

the result is about a page of warnings and errors, starting with this:

gcc -DHAVE_CONFIG_H -I. -I. -I. -I/apache/2.1/prefork/noperl/include
-I/apache/2.1/prefork/noperl/include -g -O2 -MT apreq.lo -MD -MP -MF
.deps/apreq.Tpo -c apreq.c  -fPIC -DPIC -o .libs/apreq.o
In file included from /apache/2.1/prefork/noperl/include/apr_tables.h:24,
                 from apreq.h:20,
                 from apreq.c:17:
/apache/2.1/prefork/noperl/include/apr.h:261: error: syntax error before
"apr_off_t"
/apache/2.1/prefork/noperl/include/apr.h:261: warning: data definition has
no type or storage class


it's strange that I don't get this error at all when building mp2 against
the same apache target, so I compared the compiler lines.  this is what
mod_perl uses for me:

cc -c  -I/src/mod_perl-2.0/src/modules/perl -I/src/mod_perl-2.0/xs
-I/apache/2.1/prefork/noperl/include -I/apache/2.1/prefork/noperl/include
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -I/usr/local/include  -I/usr/include/gdbm -DMOD_PERL
-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
-Werror -DAP_DEBUG -DAP_HAVE_DESIGNATED_INITIALIZER -DMP_DEBUG -DMP_TRACE
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -DAP_DEBUG -g
-DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fpic
"-I/perl/perl-5.8.4/lib/5.8.4/i686-linux-thread-multi/CORE"
-DMP_HAVE_APR_LIBS modperl_constants.c

the important difference being -D_LARGEFILE64_SOURCE.  so, if I change the
httpd-apreq-2 compile line to this (simply inserting -D_LARGEFILE64_SOURCE)

$  gcc -DHAVE_CONFIG_H -I. -I. -I. -I/apache/2.1/prefork/noperl/include
-I/apache/2.1/prefork/noperl/include -D_LARGEFILE64_SOURCE -g -O2 -MT
apreq.lo -MD -MP -MF .deps/apreq.Tpo -c apreq.c  -fPIC -DPIC -o .libs/apreq.o

it works.  so, I guess that apreq needs to pick up on that flag somehow? and
I guess that somehow needs to not be perl (which is where mod_perl intuits
it IIRC).

--Geoff


Re: new apreq2 snapshot

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Geoffrey Young <ge...@modperlcookbook.org> writes:

[...]

> anyway, can you get it to compile against 2.1 ok?  I didn't know how
> much of a concern 2.1 is to apreq, and it's certainly less of an issue
> if the issue is just mine.

I do all my local development with HEAD for mp2, apr, apr-util, and
httpd; in fact the snapshots I've been making have always been generated 
from successful builds against HEAD.  So it should compile/test ok 
for you (in principle, anyways :-).

If you've got all the requisite build tools for buildconf 
(libtool,auto*,doxygen, etc) after configuring with --with-apache2-apxs
you could run

  % make release && make release_test

That's exactly how I generate the tarball (and test it before posting).

-- 
Joe Schaefer


Re: new apreq2 snapshot

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>fwiw, I get a truckload of errors trying to compile against 2.1, which seem
>>to stem from a missing off64_t definition.
> 
> 
> Are you sure you're not mixing apr-0.9.4 and apr-1.0?

pretty sure - I just point to an existing 2.1 install that passed all the
mod_perl tests.  there is no srclib/apr/CVS/Tag file in my build sources to
indicate I'm using anything other than HEAD for both httpd and apr for that
build.  I also don't see any off64_t definitions anywhere in my 2.0 build,
while they are sprinked in srclib/apr/configure.in and a few other places in
2.1.  but maybe it doesn't have anything to do with that at all.

anyway, can you get it to compile against 2.1 ok?  I didn't know how much of
a concern 2.1 is to apreq, and it's certainly less of an issue if the issue
is just mine.

--Geoff

Re: new apreq2 snapshot

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Geoffrey Young <ge...@modperlcookbook.org> writes:

> Joe Schaefer wrote:
> > Folks, I just put a new snapshot of current cvs at
> > 
> >   http://cvs.apache.org/~joes/libapreq2-2.04-dev.tar.gz
> > 
> > Please test it
> 
> all tests pass for against 2.0, prefork and worker.  compiler warnings can
> be slienced with the attached patch.

+1, please commit.

> fwiw, I get a truckload of errors trying to compile against 2.1, which seem
> to stem from a missing off64_t definition.

Are you sure you're not mixing apr-0.9.4 and apr-1.0?

-- 
Joe Schaefer


Re: new apreq2 snapshot

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Joe Schaefer wrote:
> Folks, I just put a new snapshot of current cvs at
> 
>   http://cvs.apache.org/~joes/libapreq2-2.04-dev.tar.gz
> 
> Please test it

all tests pass for against 2.0, prefork and worker.  compiler warnings can
be slienced with the attached patch.

fwiw, I get a truckload of errors trying to compile against 2.1, which seem
to stem from a missing off64_t definition.

--Geoff