Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

[mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


janus at errornet

May 1, 2008, 4:06 AM

Post #1 of 8 (692 views)
Permalink
[mp2] compilation errors with mod_perl-2.0.4 on OpenBSD

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


fred at redhotpenguin

May 1, 2008, 9:42 AM

Post #2 of 8 (667 views)
Permalink
Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD [In reply to]

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?search_string=Base64.xsc;#97018

HTH,

Fred

>
> Kind regards,
> Simon


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


janus at errornet

May 1, 2008, 1:20 PM

Post #3 of 8 (662 views)
Permalink
Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD [In reply to]

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?search_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


pgollucci at p6m7g8

May 1, 2008, 6:44 PM

Post #4 of 8 (658 views)
Permalink
Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD [In reply to]

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?search_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[at]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.


janus at errornet

May 2, 2008, 1:47 PM

Post #5 of 8 (646 views)
Permalink
Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD [In reply to]

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?search_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


pgollucci at p6m7g8

May 3, 2008, 3:01 PM

Post #6 of 8 (627 views)
Permalink
Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD [In reply to]

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


fred at redhotpenguin

May 3, 2008, 6:11 PM

Post #7 of 8 (623 views)
Permalink
Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD [In reply to]

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
>


pgollucci at p6m7g8

May 8, 2008, 4:51 PM

Post #8 of 8 (528 views)
Permalink
Re: [mp2] compilation errors with mod_perl-2.0.4 on OpenBSD [In reply to]

-----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[at]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/TPVCMzwCfSdi7
h2wLYfLETPU579sV8Gk9qYg=
=g2fr
-----END PGP SIGNATURE-----

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.