[mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

[mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 01.05.2008 13:06:49 von Simon Bertrang

Hi,
i'm trying to update mp2 but it fails to finish compilation.
Specifically, it fails at Base64:
....
cp Base64.pm ../../../blib/lib/APR/Base64.pm
/usr/bin/perl /usr/libdata/perl5/ExtUtils/xsubpp -typemap /usr/libdata/perl5/ExtUtils/typemap -typemap /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/typemap Base64.xs > Base64.xsc && mv Base64.xsc Base64.c
cc -c -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/src/modules/perl -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/xs -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I/usr/local/include/apache2 -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -I/usr/local/include -DMOD_PERL -DMP_COMPAT_1X -D_POSIX_THREADS -O2 -DVERSION=\"0.009000\" -DXS_VERSION=\"0.009000\" -DPIC -fPIC "-I/usr/libdata/perl5/amd64-openbsd/5.8.8/CORE" -DMP_HAVE_APR_LIBS Base64.c
In file included from Base64.xs:24:
/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: error: syntax error before '*' token
/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: warning: data definition has no type or storage class
*** Error code 1

Stop in /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/WrapXS/APR/Base64 (line 92 of /usr/share/mk/sys.mk).
....

I did a lot of testing with mod_perl-2.0.3 yesterday, so i can at least
assure that a working environment hasn't changed in the meantime.
Unfortunately i haven't found a fix for this yet, hence this mail.

Has someone of you an idea where i need to look to get it solved?

Kind regards,
Simon

Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 01.05.2008 18:42:52 von Fred Moyer

Simon Bertrang wrote:
> Hi,
> i'm trying to update mp2 but it fails to finish compilation.
> Specifically, it fails at Base64:
> ...
> cp Base64.pm ../../../blib/lib/APR/Base64.pm
> /usr/bin/perl /usr/libdata/perl5/ExtUtils/xsubpp -typemap /usr/libdata/perl5/ExtUtils/typemap -typemap /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/typemap Base64.xs > Base64.xsc && mv Base64.xsc Base64.c
> cc -c -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/src/modules/perl -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/xs -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I/usr/local/include/apache2 -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -I/usr/local/include -DMOD_PERL -DMP_COMPAT_1X -D_POSIX_THREADS -O2 -DVERSION=\"0.009000\" -DXS_VERSION=\"0.009000\" -DPIC -fPIC "-I/usr/libdata/perl5/amd64-openbsd/5.8.8/CORE" -DMP_HAVE_APR_LIBS Base64.c
> In file included from Base64.xs:24:
> /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: error: syntax error before '*' token
> /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: warning: data definition has no type or storage class
> *** Error code 1
>
> Stop in /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/WrapXS/APR/Base64 (line 92 of /usr/share/mk/sys.mk).
> ...
>
> I did a lot of testing with mod_perl-2.0.3 yesterday, so i can at least
> assure that a working environment hasn't changed in the meantime.
> Unfortunately i haven't found a fix for this yet, hence this mail.
>
> Has someone of you an idea where i need to look to get it solved?

Pgollucci found a similar issue with FreeBSD, Gozer posted a patch that
may fix it. Suggest trying out the patch:

http://www.gossamer-threads.com/lists/modperl/dev/97018?sear ch_string=Base64.xsc;#97018

HTH,

Fred

>
> Kind regards,
> Simon


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

Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 01.05.2008 22:20:39 von Simon Bertrang

On Thu, May 01, 2008 at 09:42:52AM -0700, Fred Moyer wrote:
> Simon Bertrang wrote:
>> Hi,
>> i'm trying to update mp2 but it fails to finish compilation.
>> Specifically, it fails at Base64:
>> ...
>> cp Base64.pm ../../../blib/lib/APR/Base64.pm
>> /usr/bin/perl /usr/libdata/perl5/ExtUtils/xsubpp -typemap /usr/libdata/perl5/ExtUtils/typemap -typemap /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/typemap Base64.xs > Base64.xsc && mv Base64.xsc Base64.c
>> cc -c -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/src/modules/perl -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/xs -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I/usr/local/include/apache2 -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -I/usr/local/include -DMOD_PERL -DMP_COMPAT_1X -D_POSIX_THREADS -O2 -DVERSION=\"0.009000\" -DXS_VERSION=\"0.009000\" -DPIC -fPIC "-I/usr/libdata/perl5/amd64-openbsd/5.8.8/CORE" -DMP_HAVE_APR_LIBS Base64.c
>> In file included from Base64.xs:24:
>> /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: error: syntax error before '*' token
>> /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: warning: data definition has no type or storage class
>> *** Error code 1
>>
>> Stop in /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/WrapXS/APR/Base64 (line 92 of /usr/share/mk/sys.mk).
>> ...
>>
>> I did a lot of testing with mod_perl-2.0.3 yesterday, so i can at least
>> assure that a working environment hasn't changed in the meantime.
>> Unfortunately i haven't found a fix for this yet, hence this mail.
>>
>> Has someone of you an idea where i need to look to get it solved?
>
> Pgollucci found a similar issue with FreeBSD, Gozer posted a patch that may
> fix it. Suggest trying out the patch:
>
> http://www.gossamer-threads.com/lists/modperl/dev/97018?sear ch_string=Base64.xsc;#97018
>

Looked promising but unfortunately didn't help; same as before.
And i'm obviously also using the non-threaded version of apr.

But thanks for the pointer anyway.

Rgeards,
Simon

Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 02.05.2008 03:44:36 von Philip Gollucci

Simon Bertrang wrote:
> On Thu, May 01, 2008 at 09:42:52AM -0700, Fred Moyer wrote:
>> Simon Bertrang wrote:
>>> Hi,
>>> i'm trying to update mp2 but it fails to finish compilation.
>>> Specifically, it fails at Base64:
>>> ...
>>> cp Base64.pm ../../../blib/lib/APR/Base64.pm
>>> /usr/bin/perl /usr/libdata/perl5/ExtUtils/xsubpp -typemap /usr/libdata/perl5/ExtUtils/typemap -typemap /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/typemap Base64.xs > Base64.xsc && mv Base64.xsc Base64.c
>>> cc -c -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/src/modules/perl -I/usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl- 2.0.4/xs -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I/usr/local/include/apache2 -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -I/usr/local/include -DMOD_PERL -DMP_COMPAT_1X -D_POSIX_THREADS -O2 -DVERSION=\"0.009000\" -DXS_VERSION=\"0.009000\" -DPIC -fPIC "-I/usr/libdata/perl5/amd64-openbsd/5.8.8/CORE" -DMP_HAVE_APR_LIBS Base64.c
>>> In file included from Base64.xs:24:
>>> /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: error: syntax error before '*' token
>>> /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/xs/modperl_xs_typedefs.h:67: warning: data definition has no type or storage class
>>> *** Error code 1
>>>
>>> Stop in /usr/ports/www/ap2-mod_perl/w-ap2-mod_perl-2.0.4/mod_perl-2. 0.4/WrapXS/APR/Base64 (line 92 of /usr/share/mk/sys.mk).
>>> ...
>>>
>>> I did a lot of testing with mod_perl-2.0.3 yesterday, so i can at least
>>> assure that a working environment hasn't changed in the meantime.
>>> Unfortunately i haven't found a fix for this yet, hence this mail.
>>>
>>> Has someone of you an idea where i need to look to get it solved?
>> Pgollucci found a similar issue with FreeBSD, Gozer posted a patch that may
>> fix it. Suggest trying out the patch:
>>
>> http://www.gossamer-threads.com/lists/modperl/dev/97018?sear ch_string=Base64.xsc;#97018
>>
>
> Looked promising but unfortunately didn't help; same as before.
> And i'm obviously also using the non-threaded version of apr.
>
> But thanks for the pointer anyway.
I haven't gotten to looking at this again yet, but I may give it a spin
tonight/tomorrow.


--
------------------------------------------------------------ ------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 703.336.9354
Consultant / http://p6m7g8.net/Resume/resume.shtml
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.

Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 02.05.2008 22:47:46 von Simon Bertrang

On Fri, May 02, 2008 at 06:38:09PM +0400, Sergey Skvortsov wrote:
> Simon Bertrang wrote:
>>>>
>>>> Has someone of you an idea where i need to look to get it solved?
>>> Pgollucci found a similar issue with FreeBSD, Gozer posted a patch that
>>> may fix it. Suggest trying out the patch:
>>>
>>> http://www.gossamer-threads.com/lists/modperl/dev/97018?sear ch_string=Base64.xsc;#97018
>>>
>>
>> Looked promising but unfortunately didn't help; same as before.
>> And i'm obviously also using the non-threaded version of apr.
>
> Try this patch:
>
> --- src/modules/perl/modperl_apache_compat.h.orig 2008-05-02
> 14:26:52.000000000 +0000
> +++ src/modules/perl/modperl_apache_compat.h 2008-05-02 14:27:06.000000000
> +0000
> @@ -22,6 +22,7 @@
> #if !APR_HAS_THREADS
> typedef unsigned long apr_os_thread_t;
> typedef void * apr_thread_mutex_t;
> +typedef void * apr_thread_rwlock_t;
> #endif
>
> /* back compat adjustements for older Apache versions
>

Yay! That did it.

Test results on OpenBSD/amd64:
All tests successful, 2 tests skipped.
Files=20, Tests=85, 9 wallclock secs ( 6.67 cusr + 1.63 csys = 8.30 CPU)


Thanks a lot
and kind regards

Simon

Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 04.05.2008 00:01:26 von Philip Gollucci

Simon Bertrang wrote:
>> src/modules/perl/modperl_apache_compat.h
>> typedef unsigned long apr_os_thread_t;
>> typedef void * apr_thread_mutex_t;
>> +typedef void * apr_thread_rwlock_t;
>> #endif
Would not it better to just include the appropriate thread file headers
from APR? Also, as you can that typedef is wrong :)

typedef struct apr_thread_rwlock_t apr_thread_rwlock_t;

As an added benefit, you don't have to come remember to add to this
when exposing threaded features.

~/dev/repos/asf/apr/apr/tags/0.9.17/include>
ls -1 apr_thread_*
apr_thread_cond.h
apr_thread_mutex.h
apr_thread_proc.h
apr_thread_rwlock.h

Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 04.05.2008 03:11:22 von Fred Moyer

Philip M. Gollucci wrote:
> Simon Bertrang wrote:
>>> src/modules/perl/modperl_apache_compat.h
>>> typedef unsigned long apr_os_thread_t;
>>> typedef void * apr_thread_mutex_t;
>>> +typedef void * apr_thread_rwlock_t;
>>> #endif
> Would not it better to just include the appropriate thread file headers
> from APR? Also, as you can that typedef is wrong :)

My thread foo isn't that great, but it kind of looks like those typedefs
are deliberately wrong to prevent errors when those variables are
referenced elsewhere.

src/modules/perl/modperl_apache_compat.h
22 #if !APR_HAS_THREADS
23 typedef unsigned long apr_os_thread_t;

My unthreaded build of modperl_xs_typedefs.h file contains definitions
to apr_thread_mutex_t and apr_thread_rwlock_t when it seems like it
shouldn't since my build isn't threaded; maybe this is an issue in
lib/ModPerl/WrapXS.pm?

> typedef struct apr_thread_rwlock_t apr_thread_rwlock_t;
>
> As an added benefit, you don't have to come remember to add to this
> when exposing threaded features.
>
> ~/dev/repos/asf/apr/apr/tags/0.9.17/include>
> ls -1 apr_thread_*
> apr_thread_cond.h
> apr_thread_mutex.h
> apr_thread_proc.h
> apr_thread_rwlock.h
>

Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

am 09.05.2008 01:51:48 von Philip Gollucci

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simon Bertrang wrote:
|> +typedef void * apr_thread_rwlock_t;
and
+ if ($path =~ m/(Thread|Global)(Mutex|RWLock)/) {
~From gozer

Committed and verified as working.
http://svn.apache.org/viewvc?rev=654655&view=rev

WOOT!


- --
- ------------------------------------------------------------ ------------
Philip M. Gollucci (philip@ridecharge.com)
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFII5IUdbiP+9ubjBwRAoUaAJ9jTUIISasa2secwA1sat/TPVCMzwCf Sdi7
h2wLYfLETPU579sV8Gk9qYg=
=g2fr
-----END PGP SIGNATURE-----