[Pdx-pm] Inline::C search.h 'Perl_push_scope'

Jonathan Leto jaleto at gmail.com
Tue May 12 00:26:41 PDT 2009


Howdy,

Providing the output of "perl -V" , "gcc --version" and the version of
Inline would be useful. Also, Perl 5.8.3 is quite old, so upgrading to
a more recent version of Perl and Inline may solve your issue without
the need for exotic debugging, if that is possible.

Cheers,



2009/5/11 Thomas Thompson <vortix at hotmail.com>:
> Hi guys,
>
> This is my first post to this list.  I'm not an expert in Perl and
> definitely a beginner with C.  I'm trying to rewrite a short section of some
> Perl code in C, but I've bumped into the following issue:
>
> #!/usr/bin/perl -w
>
> use Inline C;
> use strict;
>
> hello_inline();
>
> __END__
> __C__
> #include <stdio.h>
>
> void hello_inline( ) {
>         printf( "Hello World. Best Regards from Inline\n" );
> }
>
> The above code works fine, and the output is:
>
> plxc1000> test_c3.pl
> Hello World. Best Regards from Inline
>
> However, the following code (adding the search.h header file):
>
> #!/usr/bin/perl -w
>
> use Inline C;
> use strict;
>
> hello_inline();
>
> __END__
> __C__
> #include <stdio.h>
> #include <search.h>
>
> void hello_inline( ) {
>         printf( "Hello World. Best Regards from Inline\n" );
> }
>
> Results in this output:
>
> plxc1000> test_c3.pl
> /usr/bin/perl /usr/lib/perl5/5.8.3/ExtUtils/xsubpp  -typemap
> /usr/lib/perl5/5.8.3/ExtUtils/typemap   test_c3_pl_f52f.xs >
> test_c3_pl_f52f.xsc && mv test_c3_pl_f52f.xsc test_c3_pl_f52f.c
> cc -c  -I/nfs/pdx/disks/nehalem.pde.077/projects/rapttr/src -D_REENTRANT
> -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -Wall -pipe
> -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
> "-I/usr/lib/perl5/5.8.3/x86_64-linux-thread-multi/CORE"   test_c3_pl_f52f.c
> In file included from test_c3_pl_f52f.xs:6:
> /usr/include/search.h:66: error: `Perl_push_scope' redeclared as different
> kind of symbol
> /usr/lib/perl5/5.8.3/x86_64-linux-thread-multi/CORE/proto.h:590: error:
> previous declaration of `Perl_push_scope'
> /usr/include/search.h:66: error: parse error before '(' token
> make: *** [test_c3_pl_f52f.o] Error 1
>
> A problem was encountered while attempting to compile and install your
> Inline
> C code. The command that failed was:
>   make > out.make 2>&1
>
> Looking through the search.h header file, I don't see any instance of
> Perl_push_scope being redeclared, especially not on line 66 (which seems to
> be the middle of an enum type declaration).  I have not modified any of
> these header files.  This is on SUSE LINUX Enterprise Server 9 (x86_64).
>
> Any ideas to help out a new guy? :)  Let me know if I missed information I
> should provide when asking this type of question and I'll make certain to
> make certain to provide everything you guys need in the future.  I
> appreciate the help!
>
> Thomas
>
>
> ________________________________
> Insert movie times and more without leaving Hotmail®. See how.
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list
>



-- 

Jonathan Leto
jonathan at leto.net
http://leto.net


More information about the Pdx-pm-list mailing list