Building a perl C extension module erroring out on Ubuntu 5.10

D

Dan Stromberg

Hi again.

I'm trying to get a C extension module I wrote with SWIG to work with
perl. I got it to work OK with python, but perl's being a little more
troublesome.

When I use the usual (?) incantation, I get compile-time errors:

$ make
#swig -python -o odirectcmodule.c odirectcmodule.swg
swig -perl5 -o odirect_perl.c odirectcmodule.swg
gcc -ansi -Wall -Dbool=char -I/usr/lib/perl/5.8.7/CORE -fpic -c odirect_perl.c
In file included from /usr/lib/perl/5.8.7/CORE/op.h:496,
from /usr/lib/perl/5.8.7/CORE/perl.h:2600,
from odirect_perl.c:703:
/usr/lib/perl/5.8.7/CORE/reentr.h:611: error: field ‘_crypt_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:619: error: field ‘_drand48_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:770: error: field ‘_random_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:775: error: field ‘_srandom_struct’ has incomplete type
In file included from /usr/lib/perl/5.8.7/CORE/perl.h:2605,

Is there something a little loopy with the way Ubuntu builds C extension
modules for perl?

I could try to find where _crypt_struct and such are defined and #include
the right header into the .c from SWIG, but shouldn't swig and the perl
extension module API's have a sort of in-advance agreement on how this is
to be done?

Is this a known problem?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top