Hi All:<br />
I am trying to install Pyperl on my Ubuntu (9.10, Karmic) box. I am running python 2.6.4 with Perl 5.10.0. I followed the instructions i.e. (cd Python-Object; perl Makefile.PL; make install)<br />
python setup.py install<br />
With sudo option.<br />
While running the setup.py install, I got the following errors:<br />
========<br />
sudo python setup.py install<br />
running install<br />
running build<br />
running build_py<br />
running build_ext<br />
building 'perl2' extension<br />
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/lib/perl/5.10/CORE -I/usr/include/python2.6 -c perlmodule.c -o build/temp.linux-i686-2.6/perlmodule.o -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDL_HACK -DMULTI_PERL<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from perlmodule.c:8:<br />
/usr/include/python2.6/pyconfig.h:1028:1: warning: "_POSIX_C_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from perlmodule.c:7:<br />
/usr/include/features.h:158:1: warning: this is the location of the previous definition<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from perlmodule.c:8:<br />
/usr/include/python2.6/pyconfig.h:1037:1: warning: "_XOPEN_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from perlmodule.c:7:<br />
/usr/include/features.h:160:1: warning: this is the location of the previous definition<br />
In file included from perlmodule.c:13:<br />
lang_lock.h:4:25: warning: "/*" within comment<br />
lang_lock.h:5:23: warning: "/*" within comment<br />
perlmodule.c: In function ‘call_perl’:<br />
perlmodule.c:221: warning: value computed is not used<br />
In file included from perlmodule.c:255:<br />
opcode.c: In function ‘opmask_addlocal’:<br />
opcode.c:39: warning: format not a string literal and no format arguments<br />
opcode.c:41: warning: format not a string literal and no format arguments<br />
perlmodule.c: At top level:<br />
perlmodule.c:259: warning: function declaration isn’t a prototype<br />
perlmodule.c:372: warning: function declaration isn’t a prototype<br />
perlmodule.c:382: warning: function declaration isn’t a prototype<br />
perlmodule.c:392: warning: function declaration isn’t a prototype<br />
perlmodule.c:402: warning: function declaration isn’t a prototype<br />
perlmodule.c:412: warning: function declaration isn’t a prototype<br />
perlmodule.c:460: warning: function declaration isn’t a prototype<br />
perlmodule.c:513: warning: function declaration isn’t a prototype<br />
perlmodule.c:565: warning: function declaration isn’t a prototype<br />
perlmodule.c:649: warning: function declaration isn’t a prototype<br />
perlmodule.c:748: warning: function declaration isn’t a prototype<br />
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/lib/perl/5.10/CORE -I/usr/include/python2.6 -c lang_lock.c -o build/temp.linux-i686-2.6/lang_lock.o -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDL_HACK -DMULTI_PERL<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from lang_lock.c:6:<br />
/usr/include/python2.6/pyconfig.h:1028:1: warning: "_POSIX_C_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from lang_lock.c:5:<br />
/usr/include/features.h:158:1: warning: this is the location of the previous definition<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from lang_lock.c:6:<br />
/usr/include/python2.6/pyconfig.h:1037:1: warning: "_XOPEN_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from lang_lock.c:5:<br />
/usr/include/features.h:160:1: warning: this is the location of the previous definition<br />
In file included from lang_lock.c:8:<br />
lang_lock.h:4:25: warning: "/*" within comment<br />
lang_lock.h:5:23: warning: "/*" within comment<br />
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/lib/perl/5.10/CORE -I/usr/include/python2.6 -c lang_map.c -o build/temp.linux-i686-2.6/lang_map.o -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDL_HACK -DMULTI_PERL<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from lang_map.c:9:<br />
/usr/include/python2.6/pyconfig.h:1028:1: warning: "_POSIX_C_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from lang_map.c:8:<br />
/usr/include/features.h:158:1: warning: this is the location of the previous definition<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from lang_map.c:9:<br />
/usr/include/python2.6/pyconfig.h:1037:1: warning: "_XOPEN_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from lang_map.c:8:<br />
/usr/include/features.h:160:1: warning: this is the location of the previous definition<br />
In file included from lang_map.c:12:<br />
lang_lock.h:4:25: warning: "/*" within comment<br />
lang_lock.h:5:23: warning: "/*" within comment<br />
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/lib/perl/5.10/CORE -I/usr/include/python2.6 -c svrv_object.c -o build/temp.linux-i686-2.6/svrv_object.o -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDL_HACK -DMULTI_PERL<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from svrv_object.c:8:<br />
/usr/include/python2.6/pyconfig.h:1028:1: warning: "_POSIX_C_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from svrv_object.c:7:<br />
/usr/include/features.h:158:1: warning: this is the location of the previous definition<br />
In file included from /usr/include/python2.6/Python.h:8,<br />
from svrv_object.c:8:<br />
/usr/include/python2.6/pyconfig.h:1037:1: warning: "_XOPEN_SOURCE" redefined<br />
In file included from /usr/include/sys/types.h:27,<br />
from /usr/lib/perl/5.10/CORE/perl.h:587,<br />
from svrv_object.c:7:<br />
/usr/include/features.h:160:1: warning: this is the location of the previous definition<br />
In file included from svrv_object.c:17:<br />
lang_lock.h:4:25: warning: "/*" within comment<br />
lang_lock.h:5:23: warning: "/*" within comment<br />
svrv_object.c: In function ‘PySVRV_New’:<br />
svrv_object.c:56: warning: unused variable ‘my_perl’<br />
svrv_object.c: In function ‘pysvrv_keys’:<br />
svrv_object.c:225: warning: unused variable ‘my_perl’<br />
svrv_object.c: In function ‘pysvrv_values’:<br />
svrv_object.c:239: warning: unused variable ‘my_perl’<br />
svrv_object.c:463:26: warning: "/*" within comment<br />
svrv_object.c: In function ‘array_splice’:<br />
svrv_object.c:517: warning: format not a string literal and no format arguments<br />
svrv_object.c:526: warning: format not a string literal and no format arguments<br />
svrv_object.c:538: warning: format not a string literal and no format arguments<br />
svrv_object.c:552: warning: format not a string literal and no format arguments<br />
svrv_object.c: In function ‘pysvrv_pop’:<br />
svrv_object.c:805: warning: unused variable ‘sv’<br />
svrv_object.c: In function ‘pysvrv_remove’:<br />
svrv_object.c:905: warning: unused variable ‘my_perl’<br />
svrv_object.c: In function ‘pysvrv_index’:<br />
svrv_object.c:943: warning: unused variable ‘my_perl’<br />
svrv_object.c: In function ‘pysvrv_av_alloc’:<br />
svrv_object.c:1087: warning: unused variable ‘my_perl’<br />
svrv_object.c: In function ‘pysvrv_getattr’:<br />
svrv_object.c:1183: warning: assignment discards qualifiers from pointer target type<br />
svrv_object.c:1216: warning: format not a string literal and no format arguments<br />
svrv_object.c:1217: warning: format not a string literal and no format arguments<br />
svrv_object.c: In function ‘pysvrv_setattr’:<br />
svrv_object.c:1265: warning: format not a string literal and no format arguments<br />
svrv_object.c:1266: warning: format not a string literal and no format arguments<br />
svrv_object.c: In function ‘pysvrv_length’:<br />
svrv_object.c:1431: error: ‘my_perl’ undeclared (first use in this function)<br />
svrv_object.c:1431: error: (Each undeclared identifier is reported only once<br />
svrv_object.c:1431: error: for each function it appears in.)<br />
svrv_object.c: In function ‘pysvrv_nonzero’:<br />
svrv_object.c:1461: error: ‘my_perl’ undeclared (first use in this function)<br />
svrv_object.c: In function ‘pysvrv_repeat’:<br />
svrv_object.c:1787: warning: unused variable ‘svp’<br />
svrv_object.c: At top level:<br />
svrv_object.c:2012: warning: ‘intargfunc’ is deprecated<br />
svrv_object.c:2013: warning: ‘intargfunc’ is deprecated<br />
svrv_object.c:2014: warning: ‘intintargfunc’ is deprecated<br />
error: command 'gcc' failed with exit status 1<br />
sanjay@sanjay-laptop:~/pythonCode/dist/pyperl-1.0.1c$ <br />
==========================<br />
I tried to locate source of error, but I find that 'my_perl' is either defined or its not at all that that line number. I find, instead, 'dCTX' or 'HvKEYS(sv)'. Please help me to srot ou this issue. It will be really great if I can call Perl from my Python code.<br />
<br />
thanks in advance<br />
regards<br />
-Sanjay<br><Table border=0 Width=644 Height=57 cellspacing=0 cellpadding=0 style="font-family:Verdana;font-size:11px;line-height:15px;"><TR><td><A HREF="http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?" target="_blank"><IMG SRC="http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle"></A></td></TR></Table>