Building a perl C extension module erroring out on Ubuntu 5.10

Discussion in 'Perl Misc' started by Dan Stromberg, Sep 16, 2006.

  1. 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!
    Dan Stromberg, Sep 16, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SPE - Stani's Python Editor
    Replies:
    1
    Views:
    452
    SPE - Stani's Python Editor
    Apr 29, 2008
  2. Kenneth.Grubb

    upgraded project to VS2008 erroring in design view

    Kenneth.Grubb, Jan 7, 2008, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    738
    Kenneth.Grubb
    Jan 7, 2008
  3. Philliam Auriemma

    TCPSocket.send is erroring

    Philliam Auriemma, Dec 16, 2009, in forum: Ruby
    Replies:
    1
    Views:
    101
    Roger Pack
    Dec 16, 2009
  4. Alex Rast
    Replies:
    6
    Views:
    131
    Dr John Stockton
    Feb 29, 2004
  5. tpurl
    Replies:
    3
    Views:
    96
    Anno Siegel
    Nov 1, 2005
Loading...

Share This Page