Skip to content

Instantly share code, notes, and snippets.

@marjinal1st
Created December 14, 2014 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marjinal1st/03f9e6daeaeb3f2aafc7 to your computer and use it in GitHub Desktop.
Save marjinal1st/03f9e6daeaeb3f2aafc7 to your computer and use it in GitHub Desktop.
python-sfml build error
(venv)marjinal1st@thinkpad-edge:~/Python/python-sfml$ python setup.py install
running install
running build
running build_py
running build_ext
cythoning src/sfml/system.pyx to src/sfml/system.cpp
Error compiling Cython file:
------------------------------------------------------------
...
void setValue(void*)
void* getValue() const
cdef cppclass InputStream
cdef cppclass Utf
cdef cppclass String
^
------------------------------------------------------------
include/libcpp/sfml.pxd:137:9: Compiler crash in AnalyseDeclarationsTransform
File 'ModuleNode.py', line 103, in analyse_declarations: ModuleNode(sfml.pxd:1:0,
full_module_name = u'libcpp.sfml',
is_pxd = True)
File 'Nodes.py', line 387, in analyse_declarations: StatListNode(sfml.pxd:25:0)
File 'Nodes.py', line 387, in analyse_declarations: StatListNode(sfml.pxd:37:5)
File 'Nodes.py', line 443, in analyse_declarations: CDefExternNode(sfml.pxd:37:5,
include_file = u'SFML/System.hpp',
namespace = u'sf')
File 'Nodes.py', line 387, in analyse_declarations: StatListNode(sfml.pxd:39:4)
File 'Nodes.py', line 1393, in analyse_declarations: CppClassNode(sfml.pxd:137:9,
base_classes = [...]/0,
cname = u'sf::String',
in_pxd = True,
name = u'String',
visibility = u'extern')
Compiler crash traceback from this point on:
File "/home/marjinal1st/Python/venv/local/lib/python2.7/site-packages/Cython/Compiler/Nodes.py", line 1393, in analyse_declarations
self.cname, base_class_types, visibility = self.visibility, templates = template_types)
File "/home/marjinal1st/Python/venv/local/lib/python2.7/site-packages/Cython/Compiler/Symtab.py", line 576, in declare_cpp_class
scope.declare_var(name="this", cname="this", type=PyrexTypes.CPtrType(entry.type), pos=entry.pos)
AttributeError: 'NoneType' object has no attribute 'declare_var'
building 'sfml.system' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Iinclude -I/usr/include/python2.7 -c src/sfml/system.cpp -o build/temp.linux-x86_64-2.7/src/sfml/system.o -fpermissive
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
src/sfml/system.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result of a failed Cython compilation.
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment