Menu

#2 Failed build on 1.3.0

1.0
closed
nobody
None
2014-10-09
2014-10-09
GSunnic
No

[root@localhost PyKCS11-1.3.0]# make build
python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/PyKCS11
copying PyKCS11/init.py -> build/lib.linux-x86_64-2.6/PyKCS11
copying PyKCS11/LowLevel.py -> build/lib.linux-x86_64-2.6/PyKCS11
running build_ext
building 'PyKCS11._LowLevel' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/src
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/ck_attribute_smart.cpp -o build/temp.linux-x86_64-2.6/src/ck_attribute_smart.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/pkcs11lib.cpp -o build/temp.linux-x86_64-2.6/src/pkcs11lib.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/pykcs11string.cpp -o build/temp.linux-x86_64-2.6/src/pykcs11string.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/utility.cpp -o build/temp.linux-x86_64-2.6/src/utility.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/pykcs11.cpp -o build/temp.linux-x86_64-2.6/src/pykcs11.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/dyn_unix.c -o build/temp.linux-x86_64-2.6/src/dyn_unix.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -I/usr/local/include -I/usr/include/python2.6 -c src/unix_pykcs11_wrap.cpp -o build/temp.linux-x86_64-2.6/src/unix_pykcs11_wrap.o
src/unix_pykcs11_wrap.cpp:154:21: error: Python.h: No such file or directory
src/unix_pykcs11_wrap.cpp:2982:4: error: #error "This python version requires swig to be run with the '-classic' option"
src/unix_pykcs11_wrap.cpp:784: error: ‘PyObject’ was not declared in this scope
src/unix_pykcs11_wrap.cpp:784: error: ‘str’ was not declared in this scope
src/unix_pykcs11_wrap.cpp:785: error: expected ‘,’ or ‘;’ before ‘{’ token
src/unix_pykcs11_wrap.cpp:808: error: expected initializer before ‘’ token
src/unix_pykcs11_wrap.cpp:834: error: expected initializer before ‘
’ token
src/unix_pykcs11_wrap.cpp:888: error: expected initializer before ‘*’ token
src/unix_pykcs11_wrap.cpp:903: error: ‘inquiry’ does not name a type
src/unix_pykcs11_wrap.cpp:904: error: ‘intargfunc’ does not name a type
src/unix_pykcs11_wrap.cpp:905: error: ‘intintargfunc’ does not name a type
src/unix_pykcs11_wrap.cpp:906: error: ‘intobjargproc’ does not name a type
src/unix_pykcs11_wrap.cpp:907: error: ‘intintobjargproc’ does not name a type
src/unix_pykcs11_wrap.cpp:908: error: ‘getreadbufferproc’ does not name a type
src/unix_pykcs11_wrap.cpp:909: error: ‘getwritebufferproc’ does not name a type
src/unix_pykcs11_wrap.cpp:910: error: ‘getsegcountproc’ does not name a type
src/unix_pykcs11_wrap.cpp:911: error: ‘getcharbufferproc’ does not name a type
src/unix_pykcs11_wrap.cpp:912: error: ‘PyObject’ was not declared in this scope
src/unix_pykcs11_wrap.cpp:912: error: ‘x’ was not declared in this scope
src/unix_pykcs11_wrap.cpp:912: error: expected primary-expression before ‘void’
src/unix_pykcs11_wrap.cpp:912: error: initializer expression list treated as compound expression
src/unix_pykcs11_wrap.cpp:913: error: expected ‘,’ or ‘;’ before ‘{’ token
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/stdexcept:38,
from src/unix_pykcs11_wrap.cpp:3006:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception:35: error: expected declaration before end of line
error: command 'gcc' failed with exit status 1

Discussion

  • GSunnic

    GSunnic - 2014-10-09

    Python Version
    Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

    Linux Version
    Linux localhost.localdomain 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

    CentOS 6.5 64bit

     
  • Anonymous

    Anonymous - 2014-10-09

    The error is saying that the file Python.h is missing.
    It means that you need to install a "python-dev" package. I don't know how it's called on CentOS, anyway, you have to make some search.

     
  • GSunnic

    GSunnic - 2014-10-09

    Thanks. It was the python-devel missing.

     
  • Anonymous

    Anonymous - 2014-10-09
    • Status: open --> closed
     

Log in to post a comment.