Comment 0 for bug 349149

Revision history for this message
jsteel (jon-steel) wrote :

Binary package hint: swig

I found this error on 8.10, and it seems to work fine on 8.04.

Following the tutorial at http://www.swig.org/tutorial.html and trying to create a perl interface ends up producing errors. To get rid of some I had to manually point gcc at perls CORE directory. I then got the following errors:

jsteel@jsteel-desktop:~/test$ gcc -I/usr/lib/perl/5.10.0/CORE/ -lperl example_wrap.c
In file included from /usr/lib/perl/5.10.0/CORE/perl.h:4694,
                 from example_wrap.c:710:
/usr/lib/perl/5.10.0/CORE/proto.h:509: error: expected declaration specifiers or ‘...’ before ‘off64_t’
/usr/lib/perl/5.10.0/CORE/proto.h:514: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Perl_do_sysseek’
/usr/lib/perl/5.10.0/CORE/proto.h:517: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Perl_do_tell’
/usr/lib/perl/5.10.0/CORE/proto.h:4248: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Perl_PerlIO_tell’
/usr/lib/perl/5.10.0/CORE/proto.h:4249: error: expected declaration specifiers or ‘...’ before ‘off64_t’

I can fix the problem by inesrting the following code at the very top of /usr/lib/perl/5.10.0/CORE/proto.h

#include <stdint.h>
typedef __off64_t off64_t;