nazywam / AutoIt-Ripper

Extract AutoIt scripts embedded in PE binaries
MIT License
171 stars 34 forks source link

error: The 'lief' distribution was not found #6

Closed cw2k closed 2 years ago

cw2k commented 3 years ago

I got a problem when installing:

C:\AutoIt-Ripper>setup.py develop
running develop
running egg_info
creating autoit_ripper.egg-info
writing autoit_ripper.egg-info\PKG-INFO
writing dependency_links to autoit_ripper.egg-info\dependency_links.txt
writing requirements to autoit_ripper.egg-info\requires.txt
writing top-level names to autoit_ripper.egg-info\top_level.txt
writing manifest file 'autoit_ripper.egg-info\SOURCES.txt'
reading manifest file 'autoit_ripper.egg-info\SOURCES.txt'
writing manifest file 'autoit_ripper.egg-info\SOURCES.txt'
running build_ext
Creating c:\python39\lib\site-packages\autoit-ripper.egg-link (link to .)
Removing autoit-ripper 1.0.0 from easy-install.pth file
Adding autoit-ripper 1.0.0 to easy-install.pth file

Installed c:\autoit-ripper
Processing dependencies for autoit-ripper==1.0.0
Searching for lief==0.10.1
Reading https://pypi.org/simple/lief/
Downloading https://files.pythonhosted.org/packages/ee/b1/57241e2f5f7aac93d8d8d3ad46bf3f104a4f4ef171ca2eef38803f3868aa/lief-0.10.1.tar.gz#sha256=a487fe7234c04bccd58223dbb79214421176e2629814c7a4a887764cceb5be7c
Best match: lief 0.10.1
Processing lief-0.10.1.tar.gz
Writing C:\Users\user\AppData\Local\Temp\easy_install-uakpf7ye\lief-0.10.1\setup.cfg
Running lief-0.10.1\setup.py -q bdist_egg --dist-dir C:\Users\user\AppData\Local\Temp\easy_install-uakpf7ye\lief-0.10.1\egg-dist-tmp-zvea0ss1
error: The 'lief' distribution was not found and is required by the application

Hmm I little pitty that Running lief-0.10.1\setup.py -q bdist_egg uses -q possible errors I also downloaded and unpacked this files.pythonhosted.org/packages/.../lief-0.10.1.tar and ran setup.py build there. Well first I complained about that cmake was missing so I did pip install cmake. Well having cmake there now there was this issue:

CMake Error at CMakeLists.txt:541 (add_subdirectory):
  add_subdirectory given source
  "C:/AutoIt-Ripper/2/dist/lief-0.10.1/package" which is not
  an existing directory.

So I edited CMakeLists.txt and removed line 541 (the last line):

# Package
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/package")

Now it is compiling however errors like this arraised:

-- Selecting Windows SDK version  to target Windows 10.0.18363.
<snip>
Microsoft (R) Build Engine version 14.0.25420.1
<snip>
  ...lief-0.10.1\build\temp.win-amd64-3.9\Release\lief_frozen-prefix\src\lief_froze
  n\include\frozen/bits/basic_types.h(123): note: see declaration of 'frozen::bits::carray<std::pair<Key,Value>,5>::beg
  in'
          with
          [
              Key=LIEF::Function::FLAGS,
              Value=const char *
          ]
...lief-0.10.1\src\Abstract\EnumToString.cpp(105): 
error C2127: 'enumStrings': illegal initialization of 'constexpr' entity with a non-constant expression [...lief-0.
10.1\build\temp.win-amd64-3.9\Release\LIB_LIEF.vcxproj]

Oh dear I'm not gonna fix this. Maybe I'll have more luck using another compiler like MinGW or something. However I gave up on this path.

win98se commented 3 years ago

This issue is related with https://github.com/lief-project/LIEF/issues/471 and https://github.com/lief-project/LIEF/issues/438. @nazywam, if possible, may you use a higher version of this dependency? Thank you.

nazywam commented 2 years ago

We switched from lief to pefile, I guess this shouldn't be a problem anymore