[Module::Build] Problem building XS modules on AIX
Status: Beta
Brought to you by:
kwilliams
|
From: James.FitzGibbon <Jam...@ta...> - 2003-11-17 16:32:32
|
Recently I've been having problems getting M::B to build modules which
have
XS components on AIX. I had initially thought that the problem lied
with
the upgrade from the 0.1x series to 0.2x, but after doing some research
I
beginning to think that XS modules could never be built on this
platform.
Here's what I get trying to build something like Pod::Coverage v0.12
(important bits have been hilighted)
[appserv:jfitzgi] ~/work/Pod-Coverage-0.12 (298) > ./Build
lib/Pod/Coverage/CountParents.pm ->
blib/lib/Pod/Coverage/CountParents.pm
lib/Pod/Coverage.pm -> blib/lib/Pod/Coverage.pm
lib/Pod/Coverage/ExportOnly.pm -> blib/lib/Pod/Coverage/ExportOnly.pm
lib/Pod/Coverage/Overloader.pm -> blib/lib/Pod/Coverage/Overloader.pm
lib/Pod/Coverage.xs -> lib/Pod/Coverage.c
cc_r -I/opt/3d/lib/perl5/5.8.0/aix-thread-multi/CORE -c -D_ALL_SOURCE
-D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=3D16384 -qnoansialias
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -I/opt/3d/include -O -o
lib/Pod/Coverage.o lib/Pod/Coverage.c
ExtUtils::Mkbootstrap::Mkbootstrap('lib/Pod/Coverage')
lib/Pod/Coverage.bs -> blib/arch/auto/Pod/Coverage/Coverage.bs
ld -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp
-bnoentry -lpthreads -lc_r -L/opt/3d/lib -o
blib/arch/auto/Pod/Coverage/Coverage.so lib/Pod/Coverage.o
ld: 0706-003 Cannot find or read import file: $(PERL_INC)/perl.exp
ld:accessx(): A file or directory in the path name does not
exist.
ld: 0706-004 Cannot find or read export file: $(BASEEXT).exp
ld:accessx(): A file or directory in the path name does not
exist.
error building lib/Pod/Coverage.o from 'lib/Pod/Coverage.so' at
/home_dir/jfitzgi/myperl/lib/perl5/site_perl/5.8.0/Module/Build/Base.pm
line 1534, <File0000> line 18.
[appserv:jfitzgi] ~/work/Pod-Coverage-0.12 (299) >
Pod::Coverage switched from EU::MM to M::B between v0.11 (which we have
installed) and v0.12.
=20
Now if I look at an EU::MM created Makefile, both PERL_INC and BASEEXT
are given values (this is
from Lexical::Typeglob):
PERL_INC =3D /opt/3d/lib/perl5/5.8.0/aix-thread-multi/CORE
BASEEXT =3D Typeglob
The AIX linker uses -bI to import lists of symbols from a text file and
-bE to export lists of symbols to
a text file. In this context I believe the invocation needs to see what
symbols are provided by the core
Perl libraries and then export the symbols that the target shared object
will contain.
Back to Lexical::Typeglob, there is a target to create the .exp files:
# --- MakeMaker dlsyms section:
dynamic :: Typeglob.exp
static :: Typeglob.exp
Typeglob.exp: Makefile.PL
$(PERLRUN) -e 'use ExtUtils::Mksymlists; \
Mksymlists("NAME" =3D> "Lexical::Typeglob", "DL_FUNCS" =3D> { },
"FUNCLIST" =3D> [], "DL_VARS" =3D> []);'
If I grep through the M::B source, the only platform that even touches
EU::Mksymlists is Windows. On UNIX platforms,
including AIX, there is no procedure to generate that file.
Is there any simple way to make this work on AIX? In looking at the
v0.21 code, the Windows version of link_c
calls prelink_c to generate the symbols, but prelink_c seems to make
some very Windows-specific decisions
about the names of the files to generate.
Any feedback appreciated.
--=20
j.
=20
James FitzGibbon
TTS Distribution Development
612-375-2307
=20
|