You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by sdfgsd sergserg <do...@abv.bg> on 2004/12/13 18:16:46 UTC

cc: Error: modperl_exports.c under Tru64 Unix

Tried to compile RC1 under HP Tru64 Unix 4.0g(JAVA) AS1200 2@533MHz (ev56)

(Static build, because I think Tru64 doesn't support dynamic loading)
First I ran:

perl Makefile.PL MP_USE_STATIC=1 \
    MP_AP_PREFIX=/house/doink123/httpd-2.0.52 \
    MP_AP_CONFIGURE="--with-mpm=prefork --prefix=/house/doink123/ap_tru64_4g"


But I got this error:




then I ran:
perl Makefile.PL MP_USE_STATIC=1 \
    MP_AP_PREFIX=/house/doink123/httpd-2.0.52 \
    MP_AP_CONFIGURE="--with-mpm=prefork"

and this phase completed successfully. The error came when I ran make.

cc -I/house/doink123/mod_perl-2.0.0-RC1/src/modules/perl -I/house/doink123/mod_perl-2.0.0-RC1/xs -I/house/doink123/httpd-2.0.52/include -I/house/doink123/httpd-2.0.52/srclib/apr/include -I/house/doink123/httpd-2.0.52/srclib/apr-util/include -I/house/doink123/httpd-2.0.52/os/unix -std -fprm d -ieee -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C -I/usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE -DMOD_PERL -DMP_COMPAT_1X -O4 -c modperl_xsinit.c
cc -I/house/doink123/mod_perl-2.0.0-RC1/src/modules/perl -I/house/doink123/mod_perl-2.0.0-RC1/xs -I/house/doink123/httpd-2.0.52/include -I/house/doink123/httpd-2.0.52/srclib/apr/include -I/house/doink123/httpd-2.0.52/srclib/apr-util/include -I/house/doink123/httpd-2.0.52/os/unix -std -fprm d -ieee -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C -I/usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE -DMOD_PERL -DMP_COMPAT_1X -O4 -c modperl_exports.c
cc: Warning: /usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE/config.h, line 41: The redefinition of the macro "__attribute__" conflicts with a current definition because the spelling of one or more parameters is different.  The redefinition is now in effect. (macroredef)
#define __attribute__(_arg_)
----------------------^
cc: Warning: /usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE/perl.h, line 23: The redefinition of the macro "VOIDUSED" conflicts with a current definition because the replacement lists differ.  The redefinition is now in effect. (macroredef)
#define VOIDUSED 1
-----------------^
cc: Error: modperl_exports.c, line 195: In the initializer for modperl_hack_io_apache_init, "modperl_io_apache_init" is not declared. (undeclared)
const void *modperl_hack_io_apache_init = (const void *)modperl_io_apache_init;
--------------------------------------------------------^
*** Exit 1
Stop.
*** Exit 1
Stop.



-----------------------------------------------------------------
Известяване за получено писмо - http://promo.abv.bg/

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
> 
>>Philippe M. Chiasson wrote:
>>
>>>There is already support in the modperl_exports.c generation code to 
>>>exclude
>>>certain functions depending on build options. So in summary, if we just
>>>excluded modperl_io_apache_init() from modperl_exports.c when PERLIO is 
>>>absent,
>>>we would be good ? Or is there other modperl_perlio_ or modperl_io_ symbols
>>>we should also skip ? 
>>
>>I'd prefer to see a generic solution, w/o needing to do that manually 
>>every time a new function is added. So if the trick suggested by Joe 
>>works, then we should better use it IMHO.
> 
> Sadly, we've explored that path before, and it turns out that it's nearly
> impossible. See lib/ModPerl/WrapXS.pm for all the export_file_* foo.
> 
> One way or another, at least for win32 folks, we will always need to generate
> similar files, with exclusions based on various perl options. So it's not a
> terrible thing IMO to keep continuing that way.
> 
>>>In any case, I've got the code ready to exclude things when under 
>>>PERLIO, I just
>>>want to confirm what we need to exclude. And unless I am wrong, this 
>>>should also
>>>have been a problem to people in the win32 land as well, no ?
>>
>>No. Just try to build mp2 with 5.6.1 on linux and you will see what we are 
>>talking about.

After talking about this over with stas in irc-land, I've come to the conclusion
that Joe's suggestion in the long run might prove to be a much better solution,
and could even simplify things in the win32 world. So without further delay,
here is the patch. (It does fix the modperl_io_apache_init() problem by itself,
but other similar #ifdefed functions can now be worked on and removed from the
exception cases in lib/ModPerl/WrapXS.pm:$ithreads_exports)

Index: lib/ModPerl/WrapXS.pm
===================================================================
--- lib/ModPerl/WrapXS.pm       (revision 111876)
+++ lib/ModPerl/WrapXS.pm       (working copy)
@@ -1302,7 +1302,12 @@
              next if $entry->{name} =~ /^($ithreads_exports)/;
          }
          ( my $name ) = $entry->{name} =~ /^modperl_(.*)/;
-        print $fh "const void *modperl_hack_$name = (const void *)modperl_$name;\n";
+        print $fh <<"EOF";
+#ifndef modperl_$name
+const void *modperl_hack_$name = (const void *)modperl_$name;
+#endif
+
+EOF
      }
  }

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> 
> 
>>There is already support in the modperl_exports.c generation code to 
>>exclude
>>certain functions depending on build options. So in summary, if we just
>>excluded modperl_io_apache_init() from modperl_exports.c when PERLIO is 
>>absent,
>>we would be good ? Or is there other modperl_perlio_ or modperl_io_ symbols
>>we should also skip ? 
> 
> I'd prefer to see a generic solution, w/o needing to do that manually 
> every time a new function is added. So if the trick suggested by Joe 
> works, then we should better use it IMHO.

Sadly, we've explored that path before, and it turns out that it's nearly
impossible. See lib/ModPerl/WrapXS.pm for all the export_file_* foo.

One way or another, at least for win32 folks, we will always need to generate
similar files, with exclusions based on various perl options. So it's not a
terrible thing IMO to keep continuing that way.

>>In any case, I've got the code ready to exclude things when under 
>>PERLIO, I just
>>want to confirm what we need to exclude. And unless I am wrong, this 
>>should also
>>have been a problem to people in the win32 land as well, no ?
> 
> No. Just try to build mp2 with 5.6.1 on linux and you will see what we are 
> talking about.

Yup, just tried and was able to reproduce the problem identically.

Index: lib/ModPerl/WrapXS.pm
===================================================================
--- lib/ModPerl/WrapXS.pm       (revision 111876)
+++ lib/ModPerl/WrapXS.pm       (working copy)
@@ -1196,6 +1196,10 @@
  modperl_mgv_require_module$
  };

+my $perlio_exports = join '|', qw{
+modperl_io_apache_init$
+};
+
  sub export_func_handle {
      my($self, $entry, $handles) = @_;

@@ -1301,6 +1305,9 @@
          unless (Apache::Build::PERL_HAS_ITHREADS) {
              next if $entry->{name} =~ /^($ithreads_exports)/;
          }
+        unless (Apache::Build::PERL_HAS_PERLIO) {
+            next if $entry->{name} =~ /^($perlio_exports)/;
+        }
          ( my $name ) = $entry->{name} =~ /^modperl_(.*)/;
          print $fh "const void *modperl_hack_$name = (const void *)modperl_$name;\n";
      }

Index: lib/Apache/Build.pm
===================================================================
--- lib/Apache/Build.pm (revision 111876)
+++ lib/Apache/Build.pm (working copy)
@@ -37,6 +37,8 @@
  use constant REQUIRE_ITHREADS => grep { $^O eq $_ } qw(MSWin32);
  use constant PERL_HAS_ITHREADS =>
      $Config{useithreads} && ($Config{useithreads} eq 'define');
+use constant PERL_HAS_PERLIO =>
+    $Config{useperlio} && ($Config{useperlio} eq 'define');
  use constant BUILD_APREXT => WIN32();

  use ModPerl::Code ();


--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:

> There is already support in the modperl_exports.c generation code to 
> exclude
> certain functions depending on build options. So in summary, if we just
> excluded modperl_io_apache_init() from modperl_exports.c when PERLIO is 
> absent,
> we would be good ? Or is there other modperl_perlio_ or modperl_io_ symbols
> we should also skip ?

I'd prefer to see a generic solution, w/o needing to do that manually 
every time a new function is added. So if the trick suggested by Joe 
works, then we should better use it IMHO.

> In any case, I've got the code ready to exclude things when under 
> PERLIO, I just
> want to confirm what we need to exclude. And unless I am wrong, this 
> should also
> have been a problem to people in the win32 land as well, no ?

No. Just try to build mp2 with 5.6.1 on linux and you will see what we are 
talking about.

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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:
> Joe Orton wrote:
> 
>>On Mon, Dec 13, 2004 at 08:12:19PM -0500, Stas Bekman wrote:
>>
>>>In fact we already somewhat handle that in modperl_io_apache.h
>>>
>>>#ifdef PERLIO_LAYERS
>>>[...]
>>>MP_INLINE void modperl_io_apache_init(pTHX);
>>>
>>>#else /* #ifdef PERLIO_LAYERS */
>>>
>>>#define modperl_io_apache_init(pTHX)
>>
>>>but for some reason define doesn't do the trick, when it gets to do:
>>>
>>> const void *modperl_hack_io_apache_init =
>>>    (const void *)modperl_io_apache_init;
>>
>>The C preprocessor won't expand a parameterized macro unless it's called
>>with parameters:
>>
>>$ cpp
>>#define foo(bar) bar
>>foo(norman)
>>foo blah
>># 1 "<stdin>"
>># 1 "<built-in>"
>># 1 "<command line>"
>># 1 "<stdin>"
>>
>>norman
>>foo blah
> 
> Thanks Joe. So what kind of hack of the hack can we use here? I suppose 
> that even if it did expand it, there would have been a problem since we have:
> 
>    #define modperl_io_apache_init(pTHX)
> 
> so it expands to nothing. Of course the right solution is to never include 
> this in the autogenerated modperl_exports.c but this will require C 
> parsing with some messy sed like Apache/APR do. Is there some other 
> solution for this kind of functions?

There is already support in the modperl_exports.c generation code to exclude
certain functions depending on build options. So in summary, if we just
excluded modperl_io_apache_init() from modperl_exports.c when PERLIO is absent,
we would be good ? Or is there other modperl_perlio_ or modperl_io_ symbols
we should also skip ?

In any case, I've got the code ready to exclude things when under PERLIO, I just
want to confirm what we need to exclude. And unless I am wrong, this should also
have been a problem to people in the win32 land as well, no ?

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
Joe Orton wrote:
> On Tue, Dec 14, 2004 at 03:24:30PM -0500, Stas Bekman wrote:
> 
>>Joe Orton wrote:
>>
>>>Just make the generated export stub code #ifndef'ed?
>>>
>>>#ifndef modperl_io_apache_init
>>>const void *modperl_hack_io_apache_init = (const void 
>>>*)modperl_io_apache_init;
>>>#endif
>>>
>>>if the symbol is a macro then there's no point in generating a stub for
>>>it anyway...
>>
>>It's not a macro normally, it's a macro only on certain setups. Here it is again:
>>
>>#ifdef PERLIO_LAYERS
>>MP_INLINE void modperl_io_apache_init(pTHX);
>>#else
>>#define        modperl_io_apache_init(pTHX)
>>#endif
>>
>>So that trick of #ifndef, won't work when PERLIO_LAYERS is not defined, 
>>right? Since modperl_io_apache_init is always defined but something it's a 
>>real symbols at other times it's a macro to keep some compilers happy.
> 
> 
> I'm not sure what you're asking; the preprecessor doesn't know about C
> function declarations, it only cares about preprocessor directives.  In
> the above case, the CPP macro "modperl_io_apache_init" is only defined
> in the case that PERLIO_LAYERS is not defined.  So the fragment:
> 
> #ifndef modperl_io_apache_init
> const void *modperl_hack_io_apache_init = (const void*)modperl_io_apache_init;
> #endif
> 
> only expands in the case that PERLIO_LAYERS *is* defined, which is the 
> desired outcome, right?

I think so. I wasn't aware that that preprocessor won't see C function 
declaration.


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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Dec 14, 2004 at 03:24:30PM -0500, Stas Bekman wrote:
> Joe Orton wrote:
> >Just make the generated export stub code #ifndef'ed?
> >
> >#ifndef modperl_io_apache_init
> >const void *modperl_hack_io_apache_init = (const void 
> >*)modperl_io_apache_init;
> >#endif
> >
> >if the symbol is a macro then there's no point in generating a stub for
> >it anyway...
> 
> It's not a macro normally, it's a macro only on certain setups. Here it is again:
> 
> #ifdef PERLIO_LAYERS
> MP_INLINE void modperl_io_apache_init(pTHX);
> #else
> #define        modperl_io_apache_init(pTHX)
> #endif
> 
> So that trick of #ifndef, won't work when PERLIO_LAYERS is not defined, 
> right? Since modperl_io_apache_init is always defined but something it's a 
> real symbols at other times it's a macro to keep some compilers happy.

I'm not sure what you're asking; the preprecessor doesn't know about C
function declarations, it only cares about preprocessor directives.  In
the above case, the CPP macro "modperl_io_apache_init" is only defined
in the case that PERLIO_LAYERS is not defined.  So the fragment:

#ifndef modperl_io_apache_init
const void *modperl_hack_io_apache_init = (const void*)modperl_io_apache_init;
#endif

only expands in the case that PERLIO_LAYERS *is* defined, which is the 
desired outcome, right?

joe

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
Joe Orton wrote:
[...]
>>Thanks Joe. So what kind of hack of the hack can we use here? I suppose 
>>that even if it did expand it, there would have been a problem since we 
>>have:
>>
>>  #define modperl_io_apache_init(pTHX)
>>
>>so it expands to nothing. Of course the right solution is to never include 
>>this in the autogenerated modperl_exports.c but this will require C 
>>parsing with some messy sed like Apache/APR do. Is there some other 
>>solution for this kind of functions?
> 
> 
> Just make the generated export stub code #ifndef'ed?
> 
> #ifndef modperl_io_apache_init
> const void *modperl_hack_io_apache_init = (const void *)modperl_io_apache_init;
> #endif
> 
> if the symbol is a macro then there's no point in generating a stub for
> it anyway...

It's not a macro normally, it's a macro only on certain setups. Here it is 
again:

#ifdef PERLIO_LAYERS
MP_INLINE void modperl_io_apache_init(pTHX);
#else
#define        modperl_io_apache_init(pTHX)
#endif

So that trick of #ifndef, won't work when PERLIO_LAYERS is not defined, 
right? Since modperl_io_apache_init is always defined but something it's a 
real symbols at other times it's a macro to keep some compilers happy.

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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Dec 14, 2004 at 10:27:03AM -0500, Stas Bekman wrote:
> Joe Orton wrote:
> >On Mon, Dec 13, 2004 at 08:12:19PM -0500, Stas Bekman wrote:
> >
> >>In fact we already somewhat handle that in modperl_io_apache.h
> >>
> >>
> >>
> >>#ifdef PERLIO_LAYERS
> >>[...]
> >>MP_INLINE void modperl_io_apache_init(pTHX);
> >>
> >>#else /* #ifdef PERLIO_LAYERS */
> >>
> >>#define modperl_io_apache_init(pTHX)
> >
> >
> >>
> >>but for some reason define doesn't do the trick, when it gets to do:
> >>
> >> const void *modperl_hack_io_apache_init =
> >>    (const void *)modperl_io_apache_init;
> >
> >
> >The C preprocessor won't expand a parameterized macro unless it's called
> >with parameters:
> >
> >$ cpp
> >#define foo(bar) bar
> >foo(norman)
> >foo blah
> ># 1 "<stdin>"
> ># 1 "<built-in>"
> ># 1 "<command line>"
> ># 1 "<stdin>"
> >
> >norman
> >foo blah
> 
> Thanks Joe. So what kind of hack of the hack can we use here? I suppose 
> that even if it did expand it, there would have been a problem since we 
> have:
> 
>   #define modperl_io_apache_init(pTHX)
> 
> so it expands to nothing. Of course the right solution is to never include 
> this in the autogenerated modperl_exports.c but this will require C 
> parsing with some messy sed like Apache/APR do. Is there some other 
> solution for this kind of functions?

Just make the generated export stub code #ifndef'ed?

#ifndef modperl_io_apache_init
const void *modperl_hack_io_apache_init = (const void *)modperl_io_apache_init;
#endif

if the symbol is a macro then there's no point in generating a stub for
it anyway...

joe

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
Joe Orton wrote:
> On Mon, Dec 13, 2004 at 08:12:19PM -0500, Stas Bekman wrote:
> 
>>In fact we already somewhat handle that in modperl_io_apache.h
>>
>>
>>
>>#ifdef PERLIO_LAYERS
>>[...]
>>MP_INLINE void modperl_io_apache_init(pTHX);
>>
>>#else /* #ifdef PERLIO_LAYERS */
>>
>>#define modperl_io_apache_init(pTHX)
> 
> 
>>
>>but for some reason define doesn't do the trick, when it gets to do:
>>
>>  const void *modperl_hack_io_apache_init =
>>     (const void *)modperl_io_apache_init;
> 
> 
> The C preprocessor won't expand a parameterized macro unless it's called
> with parameters:
> 
> $ cpp
> #define foo(bar) bar
> foo(norman)
> foo blah
> # 1 "<stdin>"
> # 1 "<built-in>"
> # 1 "<command line>"
> # 1 "<stdin>"
> 
> norman
> foo blah

Thanks Joe. So what kind of hack of the hack can we use here? I suppose 
that even if it did expand it, there would have been a problem since we have:

   #define modperl_io_apache_init(pTHX)

so it expands to nothing. Of course the right solution is to never include 
this in the autogenerated modperl_exports.c but this will require C 
parsing with some messy sed like Apache/APR do. Is there some other 
solution for this kind of functions?

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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Joe Orton <jo...@redhat.com>.
On Mon, Dec 13, 2004 at 08:12:19PM -0500, Stas Bekman wrote:
> In fact we already somewhat handle that in modperl_io_apache.h
> 
> 
> 
> #ifdef PERLIO_LAYERS
> [...]
> MP_INLINE void modperl_io_apache_init(pTHX);
> 
> #else /* #ifdef PERLIO_LAYERS */
> 
> #define modperl_io_apache_init(pTHX)

> 
> 
> but for some reason define doesn't do the trick, when it gets to do:
> 
>   const void *modperl_hack_io_apache_init =
>      (const void *)modperl_io_apache_init;

The C preprocessor won't expand a parameterized macro unless it's called
with parameters:

$ cpp
#define foo(bar) bar
foo(norman)
foo blah
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"

norman
foo blah



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Stas Bekman wrote:
> 
>>> cc: Error: modperl_exports.c, line 195: In the initializer for 
>>> modperl_hack_io_apache_init, "modperl_io_apache_init" is not 
>>> declared. (undeclared)
>>> const void *modperl_hack_io_apache_init = (const void 
>>> *)modperl_io_apache_init;
>>
>>
>>
>> modperl_exports.c starts with:
>> #include "mod_perl.h"
>>
>> which includes
>>
>> #include "modperl_io_apache.h"
>>
>> which declares:
>>
>> MP_INLINE void modperl_io_apache_init(pTHX);
>>
>> though it's #ifdef'ed with:
>>
>> #ifdef PERLIO_LAYERS
>>
>> so that means that modperl_exports.c shouldn't include those symbols.
>>
>> I suppose that we simply didn't test static builds with 5.6.x perls, 
>> and hence have missed this problem. let me try that first to see if I 
>> can reproduce that.
> 
> 
> yes, i can confirm that it breaks with 5.6.1 (anywhere), which doesn't 
> have PERLIO_LAYERS defined. Philippe? looks like with should either cut 
> on 5.8.0 for static builds, or starting parsing the C code :( I think we 
> will have to go with the latter, since PERLIO_LAYERS might be not 
> defined with 5.8.x too.

In fact we already somewhat handle that in modperl_io_apache.h



#ifdef PERLIO_LAYERS
[...]
MP_INLINE void modperl_io_apache_init(pTHX);

#else /* #ifdef PERLIO_LAYERS */

#define modperl_io_apache_init(pTHX)

#endif /* #ifdef PERLIO_LAYERS */



but for some reason define doesn't do the trick, when it gets to do:

   const void *modperl_hack_io_apache_init =
      (const void *)modperl_io_apache_init;

should it be some magic VOID thing?

#define modperl_io_apache_init(pTHX) VOID

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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:

>> cc: Error: modperl_exports.c, line 195: In the initializer for 
>> modperl_hack_io_apache_init, "modperl_io_apache_init" is not declared. 
>> (undeclared)
>> const void *modperl_hack_io_apache_init = (const void 
>> *)modperl_io_apache_init;
> 
> 
> modperl_exports.c starts with:
> #include "mod_perl.h"
> 
> which includes
> 
> #include "modperl_io_apache.h"
> 
> which declares:
> 
> MP_INLINE void modperl_io_apache_init(pTHX);
> 
> though it's #ifdef'ed with:
> 
> #ifdef PERLIO_LAYERS
> 
> so that means that modperl_exports.c shouldn't include those symbols.
> 
> I suppose that we simply didn't test static builds with 5.6.x perls, and 
> hence have missed this problem. let me try that first to see if I can 
> reproduce that.

yes, i can confirm that it breaks with 5.6.1 (anywhere), which doesn't 
have PERLIO_LAYERS defined. Philippe? looks like with should either cut on 
5.8.0 for static builds, or starting parsing the C code :( I think we will 
have to go with the latter, since PERLIO_LAYERS might be not defined with 
5.8.x too.

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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> sdfgsd sergserg wrote:
> 
>> Tried to compile RC1 under HP Tru64 Unix 4.0g(JAVA) AS1200 2@533MHz 
>> (ev56)
>>
>> (Static build, because I think Tru64 doesn't support dynamic loading)
>> First I ran:
>>
>> perl Makefile.PL MP_USE_STATIC=1 \
>>     MP_AP_PREFIX=/house/doink123/httpd-2.0.52 \
>>     MP_AP_CONFIGURE="--with-mpm=prefork 
>> --prefix=/house/doink123/ap_tru64_4g"
>>
>>
>> But I got this error:
>>
>>
>>
>>
>> then I ran:
>> perl Makefile.PL MP_USE_STATIC=1 \
>>     MP_AP_PREFIX=/house/doink123/httpd-2.0.52 \
>>     MP_AP_CONFIGURE="--with-mpm=prefork"
>>
>> and this phase completed successfully. The error came when I ran make.
>>
>> cc -I/house/doink123/mod_perl-2.0.0-RC1/src/modules/perl 
>> -I/house/doink123/mod_perl-2.0.0-RC1/xs 
>> -I/house/doink123/httpd-2.0.52/include 
>> -I/house/doink123/httpd-2.0.52/srclib/apr/include 
>> -I/house/doink123/httpd-2.0.52/srclib/apr-util/include 
>> -I/house/doink123/httpd-2.0.52/os/unix -std -fprm d -ieee 
>> -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C 
>> -I/usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE -DMOD_PERL 
>> -DMP_COMPAT_1X -O4 -c modperl_xsinit.c
>> cc -I/house/doink123/mod_perl-2.0.0-RC1/src/modules/perl 
>> -I/house/doink123/mod_perl-2.0.0-RC1/xs 
>> -I/house/doink123/httpd-2.0.52/include 
>> -I/house/doink123/httpd-2.0.52/srclib/apr/include 
>> -I/house/doink123/httpd-2.0.52/srclib/apr-util/include 
>> -I/house/doink123/httpd-2.0.52/os/unix -std -fprm d -ieee 
>> -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C 
>> -I/usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE -DMOD_PERL 
>> -DMP_COMPAT_1X -O4 -c modperl_exports.c
>> cc: Warning: /usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE/config.h, 
>> line 41: The redefinition of the macro "__attribute__" conflicts with 
>> a current definition because the spelling of one or more parameters is 
>> different.  The redefinition is now in effect. (macroredef)
>> #define __attribute__(_arg_)
>> ----------------------^
>> cc: Warning: /usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE/perl.h, 
>> line 23: The redefinition of the macro "VOIDUSED" conflicts with a 
>> current definition because the replacement lists differ.  The 
>> redefinition is now in effect. (macroredef)
>> #define VOIDUSED 1
>> -----------------^
> 
> 
> those are 5.6.1 issues, fixed in 5.8.x, but they are just warnings.
> 
>> cc: Error: modperl_exports.c, line 195: In the initializer for 
>> modperl_hack_io_apache_init, "modperl_io_apache_init" is not declared. 
>> (undeclared)
>> const void *modperl_hack_io_apache_init = (const void 
>> *)modperl_io_apache_init;

So this problem was fixed in the latest svn. Please verify that it works 
for you, sdfgsd

http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution

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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: cc: Error: modperl_exports.c under Tru64 Unix

Posted by Stas Bekman <st...@stason.org>.
sdfgsd sergserg wrote:
> Tried to compile RC1 under HP Tru64 Unix 4.0g(JAVA) AS1200 2@533MHz (ev56)
> 
> (Static build, because I think Tru64 doesn't support dynamic loading)
> First I ran:
> 
> perl Makefile.PL MP_USE_STATIC=1 \
>     MP_AP_PREFIX=/house/doink123/httpd-2.0.52 \
>     MP_AP_CONFIGURE="--with-mpm=prefork --prefix=/house/doink123/ap_tru64_4g"
> 
> 
> But I got this error:
> 
> 
> 
> 
> then I ran:
> perl Makefile.PL MP_USE_STATIC=1 \
>     MP_AP_PREFIX=/house/doink123/httpd-2.0.52 \
>     MP_AP_CONFIGURE="--with-mpm=prefork"
> 
> and this phase completed successfully. The error came when I ran make.
> 
> cc -I/house/doink123/mod_perl-2.0.0-RC1/src/modules/perl -I/house/doink123/mod_perl-2.0.0-RC1/xs -I/house/doink123/httpd-2.0.52/include -I/house/doink123/httpd-2.0.52/srclib/apr/include -I/house/doink123/httpd-2.0.52/srclib/apr-util/include -I/house/doink123/httpd-2.0.52/os/unix -std -fprm d -ieee -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C -I/usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE -DMOD_PERL -DMP_COMPAT_1X -O4 -c modperl_xsinit.c
> cc -I/house/doink123/mod_perl-2.0.0-RC1/src/modules/perl -I/house/doink123/mod_perl-2.0.0-RC1/xs -I/house/doink123/httpd-2.0.52/include -I/house/doink123/httpd-2.0.52/srclib/apr/include -I/house/doink123/httpd-2.0.52/srclib/apr-util/include -I/house/doink123/httpd-2.0.52/os/unix -std -fprm d -ieee -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C -I/usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE -DMOD_PERL -DMP_COMPAT_1X -O4 -c modperl_exports.c
> cc: Warning: /usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE/config.h, line 41: The redefinition of the macro "__attribute__" conflicts with a current definition because the spelling of one or more parameters is different.  The redefinition is now in effect. (macroredef)
> #define __attribute__(_arg_)
> ----------------------^
> cc: Warning: /usr/local/lib/perl5/5.6.1/alpha-dec_osf/CORE/perl.h, line 23: The redefinition of the macro "VOIDUSED" conflicts with a current definition because the replacement lists differ.  The redefinition is now in effect. (macroredef)
> #define VOIDUSED 1
> -----------------^

those are 5.6.1 issues, fixed in 5.8.x, but they are just warnings.

> cc: Error: modperl_exports.c, line 195: In the initializer for modperl_hack_io_apache_init, "modperl_io_apache_init" is not declared. (undeclared)
> const void *modperl_hack_io_apache_init = (const void *)modperl_io_apache_init;

modperl_exports.c starts with:
#include "mod_perl.h"

which includes

#include "modperl_io_apache.h"

which declares:

MP_INLINE void modperl_io_apache_init(pTHX);

though it's #ifdef'ed with:

#ifdef PERLIO_LAYERS

so that means that modperl_exports.c shouldn't include those symbols.

I suppose that we simply didn't test static builds with 5.6.x perls, and 
hence have missed this problem. let me try that first to see if I can 
reproduce that.

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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html