appnexus / pyrobuf

A Cython alternative to Google's Python Protobuf library
Other
556 stars 71 forks source link

`python setup.py install` fails #125

Open ghost opened 5 years ago

ghost commented 5 years ago
$ python --version
Python 3.7.1

$ python setup.py install --user
rendering 'pyrobuf_list.pyx' from '/home/user/downloads/pyrobuf/pyrobuf/protobuf/templates/pyrobuf_list_pyx.tmpl'                          
rendering 'pyrobuf_list.pxd' from '/home/user/downloads/pyrobuf/pyrobuf/protobuf/templates/pyrobuf_list_pxd.tmpl'                          
Compiling pyrobuf/src/pyrobuf_list.pyx because it changed.                                                                                                                
Compiling pyrobuf/src/pyrobuf_util.pyx because it depends on pyrobuf/src/pyrobuf_defs.pxi.                                                                                
[1/2] Cythonizing pyrobuf/src/pyrobuf_list.pyx                                                                                                                            
/home/user/.local/lib/python3.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/user/downloads/pyrobuf/pyrobuf/src/pyrobuf_list.pxd                                               
  tree = Parsing.p_module(s, pxd, full_module_name)                                                                                                                       
[2/2] Cythonizing pyrobuf/src/pyrobuf_util.pyx                                                                                                                            
/home/user/.local/lib/python3.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/user/downloads/pyrobuf/pyrobuf/src/pyrobuf_util.pxd                                               
  tree = Parsing.p_module(s, pxd, full_module_name)                                                                                                                       
running install                                                                                                                                                           
running bdist_egg                                                                                                                                                         
running egg_info                                                                                                                                                          
creating pyrobuf.egg-info                                                                                                                                                 
writing pyrobuf.egg-info/PKG-INFO                                                                                                                                         
writing dependency_links to pyrobuf.egg-info/dependency_links.txt                                                                                                         
writing entry points to pyrobuf.egg-info/entry_points.txt                                                                                                                 
writing requirements to pyrobuf.egg-info/requires.txt                                                                                                                     
writing top-level names to pyrobuf.egg-info/top_level.txt                                                                                                                 
writing manifest file 'pyrobuf.egg-info/SOURCES.txt'                                                                                                                      
reading manifest file 'pyrobuf.egg-info/SOURCES.txt'                                                                                                                      
reading manifest template 'MANIFEST.in'                                                                                                                                   
writing manifest file 'pyrobuf.egg-info/SOURCES.txt'                                                                                                                      
installing library code to build/bdist.linux-x86_64/egg                                                                                                                   
running install_lib                                                                                                                                                       
running build_py                                                                                                                                                          
creating build                                                                                                                                                            
creating build/lib.linux-x86_64-3.7                                                                                                                                       
creating build/lib.linux-x86_64-3.7/pyrobuf                                                                                                                               
copying pyrobuf/__init__.py -> build/lib.linux-x86_64-3.7/pyrobuf                                                                                                         
copying pyrobuf/setuptools_ext.py -> build/lib.linux-x86_64-3.7/pyrobuf                                                                                                   
copying pyrobuf/parse_proto.py -> build/lib.linux-x86_64-3.7/pyrobuf                                                                                                      
copying pyrobuf/compile.py -> build/lib.linux-x86_64-3.7/pyrobuf                                                                                                          
copying pyrobuf/__main__.py -> build/lib.linux-x86_64-3.7/pyrobuf                                                                                                         
creating build/lib.linux-x86_64-3.7/tests                                                                                                                                 
copying tests/__init__.py -> build/lib.linux-x86_64-3.7/tests                                                                                                             
copying tests/test_has_field.py -> build/lib.linux-x86_64-3.7/tests                                                                                                       
copying tests/test_varint_encoding.py -> build/lib.linux-x86_64-3.7/tests                                                                                                 
copying tests/test_issue_69.py -> build/lib.linux-x86_64-3.7/tests                                                                                                        
copying tests/test_caching.py -> build/lib.linux-x86_64-3.7/tests                                                                                                         
copying tests/test_unicode_strings.py -> build/lib.linux-x86_64-3.7/tests                                                                                                 
copying tests/test_nested_issue55.py -> build/lib.linux-x86_64-3.7/tests                                                                                                  
copying tests/create_message.py -> build/lib.linux-x86_64-3.7/tests                                                                                                       
copying tests/test_repeated_enum.py -> build/lib.linux-x86_64-3.7/tests                                                                                                   
copying tests/test_lists.py -> build/lib.linux-x86_64-3.7/tests                                                                                                           
copying tests/test_message_field_types.py -> build/lib.linux-x86_64-3.7/tests                                                                                             
copying tests/perf_lists.py -> build/lib.linux-x86_64-3.7/tests                                                                                                           
copying tests/test_typed_lists.py -> build/lib.linux-x86_64-3.7/tests                                                                                                     
copying tests/test_unknown_field.py -> build/lib.linux-x86_64-3.7/tests                                                                                                   
copying tests/test_items.py -> build/lib.linux-x86_64-3.7/tests                                                                                                           
copying tests/test_signed_integer.py -> build/lib.linux-x86_64-3.7/tests                                                                                                  
copying tests/test_message.py -> build/lib.linux-x86_64-3.7/tests                                                                                                         
copying tests/test_is_initialized.py -> build/lib.linux-x86_64-3.7/tests                                                                                                  
copying tests/test_deprecated_field.py -> build/lib.linux-x86_64-3.7/tests                                                                                                
copying tests/test_merge_from.py -> build/lib.linux-x86_64-3.7/tests                                                                                                      
copying tests/test_message_init_kwargs.py -> build/lib.linux-x86_64-3.7/tests                                                                                             
copying tests/performances.py -> build/lib.linux-x86_64-3.7/tests                                                                                                         
copying tests/test_field_defaults.py -> build/lib.linux-x86_64-3.7/tests                                                                                                  
copying tests/test_issue_11.py -> build/lib.linux-x86_64-3.7/tests                                                                                                        
copying tests/test_bytes_and_string_lists.py -> build/lib.linux-x86_64-3.7/tests                                                                                          
copying tests/conftest.py -> build/lib.linux-x86_64-3.7/tests                                                                                                             
copying tests/test_message_with_no_fields.py -> build/lib.linux-x86_64-3.7/tests                                                                                          
copying tests/test_imported_enums.py -> build/lib.linux-x86_64-3.7/tests                                                                                                  
creating build/lib.linux-x86_64-3.7/pyrobuf/protobuf                                                                                                                      
copying pyrobuf/protobuf/__init__.py -> build/lib.linux-x86_64-3.7/pyrobuf/protobuf                                                                                       
creating build/lib.linux-x86_64-3.7/tests/messages                                                                                                                        
copying tests/messages/__init__.py -> build/lib.linux-x86_64-3.7/tests/messages                                                                                           
copying tests/messages/test_ref_message_pb2.py -> build/lib.linux-x86_64-3.7/tests/messages                                                                               
copying tests/messages/test_message_pb2.py -> build/lib.linux-x86_64-3.7/tests/messages                                                                                   
creating build/lib.linux-x86_64-3.7/tests/test_parser                                                                                                                     
copying tests/test_parser/__init__.py -> build/lib.linux-x86_64-3.7/tests/test_parser                                                                                     
copying tests/test_parser/test_missing_lbraces.py -> build/lib.linux-x86_64-3.7/tests/test_parser                                                                         
copying tests/test_parser/test_oneof.py -> build/lib.linux-x86_64-3.7/tests/test_parser                                                                                   
copying tests/test_parser/test_syntax.py -> build/lib.linux-x86_64-3.7/tests/test_parser                                                                                  
copying tests/test_parser/test_map_field.py -> build/lib.linux-x86_64-3.7/tests/test_parser                                                                               
creating build/lib.linux-x86_64-3.7/pyrobuf/src                                                                                                                           
copying pyrobuf/src/ansidecl.h -> build/lib.linux-x86_64-3.7/pyrobuf/src                                                                                                  
copying pyrobuf/src/pyrobuf_list.c -> build/lib.linux-x86_64-3.7/pyrobuf/src                                                                                              
copying pyrobuf/src/pyrobuf_list.pxd -> build/lib.linux-x86_64-3.7/pyrobuf/src                                                                                            
copying pyrobuf/src/pyrobuf_list.pyx -> build/lib.linux-x86_64-3.7/pyrobuf/src                                                                                            
copying pyrobuf/src/pyrobuf_util.c -> build/lib.linux-x86_64-3.7/pyrobuf/src                                                                                              
copying pyrobuf/src/pyrobuf_util.pxd -> build/lib.linux-x86_64-3.7/pyrobuf/src
copying pyrobuf/src/pyrobuf_util.pyx -> build/lib.linux-x86_64-3.7/pyrobuf/src
copying pyrobuf/src/strndup.c -> build/lib.linux-x86_64-3.7/pyrobuf/src
creating build/lib.linux-x86_64-3.7/pyrobuf/protobuf/templates
copying pyrobuf/protobuf/templates/proto_pxd.tmpl -> build/lib.linux-x86_64-3.7/pyrobuf/protobuf/templates
copying pyrobuf/protobuf/templates/proto_pyx.tmpl -> build/lib.linux-x86_64-3.7/pyrobuf/protobuf/templates
copying pyrobuf/protobuf/templates/pyrobuf_list_pxd.tmpl -> build/lib.linux-x86_64-3.7/pyrobuf/protobuf/templates
copying pyrobuf/protobuf/templates/pyrobuf_list_pyx.tmpl -> build/lib.linux-x86_64-3.7/pyrobuf/protobuf/templates
running build_ext
building 'pyrobuf_list' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/pyrobuf
creating build/temp.linux-x86_64-3.7/pyrobuf/src
gcc -pthread -B /opt/anaconda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/anaconda/include/python3.7m -c pyrobuf/src/pyrobuf_list.c -o build/temp.linux-x86_64-3.7/pyrobuf/src/pyrobuf_list.o
gcc -pthread -shared -B /opt/anaconda/compiler_compat -L/opt/anaconda/lib -Wl,-rpath=/opt/anaconda/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/pyrobuf/src/pyrobuf_list.o -o build/lib.linux-x86_64-3.7/pyrobuf_list.cpython-37m-x86_64-linux-gnu.so
/opt/anaconda/compiler_compat/ld: build/temp.linux-x86_64-3.7/pyrobuf/src/pyrobuf_list.o: unable to initialize decompress status for section .debug_info
/opt/anaconda/compiler_compat/ld: build/temp.linux-x86_64-3.7/pyrobuf/src/pyrobuf_list.o: unable to initialize decompress status for section .debug_info
/opt/anaconda/compiler_compat/ld: build/temp.linux-x86_64-3.7/pyrobuf/src/pyrobuf_list.o: unable to initialize decompress status for section .debug_info
/opt/anaconda/compiler_compat/ld: build/temp.linux-x86_64-3.7/pyrobuf/src/pyrobuf_list.o: unable to initialize decompress status for section .debug_info
build/temp.linux-x86_64-3.7/pyrobuf/src/pyrobuf_list.o: file not recognized: file format not recognized
collect2: error: ld failed with exit status 1
error: command 'gcc' failed with exit status 1
pavolmarak commented 5 years ago

I have very similar problem described here when building PyTorch library. I am searching for solution, but no success so far. I tried different gcc/g++ versions. Nothing helped. Maybe it is problem of Python.