develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [david@davidfavor.com: Building ExtUtils-ParseXS-2.05 badly broken]

Thread Previous | Thread Next
From:
Ken Williams
Date:
October 30, 2003 21:01
Subject:
Re: [david@davidfavor.com: Building ExtUtils-ParseXS-2.05 badly broken]
Message ID:
211131E2-0B5F-11D8-9A36-003065F6D85A@mathforum.org

On Thursday, October 30, 2003, at 11:27  AM, David Favor wrote:

> Ken Williams wrote:
>> On Thu, Oct 30, 2003 at 10:11:34AM -0600, David Favor wrote:
>>> The real problem still persists though. Should there be something in 
>>> the
>>> hints/aix.sh file to fix this once and for all?
>> Yes, I think there should.  Another user reported this same problem on
>> a different module, so it's not just ExtUtils::ParseXS.
>
> Thought so.
>
>>> Fixing $PERL_INC seems easy, however $BASEEXT seems to be set 
>>> differently
>>> for each module, or maybe I misunderstand.
>> Yeah - what does the "-bE:$(BASEEXT).exp" switch do, anyway?  Can it
>> be replaced with something else?  I don't really know the AIX linker's
>> switches.
>
> -bI:foo.exp - does symbol imports (read foo.exp)
> -bE:foo.exp - does symbol exports (write foo.exp)
>
> The foo.exp files are a list of symbols matching entry points in shared
> libraries. This is AIX's way of linking with shared objects. There's a
> long history of why this is as it is. To long for here... :-)
>
> I've tried several incantations. No joy getting it to work.


Maybe try this patch?  Sorry in advance for the line breakage.

  -Ken


Index: t/basic.t
===================================================================
RCS file: 
/Users/ken/src/CVS-repository/modules/ExtUtils-ParseXS/t/basic.t,v
retrieving revision 1.9
diff -u -r1.9 basic.t
--- basic.t	2003/08/16 22:51:59	1.9
+++ basic.t	2003/10/31 04:59:18
@@ -21,6 +21,7 @@
  my $MSVC  = $Is_MSWin32 && $Config{cc} =~ /cl(\.exe)?$/;
  my $MinGW = $Is_MSWin32 && $Config{cc} =~ /gcc(\.exe)?$/;
  my $Cygwin = $^O eq 'cygwin';
+my $AIX = $^O eq 'aix';

  #########################

@@ -98,6 +99,7 @@
    my $libs      = $Config{libs};
    my $lddlflags = $Config{lddlflags};
    my $ld_out    = '-o ';
+  my $ld        = $Config{ld};

    if ( $Is_MSWin32 or $Cygwin ) {
      require ExtUtils::Mksymlists;
@@ -118,17 +120,20 @@
        (my $libperl = $Config{libperl}) =~ s/^(?:lib)?([^.]+).*$/$1/;
        $libs        = "-l$libperl $libs";
        do_system("dlltool --def $module.def --output-exp $module.exp");
-      do_system("$Config{ld} $lddlflags -Wl,--base-file 
-Wl,$module.base $objs $ld_out$module_lib $libs $module.exp");
+      do_system("$ld $lddlflags -Wl,--base-file -Wl,$module.base $objs 
$ld_out$module_lib $libs $module.exp");
        do_system("dlltool --def $module.def --output-exp $module.exp 
--base-file $module.base");
        $module_def  = "$module.exp";
      } elsif ( $Cygwin ) { # MinGW GCC
        (my $libperl = $Config{libperl}) =~ s/^(?:lib)?([^.]+).*$/$1/;
        $libs        = "-L$Config{archlibexp}/CORE -l$libperl $libs";
-      do_system("$Config{shrpenv} $Config{ld} $lddlflags 
-Wl,--base-file -Wl,$module.base $objs $ld_out$module_lib $libs");
+      do_system("$Config{shrpenv} $ld $lddlflags -Wl,--base-file 
-Wl,$module.base $objs $ld_out$module_lib $libs");
+    } elsif ( $AIX ) {
+      $ld =~ s{\$\(BASEEXT\)} {XSTest}g;
+      $ld =~ s{\$\(PERL_INC\)}{$Config{perl_archlib}/CORE}g;
      }
    }

-  return !do_system("$Config{shrpenv} $Config{ld} $lddlflags $objs 
$ld_out$module_lib $libs $module_def");
+  return !do_system("$Config{shrpenv} $ld $lddlflags $objs 
$ld_out$module_lib $libs $module_def");
  }

  sub do_system {


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About