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. Advertisements

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. Carl Waldbieser
    Replies:
    7
    Views:
    1,404
    Carl Waldbieser
    Oct 5, 2003
  2. SPE - Stani's Python Editor
    Replies:
    1
    Views:
    614
    SPE - Stani's Python Editor
    Apr 29, 2008
  3. Michael George

    building an extension module with autotools?

    Michael George, Dec 3, 2008, in forum: Python
    Replies:
    4
    Views:
    1,126
    Michael George
    Dec 3, 2008
  4. Kenneth.Grubb

    upgraded project to VS2008 erroring in design view

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

    TCPSocket.send is erroring

    Philliam Auriemma, Dec 16, 2009, in forum: Ruby
    Replies:
    1
    Views:
    179
    Roger Pack
    Dec 16, 2009
  6. msoulier

    building 1.8.7 on ubuntu 9.10

    msoulier, Jul 11, 2010, in forum: Ruby
    Replies:
    1
    Views:
    136
    Joel VanderWerf
    Jul 11, 2010
  7. Alex Rast
    Replies:
    6
    Views:
    475
    Dr John Stockton
    Feb 29, 2004
  8. tpurl
    Replies:
    3
    Views:
    185
    Anno Siegel
    Nov 1, 2005
Loading...