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

[prev] [thread] [next] [Date index for 2004/12/15]

From: Philippe M. Chiasson
Subject: Re: cc: Error: modperl_exports.c under Tru64 Unix
Date: 00:35 on 15 Dec 2004
--------------enigF45AA1F342A3C22AD7EDA289
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------enigF45AA1F342A3C22AD7EDA289
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBv4bVyzKhB4jDpaURAr6ZAJ9adUFJkglz4KjuHdi7/JAlbGUrHgCfYWjF
yDoJ1bUfUfKGe8tQJw6X8pI=
=AazV
-----END PGP SIGNATURE-----

--------------enigF45AA1F342A3C22AD7EDA289--

(message missing)

cc: Error: modperl_exports.c under Tru64 Unix
sdfgsd sergserg 17:16 on 13 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
Philippe M. Chiasson 21:51 on 14 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
Philippe M. Chiasson 00:35 on 15 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
Philippe M. Chiasson 01:33 on 15 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
sdfgsd sergserg 07:56 on 14 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
sdfgsd sergserg 14:34 on 15 Dec 2004

Generated at 11:27 on 21 Dec 2004 by mariachi v0.52