lief-project / LIEF

LIEF - Library to Instrument Executable Formats
https://lief.re
Apache License 2.0
4.41k stars 616 forks source link

Can you release a Windows 64bit, Python 3.8 wheel? #512

Closed ajinabraham closed 3 years ago

ajinabraham commented 3 years ago

Is your feature request related to a problem? Please describe.

  ERROR: Failed building wheel for lief
  Building wheel for blinker (setup.py): started
  Building wheel for blinker (setup.py): finished with status 'done'
  Created wheel for blinker: filename=blinker-1.4-py3-none-any.whl size=13451 sha256=a48463b0ee66951f213dce34689f38d0bbf95e283223b8450a26d7a0f25587ba
  Stored in directory: c:\users\runneradmin\appdata\local\pip\cache\wheels\b7\a5\68\fe632054a5eadd531c7a49d740c50eb6adfbeca822b4eab8d4
  Building wheel for kaitaistruct (setup.py): started
  Building wheel for kaitaistruct (setup.py): finished with status 'done'
  Created wheel for kaitaistruct: filename=kaitaistruct-0.9-py2.py3-none-any.whl size=5513 sha256=58c7988ffc96ca108ac2c5b16d3952017f4710d93225b6a060cb492e3cfd840e
  Stored in directory: c:\users\runneradmin\appdata\local\pip\cache\wheels\be\fc\03\9898405536cebab5df6b006d92ae33dfc29ecdb47079597546
  Building wheel for pyperclip (setup.py): started
  Building wheel for pyperclip (setup.py): finished with status 'done'
  Created wheel for pyperclip: filename=pyperclip-1.8.1-py3-none-any.whl size=11117 sha256=7d6fd56ee472755770d99d7aa6719c8ad629c202e4ad5dde2871b9163c803da3
  Stored in directory: c:\users\runneradmin\appdata\local\pip\cache\wheels\67\0c\ba\1468f38115898442e13f99a19a8dcf1e0ca73488053ef7b388
  Building wheel for urwid (setup.py): started
  Building wheel for urwid (setup.py): finished with status 'done'
  Created wheel for urwid: filename=urwid-2.1.2-cp38-cp38-win_amd64.whl size=244258 sha256=2539ced4ce373fa52129cb7de895233dbd2043213c88f0b2fcbaba78834ff673
  Stored in directory: c:\users\runneradmin\appdata\local\pip\cache\wheels\28\71\e4\38b5d81438105d0e3db5016cf2eea6fa796d89d96a04451d4d
  Building wheel for future (setup.py): started
  Building wheel for future (setup.py): finished with status 'done'
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491059 sha256=98d2e65fa8ced4303543c987b3903db64b44e0d664614e5705b202170c25fb00
  Stored in directory: c:\users\runneradmin\appdata\local\pip\cache\wheels\8e\70\28\3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4
Successfully built biplist bs4 frida google-play-scraper blinker kaitaistruct pyperclip urwid future
Failed to build lief
Installing collected packages: pycparser, MarkupSafe, cffi, Werkzeug, wcwidth, ruamel.yaml.clib, pyasn1, parso, Jinja2, itsdangerous, ipython-genutils, hyperframe, hpack, h11, cryptography, click, zstandard, wsproto, urwid, urllib3, traitlets, tornado, soupsieve, sortedcontainers, ruamel.yaml, python-dateutil, pyperclip, pyOpenSSL, pygments, pydivert, publicsuffix2, protobuf, prompt-toolkit, pillow, pickleshare, passlib, numpy, msgpack, ldap3, kiwisolver, kaitaistruct, jedi, idna, h2, flask, decorator, cycler, chardet, certifi, Brotli, blinker, backcall, asgiref, sqlparse, requests, pyyaml, pytz, pydot, networkx, mitmproxy, matplotlib, lxml, ipython, future, beautifulsoup4, asn1crypto, altgraph, whitenoise, waitress, shelljob, rsa, psutil, pdfkit, oscrypto, macholib, lief, libsast, IP2Location, http-tools, gunicorn, google-play-scraper, frida, Django, distro, colorlog, bs4, biplist, apkid, androguard
    Running setup.py install for lief: started
    ERROR: Command errored out with exit status 1:
     command: 'c:\hostedtoolcache\windows\python\3.8.6\x64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-install-v0ezc71r\\lief_0375618035b04888a837b698d9d3e519\\setup.py'"'"'; __file__='"'"'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-install-v0ezc71r\\lief_0375618035b04888a837b698d9d3e519\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\runneradmin\AppData\Local\Temp\pip-record-vfodfb_r\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\hostedtoolcache\windows\python\3.8.6\x64\Include\lief'
         cwd: C:\Users\runneradmin\AppData\Local\Temp\pip-install-v0ezc71r\lief_0375618035b04888a837b698d9d3e519\
    Complete output (87 lines):
    0.10.1
    running install
    running build
    running build_ext
    cmake C:\Users\runneradmin\AppData\Local\Temp\pip-install-v0ezc71r\lief_0375618035b04888a837b698d9d3e519 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\runneradmin\AppData\Local\Temp\pip-install-v0ezc71r\lief_0375618035b04888a837b698d9d3e519\build\temp.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\hostedtoolcache\windows\python\3.8.6\x64\python.exe -DLIEF_PYTHON_API=on -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\runneradmin\AppData\Local\Temp\pip-install-v0ezc71r\lief_0375618035b04888a837b698d9d3e519\build\temp.win-amd64-3.8 -DLIEF_USE_CRT_RELEASE=MT -A x64
    -- Building for: Visual Studio 16 2019
    -- LIEF_CRT: /MT
    -- Using Release VC++ CRT: MT
    -- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE CPPCHECK_POSSIBLEERROR_ARG CPPCHECK_UNUSEDFUNC_ARG CPPCHECK_STYLE_ARG CPPCHECK_INCLUDEPATH_ARG CPPCHECK_QUIET_ARG)
    -- The C compiler identification is MSVC 19.28.29335.0
    -- The CXX compiler identification is MSVC 19.28.29335.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- LIEF 0.10.0
    -- ccache: ON
    -- Enable JSON support
    -- Enable Frozen (C++14 support)
    -- Number of parallel compiler jobs set to /MP
    -- Could NOT find cppcheck (missing: CPPCHECK_EXECUTABLE CPPCHECK_POSSIBLEERROR_ARG CPPCHECK_UNUSEDFUNC_ARG CPPCHECK_STYLE_ARG CPPCHECK_INCLUDEPATH_ARG CPPCHECK_QUIET_ARG)
    -- Configuration Types: Debug;Release;MinSizeRel;RelWithDebInfo
    -- Build Types: Release
    -- Found PythonInterp: C:/hostedtoolcache/windows/Python/3.8.6/x64/python.exe (found suitable version "3.8.6", minimum required is "3.5")
    -- Found PythonLibs: C:/hostedtoolcache/windows/Python/3.8.6/x64/libs/Python38.lib
    -- Python version: 3.5
    -- Python lib:     C:/hostedtoolcache/windows/Python/3.8.6/x64/libs/Python38.lib
    -- Python include: C:/hostedtoolcache/windows/Python/3.8.6/x64/include
    -- Python interpreter: C:/hostedtoolcache/windows/Python/3.8.6/x64/python.exe
    -- Performing Test C_SUPPORTS_NO_MACRO_REDEFINED
    -- Performing Test C_SUPPORTS_NO_MACRO_REDEFINED - Failed
    -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED
    -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED - Failed
    -- Performing Test C_SUPPORTS_NO_DEPRECATED_DECLARATIONS
    -- Performing Test C_SUPPORTS_NO_DEPRECATED_DECLARATIONS - Failed
    -- Performing Test CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS
    -- Performing Test CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS - Failed
    -- Performing Test HAS_ANSI
    -- Performing Test HAS_ANSI - Failed
    CMake Error at CMakeLists.txt:541 (add_subdirectory):
      add_subdirectory given source
      "C:/Users/runneradmin/AppData/Local/Temp/pip-install-v0ezc71r/lief_0375618035b04888a837b698d9d3e519/package"
      which is not an existing directory.

    -- Configuring incomplete, errors occurred!
    See also "C:/Users/runneradmin/AppData/Local/Temp/pip-install-v0ezc71r/lief_0375618035b04888a837b698d9d3e519/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/runneradmin/AppData/Local/Temp/pip-install-v0ezc71r/lief_0375618035b04888a837b698d9d3e519/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeError.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-v0ezc71r\lief_0375618035b04888a837b698d9d3e519\setup.py", line 363, in <module>
        setup(
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\site-packages\setuptools\__init__.py", line 165, in setup
        return distutils.core.setup(**attrs)
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-v0ezc71r\lief_0375618035b04888a837b698d9d3e519\setup.py", line 78, in run
        self.build_extension(ext)
      File "C:\Users\runneradmin\AppData\Local\Temp\pip-install-v0ezc71r\lief_0375618035b04888a837b698d9d3e519\setup.py", line 202, in build_extension
        subprocess.check_call(configure_cmd, cwd=self.build_temp, env=env)
      File "c:\hostedtoolcache\windows\python\3.8.6\x64\lib\subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)

This is probably missing build dependencies in the CI (Github Actions)

Describe the solution you'd like LIEF python 3.8, windows 64bit wheel

Describe alternatives you've considered

Detailed documentation on developer setup

Additional context Add any other context or screenshots about the feature request here.

romainthomas commented 3 years ago

Hi @ajinabraham, LIEF v0.11.0 is scheduled around January/February and will adress this bug along with Python wheel 3.8/3.9 for Windows.

It will be release on PyPI but for the moment you can try it with:

pip install [--user] --index-url  https://lief-project.github.io/packages lief
ajinabraham commented 3 years ago

Closing as 0.11 address this