flavray / pyavro-rs

Python wrapper around avro-rs and avro-rs-ffi
MIT License
4 stars 1 forks source link

Error when installing pyavro-rs #4

Open bzm3r opened 4 years ago

bzm3r commented 4 years ago

I got an error while installing pyavro-rs:

    ERROR: Command errored out with exit status 1:
     command: 'C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Program Files\\Blender Foundation\\Blender 2.83\\2.83\\python\\bin\\pyavro-rs\\setup.py'"'"'; __file__='"'"'C:\\Program Files\\Blender Foundation\\Blender 2.83\\2.83\\python\\bin\\pyavro-rs\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin\pyavro-rs\
    Complete output (185 lines):
    running develop
    running egg_info
    creating pyavro_rs.egg-info
    writing pyavro_rs.egg-info\PKG-INFO
    writing dependency_links to pyavro_rs.egg-info\dependency_links.txt
    writing requirements to pyavro_rs.egg-info\requires.txt
    writing top-level names to pyavro_rs.egg-info\top_level.txt
    writing manifest file 'pyavro_rs.egg-info\SOURCES.txt'
    reading manifest file 'pyavro_rs.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: manifest_maker: MANIFEST.in, line 1: path 'avro-rs-ffi/' cannot end with '/'

    writing manifest file 'pyavro_rs.egg-info\SOURCES.txt'
    running build_ext
    building 'pyavro_rs._lowlevel__lib' extension
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\build
    creating build\temp.win-amd64-3.7\Release\build\temp.win-amd64-3.7
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT "-IC:\Program Files\Blender Foundation\Blender 2.83\2.83\python\include" "-IC:\Program Files\Blender Foundation\Blender 2.83\2.83\python\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19559.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19559.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19559.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19559.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19559.0\cppwinrt" /Tcbuild\temp.win-amd64-3.7\empty.c /Fobuild\temp.win-amd64-3.7\Release\build\temp.win-amd64-3.7\empty.obj
    empty.c
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\libs" "/LIBPATH:C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\PCbuild\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19559.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19559.0\um\x64" /EXPORT:PyInit__lowlevel__lib build\temp.win-amd64-3.7\Release\build\temp.win-amd64-3.7\empty.obj "/OUT:C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin\pyavro-rs\pyavro_rs\_lowlevel__lib.cp37-win_amd64.pyd" /IMPLIB:build\temp.win-amd64-3.7\Release\build\temp.win-amd64-3.7\_lowlevel__lib.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\build\temp.win-amd64-3.7\_lowlevel__lib.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\build\temp.win-amd64-3.7\_lowlevel__lib.cp37-win_amd64.exp
    Generating code
    Finished generating code
     Downloading crates ...
      Downloaded adler32 v1.0.2
      Downloaded crc v1.8.1
      Downloaded byteorder v1.2.3
      Downloaded failure_derive v0.1.1
      Downloaded quote v0.6.3
      Downloaded num-traits v0.2.4
      Downloaded serde v1.0.66
      Downloaded unicode-xid v0.0.4
      Downloaded cfg-if v0.1.3
      Downloaded iter-read v0.1.0
      Downloaded dtoa v0.4.2
      Downloaded libflate v0.1.15
      Downloaded syn v0.11.11
      Downloaded failure v0.1.1
      Downloaded avro-rs v0.4.1
      Downloaded quote v0.3.15
      Downloaded rand v0.4.2
      Downloaded serde_derive v1.0.66
      Downloaded backtrace v0.3.8
      Downloaded build_const v0.2.1
      Downloaded itoa v0.4.1
      Downloaded libc v0.2.42
      Downloaded serde_json v1.0.21
      Downloaded proc-macro2 v0.4.6
      Downloaded winapi v0.3.5
      Downloaded synom v0.11.3
      Downloaded syn v0.14.2
      Downloaded synstructure v0.6.1
      Downloaded rustc-demangle v0.1.8
      Downloaded rand v0.3.22
      Downloaded num-integer v0.1.38
      Downloaded serde-pickle v0.4.1
       Compiling winapi-x86_64-pc-windows-gnu v0.4.0
       Compiling winapi v0.3.5
       Compiling unicode-xid v0.0.4
       Compiling quote v0.3.15
       Compiling build_const v0.2.1
       Compiling serde v1.0.66
       Compiling unicode-xid v0.1.0
       Compiling num-traits v0.2.4
       Compiling num-integer v0.1.38
       Compiling byteorder v1.2.3
       Compiling cfg-if v0.1.3
       Compiling rustc-demangle v0.1.8
       Compiling rustc-serialize v0.3.24
       Compiling libc v0.2.42
       Compiling itoa v0.4.1
       Compiling dtoa v0.4.2
       Compiling adler32 v1.0.2
       Compiling iter-read v0.1.0
       Compiling synom v0.11.3
       Compiling proc-macro2 v0.4.6
       Compiling crc v1.8.1
       Compiling syn v0.11.11
       Compiling quote v0.6.3
       Compiling syn v0.14.2
       Compiling synstructure v0.6.1
       Compiling rand v0.4.2
       Compiling backtrace v0.3.8
       Compiling serde_json v1.0.21
       Compiling libflate v0.1.15
       Compiling rand v0.3.22
       Compiling num-bigint v0.1.44
       Compiling failure_derive v0.1.1
       Compiling serde-pickle v0.4.1
       Compiling failure v0.1.1
       Compiling serde_derive v1.0.66
       Compiling avro-rs v0.4.1
       Compiling avro-rs-ffi v0.0.1 (C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin\pyavro-rs\avro-rs-ffi)
    warning: variable does not need to be mutable
      --> src\core.rs:63:17
       |
    63 |             let mut out = format!("stacktrace: {}", error.backtrace()).to_owned();
       |                 ----^^^
       |                 |
       |                 help: remove this `mut`
       |
       = note: `#[warn(unused_mut)]` on by default

    warning: `extern` fn uses type `std::option::Option<*const schema::AvroSchema>`, which is not FFI-safe
      --> src\reader.rs:17:17
       |
    17 |         schema: Option<*const AvroSchema>
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
       |
       = note: `#[warn(improper_ctypes_definitions)]` on by default
       = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
       = note: enum has no representation hint

    warning: 2 warnings emitted

        Finished release [optimized] target(s) in 2m 00s
    copying dylib avro_rs_ffi.dll
    Traceback (most recent call last):
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\cffi\cparser.py", line 305, in _parse
        ast = _get_parser().parse(fullcsource)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\c_parser.py", line 152, in parse
        debug=debuglevel)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\ply\yacc.py", line 331, in parse
        return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\ply\yacc.py", line 1061, in parseopt_notrack
        lookahead = get_token()     # Get the next token
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\c_lexer.py", line 77, in token
        self.last_token = self.lexer.token()
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\ply\lex.py", line 386, in token
        newtok = self.lexerrorf(tok)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\c_lexer.py", line 514, in t_error
        self._error(msg, t)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\c_lexer.py", line 93, in _error
        self.error_func(msg, location[0], location[1])
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\c_parser.py", line 193, in _lex_error_func
        self._parse_error(msg, self._coord(line, column))
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pycparser\plyparser.py", line 67, in _parse_error
        raise ParseError("%s: %s" % (coord, msg))
    pycparser.plyparser.ParseError: <cdef source string>:1:2: Illegal character '\r'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin\pyavro-rs\setup.py", line 23, in <module>
        milksnake_tasks=[build_native],
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\setuptools\command\develop.py", line 38, in run
        self.install_for_development()
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\setuptools\command\develop.py", line 140, in install_for_development
        self.run_command('build_ext')
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\milksnake\setuptools_ext.py", line 118, in run
        func(base_path=base_path, inplace=True)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\milksnake\setuptools_ext.py", line 276, in build_cffi
        ffi = make_ffi()
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\milksnake\setuptools_ext.py", line 265, in make_ffi
        strip_directives=self.header_strip_directives)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\milksnake\ffi.py", line 19, in make_ffi
        ffi.cdef(header)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\cffi\api.py", line 112, in cdef
        self._cdef(csource, override=override, packed=packed, pack=pack)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\cffi\api.py", line 126, in _cdef
        self._parser.parse(csource, override=override, **options)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\cffi\cparser.py", line 358, in parse
        self._internal_parse(csource)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\cffi\cparser.py", line 363, in _internal_parse
        ast, macros, csource = self._parse(csource)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\cffi\cparser.py", line 307, in _parse
        self.convert_pycparser_error(e, csource)
      File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\cffi\cparser.py", line 336, in convert_pycparser_error
        raise CDefError(msg)
    cffi.CDefError: cannot parse ""
    <cdef source string>:1:2: Illegal character '\r'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Program Files\\Blender Foundation\\Blender 2.83\\2.83\\python\\bin\\pyavro-rs\\setup.py'"'"'; __file__='"'"'C:\\Program Files\\Blender Foundation\\Blender 2.83\\2.83\\python\\bin\\pyavro-rs\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

I do not know how to interpret these errors. Do you have any ideas?

poros commented 4 years ago

I am afraid this repo is not actively maintained anymore (certainly not by me). I will remove the link from the avro-rs README, sorry if that gave you hope :(