Re: [Module::Build] Problem building XS modules on AIX
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-11-28 20:25:28
|
On Tuesday, November 18, 2003, at 08:08 PM, Randy W. Sims wrote:
> +sub prelink_c {
> + my ($self, $to, $file_base) = @_;
> + my ($p, $args) = ($self->{properties}, $self->{args});
> +
> + return unless grep $^O, qw(aix MacOS MSWin32 os2 VMS);
> +
I think you meant
return unless grep {$^O eq $_} qw(aix MacOS MSWin32 os2 VMS);
But I'm going to change it to add a need_prelink_c() method, default 0
in the base class and overridden as needed.
> + $file_base =~ tr/"//d; # remove any quotes
> + my $basename = File::Basename::basename($file_base);
> +
> + print "ExtUtils::Mksymlists::Mksymlists('$file_base')\n";
> +
> + require ExtUtils::Mksymlists;
> + ExtUtils::Mksymlists::Mksymlists( # dl. abbrev for dynamic library
> + NAME => $args->{dl_name} || $p->{module_name},
> + DLBASE => $args->{dl_base} || $basename,
> + DL_VARS => $args->{dl_vars} || [],
> + DL_FUNCS => $args->{dl_funcs} || {},
> + FUNCLIST => $args->{dl_func_list} || [],
> + IMPORTS => $args->{dl_imports} || {},
> + FILE => $file_base,
> + );
Seems like a lot of parameters, and the parameter space is getting a
bit crowded, but I don't feel like devising anything better right now
either.
> +sub link_c {
> + my ($self, $to, $file_base) = @_;
> + my $cf = $self->{config};
> +
> + $file_base =~ tr/"//d; # remove any quotes
> + my $perl_inc = File::Spec->catdir($cf->{archlibexp}, 'CORE');
> #location of perl.exp
> +
> + my $lddlflags = $cf->{lddlflags};
> + $lddlflags =~ s/\Q$(BASEEXT)\E/$file_base/;
> + $lddlflags =~ s/\Q$(PERL_INC)\E/$perl_inc/;
I actually got sent a bunch of patches for AIX linking fixes, I should
make sure they all basically do the same thing before releasing.
Thanks for the help once again.
-Ken
|