Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: expected ‘)’ before ‘offset’ #992

Closed
be4zad opened this issue Nov 4, 2023 · 5 comments
Closed

error: expected ‘)’ before ‘offset’ #992

be4zad opened this issue Nov 4, 2023 · 5 comments
Assignees

Comments

@be4zad
Copy link

be4zad commented Nov 4, 2023

Describe the bug
Nothing. I just run pip install lief

Environment:

  • System and Version : Debian Sid with proot on Termux

Additional context

$ source venv/bin/activate
$ pip install lief

Collecting lief
  Using cached lief-0.12.3.zip (16.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: lief
  Building wheel for lief (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for lief (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [393 lines of output]
      <string>:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      <string>:20: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      0.12.3
      running bdist_wheel
      running build
      running build_ext
      1.11.1
      Platform: Linux
      Wheel library: lief
      cmake /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0 -DLIEF_FORCE_API_EXPORTS=ON -DLIEF_PYTHON_API=on -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build -DPYTHON_EXECUTABLE=/root/a-directory/venv/bin/python3 -DLIEF_PYTHON_API=on -DLIEF_LOGGING_DEBUG=off -DCMAKE_C_FLAGS=-Werror=implicit-function-declaration -DCMAKE_BUILD_TYPE=Release
      -- The C compiler identification is GNU 13.2.0
      -- The CXX compiler identification is GNU 13.2.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- LIEF 0.12.3
      -- Caching: ON
      CMake Warning at CMakeLists.txt:71 (message):
        Can't find cache solution
      
      
      -- Enable JSON support
      -- Enable Frozen (C++14 support)
      -- CMAKE_CXX_FLAGS_RELEASE:           -O3 -DNDEBUG
      -- CMAKE_CXX_FLAGS:
      -- CMAKE_CXX_LINK_EXECUTABLE:         <CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>
      -- CMAKE_CXX_LINK_FLAGS:
      -- CMAKE_EXE_LINKER_FLAGS:
      -- CMAKE_EXE_LINKER_FLAGS_RELEASE:
      -- CMAKE_SHARED_LINKER_FLAGS:
      -- CMAKE_SHARED_LINKER_FLAGS_RELEASE:
      -- CMAKE_CXX_LINK_LIBRARY_FILE_FLAG:
      -- CMAKE_LINK_LIBRARY_FILE_FLAG:
      -- CMAKE_LINK_INTERFACE_LIBRARIES:
      -- CMAKE_CXX_IMPLICIT_LINK_LIBRARIES: stdc++;m;gcc_s;gcc;c;gcc_s;gcc
      -- CMAKE_SYSTEM_PROCESSOR:            armv8l
      -- Performing Test C_SUPPORTS_WALL
      -- Performing Test C_SUPPORTS_WALL - Success
      -- Performing Test CXX_SUPPORTS_WALL
      -- Performing Test CXX_SUPPORTS_WALL - Success
      -- Performing Test C_SUPPORTS_WEXTRA
      -- Performing Test C_SUPPORTS_WEXTRA - Success
      -- Performing Test CXX_SUPPORTS_WEXTRA
      -- Performing Test CXX_SUPPORTS_WEXTRA - Success
      -- Performing Test C_SUPPORTS_WPEDANTIC
      -- Performing Test C_SUPPORTS_WPEDANTIC - Success
      -- Performing Test CXX_SUPPORTS_WPEDANTIC
      -- Performing Test CXX_SUPPORTS_WPEDANTIC - Success
      -- Performing Test C_SUPPORTS_NO_STACK_PROTECTOR
      -- Performing Test C_SUPPORTS_NO_STACK_PROTECTOR - Success
      -- Performing Test CXX_SUPPORTS_NO_STACK_PROTECTOR
      -- Performing Test CXX_SUPPORTS_NO_STACK_PROTECTOR - Success
      -- Performing Test C_SUPPORTS_OMIT_FRAME_POINTER
      -- Performing Test C_SUPPORTS_OMIT_FRAME_POINTER - Success
      -- Performing Test CXX_SUPPORTS_OMIT_FRAME_POINTER
      -- Performing Test CXX_SUPPORTS_OMIT_FRAME_POINTER - Success
      -- Performing Test C_SUPPORTS_NO_STRICT_ALIASING
      -- Performing Test C_SUPPORTS_NO_STRICT_ALIASING - Success
      -- Performing Test CXX_SUPPORTS_NO_STRICT_ALIASING
      -- Performing Test CXX_SUPPORTS_NO_STRICT_ALIASING - Success
      -- Performing Test C_SUPPORTS_EXCEPTION
      -- Performing Test C_SUPPORTS_EXCEPTION - Success
      -- Performing Test CXX_SUPPORTS_EXCEPTION
      -- Performing Test CXX_SUPPORTS_EXCEPTION - Success
      -- Performing Test C_SUPPORTS_NO_EXPANSION_TO_DEFINED
      -- Performing Test C_SUPPORTS_NO_EXPANSION_TO_DEFINED - Success
      -- Performing Test CXX_SUPPORTS_NO_EXPANSION_TO_DEFINED
      -- Performing Test CXX_SUPPORTS_NO_EXPANSION_TO_DEFINED - Success
      -- Performing Test C_SUPPORTS_ERR_RET_TYPE
      -- Performing Test C_SUPPORTS_ERR_RET_TYPE - Success
      -- Performing Test CXX_SUPPORTS_ERR_RET_TYPE
      -- Performing Test CXX_SUPPORTS_ERR_RET_TYPE - Success
      -- Performing Test C_SUPPORTS_DIAGNOSTICS_COLOR
      -- Performing Test C_SUPPORTS_DIAGNOSTICS_COLOR - Success
      -- Performing Test CXX_SUPPORTS_DIAGNOSTICS_COLOR
      -- Performing Test CXX_SUPPORTS_DIAGNOSTICS_COLOR - Success
      -- Performing Test C_SUPPORTS_COLOR_DIAGNOSTICS
      -- Performing Test C_SUPPORTS_COLOR_DIAGNOSTICS - Failed
      -- Performing Test CXX_SUPPORTS_COLOR_DIAGNOSTICS
      -- Performing Test CXX_SUPPORTS_COLOR_DIAGNOSTICS - Failed
      -- Configuration Types:
      -- Build Types:         Release
      CMake Deprecation Warning at api/python/CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      
      CMake Warning (dev) at cmake/FindPythonLibsNew.cmake:98 (find_package):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning.
      
      Call Stack (most recent call first):
        api/python/CMakeLists.txt:35 (find_package)
      This warning is for project developers.  Use -Wno-dev to suppress it.
      
      -- Found PythonInterp: /root/a-directory/venv/bin/python3 (found suitable version "3.11.6", minimum required is "3.6")
      -- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython3.11.so
      -- Python version:     3.11.6
      -- Python lib:         /usr/lib/arm-linux-gnueabihf/libpython3.11.so
      -- Python include:     /usr/include/python3.11
      -- Python interpreter: /root/a-directory/venv/bin/python3
      -- Performing Test C_SUPPORTS_NO_MACRO_REDEFINED
      -- Performing Test C_SUPPORTS_NO_MACRO_REDEFINED - Success
      -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED
      -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED - Success
      -- Performing Test C_SUPPORTS_NO_DEPRECATED_DECLARATIONS
      -- Performing Test C_SUPPORTS_NO_DEPRECATED_DECLARATIONS - Success
      -- Performing Test CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS
      -- Performing Test CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS - Success
      -- Performing Test HAS_ANSI
      -- Performing Test HAS_ANSI - Success
      -- Configuring done (68.2s)
      -- Generating done (7.2s)
      -- Build files have been written to: /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311
      Using 1 jobs
      [  0%] Creating directories for 'lief_pybind11_project'
      [  0%] Performing download step (verify and extract) for 'lief_pybind11_project'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//pybind11-2.10.1.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/pybind11-2.10.1.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/api/python/lief_pybind11_project-prefix/src/lief_pybind11_project'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [  1%] No update step for 'lief_pybind11_project'
      [  1%] No patch step for 'lief_pybind11_project'
      [  1%] No configure step for 'lief_pybind11_project'
      [  2%] No build step for 'lief_pybind11_project'
      [  2%] No install step for 'lief_pybind11_project'
      [  2%] Completed 'lief_pybind11_project'
      [  2%] Built target lief_pybind11_project
      [  2%] Creating directories for 'lief_spdlog_project'
      [  2%] Performing download step (verify and extract) for 'lief_spdlog_project'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//spdlog-1.9.2.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/spdlog-1.9.2.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/lief_spdlog_project-prefix/src/lief_spdlog_project'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [  2%] No update step for 'lief_spdlog_project'
      [  2%] No patch step for 'lief_spdlog_project'
      [  2%] No configure step for 'lief_spdlog_project'
      [  2%] No build step for 'lief_spdlog_project'
      [  3%] No install step for 'lief_spdlog_project'
      [  3%] Completed 'lief_spdlog_project'
      [  3%] Built target lief_spdlog_project
      [  3%] Creating directories for 'lief_span'
      [  3%] Performing download step (verify and extract) for 'lief_span'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//tcb-span-d6c6e30.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/tcb-span-d6c6e30.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/lief_span-prefix/src/lief_span'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [  3%] No update step for 'lief_span'
      [  4%] No patch step for 'lief_span'
      [  4%] No configure step for 'lief_span'
      [  4%] No build step for 'lief_span'
      [  4%] No install step for 'lief_span'
      [  4%] Completed 'lief_span'
      [  4%] Built target lief_span
      [  4%] Creating directories for 'lief_libjson'
      [  5%] Performing download step (verify and extract) for 'lief_libjson'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//json-3.11.2.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/json-3.11.2.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/lief_libjson-prefix/src/lief_libjson'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [  5%] No update step for 'lief_libjson'
      [  5%] No patch step for 'lief_libjson'
      [  5%] No configure step for 'lief_libjson'
      [  5%] No build step for 'lief_libjson'
      [  5%] No install step for 'lief_libjson'
      [  5%] Completed 'lief_libjson'
      [  5%] Built target lief_libjson
      [  5%] Creating directories for 'lief_mbed_tls'
      [  5%] Performing download step (verify and extract) for 'lief_mbed_tls'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//mbedtls-3.2.1.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/mbedtls-3.2.1.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/mbed_tls/src/lief_mbed_tls'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [  5%] No update step for 'lief_mbed_tls'
      [  5%] No patch step for 'lief_mbed_tls'
      [  6%] No configure step for 'lief_mbed_tls'
      [  6%] No build step for 'lief_mbed_tls'
      [  6%] No install step for 'lief_mbed_tls'
      [  6%] Completed 'lief_mbed_tls'
      [  6%] Built target lief_mbed_tls
      [  6%] Creating directories for 'lief_frozen'
      [  6%] Performing download step (verify and extract) for 'lief_frozen'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//frozen-e6ddc43.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/frozen-e6ddc43.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/lief_frozen-prefix/src/lief_frozen'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [  6%] No update step for 'lief_frozen'
      [  7%] No patch step for 'lief_frozen'
      [  7%] No configure step for 'lief_frozen'
      [  7%] No build step for 'lief_frozen'
      [  7%] No install step for 'lief_frozen'
      [  8%] Completed 'lief_frozen'
      [  8%] Built target lief_frozen
      [  9%] Creating directories for 'lief_leaf'
      [  9%] Performing download step (verify and extract) for 'lief_leaf'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//leaf-1.81.0-prerelease.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/leaf-1.81.0-prerelease.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/lief_leaf-prefix/src/lief_leaf'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [  9%] No update step for 'lief_leaf'
      [  9%] No patch step for 'lief_leaf'
      [  9%] No configure step for 'lief_leaf'
      [  9%] No build step for 'lief_leaf'
      [  9%] No install step for 'lief_leaf'
      [  9%] Completed 'lief_leaf'
      [  9%] Built target lief_leaf
      [  9%] Creating directories for 'lief_utfcpp'
      [ 10%] Performing download step (verify and extract) for 'lief_utfcpp'
      -- verifying file...
           file='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party//utfcpp-3.2.1.zip'
      -- verifying file... done
      -- extracting...
           src='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/third-party/utfcpp-3.2.1.zip'
           dst='/tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/build/temp.linux-armv8l-cpython-311/lief_utfcpp-prefix/src/lief_utfcpp'
      -- extracting... [tar xfz]
      -- extracting... [analysis]
      -- extracting... [rename]
      -- extracting... [clean up]
      -- extracting... done
      [ 10%] No update step for 'lief_utfcpp'
      [ 10%] No patch step for 'lief_utfcpp'
      [ 10%] No configure step for 'lief_utfcpp'
      [ 10%] No build step for 'lief_utfcpp'
      [ 10%] No install step for 'lief_utfcpp'
      [ 10%] Completed 'lief_utfcpp'
      [ 10%] Built target lief_utfcpp
      [ 10%] Generating internal/utfcpp/utf8.h
      [ 10%] Generating include/LIEF/third-party/internal/leaf.hpp
      [ 10%] Generating include/LIEF/third-party/internal/span.hpp
      [ 10%] Generating internal/nlohmann/json.hpp
      [ 10%] Building CXX object CMakeFiles/LIB_LIEF.dir/src/errors.cpp.o
      [ 10%] Building CXX object CMakeFiles/LIB_LIEF.dir/src/hash_stream.cpp.o
      [ 11%] Building CXX object CMakeFiles/LIB_LIEF.dir/src/logging.cpp.o
      [ 11%] Building CXX object CMakeFiles/LIB_LIEF.dir/src/exception.cpp.o
      In file included from /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/src/exception.cpp:19:
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:75:38: error: expected ‘)’ before ‘offset’
         75 |   explicit read_out_of_bound(uint64_t offset, uint64_t size);
            |                             ~        ^~~~~~~
            |                                      )
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:76:38: error: expected ‘)’ before ‘offset’
         76 |   explicit read_out_of_bound(uint64_t offset);
            |                             ~        ^~~~~~~
            |                                      )
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/src/exception.cpp:50:1: error: no declaration matches ‘LIEF::read_out_of_bound::read_out_of_bound(uint64_t, uint64_t)’
         50 | read_out_of_bound::read_out_of_bound(uint64_t offset, uint64_t size) : LIEF::exception("") {
            | ^~~~~~~~~~~~~~~~~
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note: candidates are: ‘LIEF::read_out_of_bound::read_out_of_bound(LIEF::read_out_of_bound&&)’
         71 | class LIEF_API read_out_of_bound : public exception {
            |                ^~~~~~~~~~~~~~~~~
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(const LIEF::read_out_of_bound&)’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound()’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:73:20: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(const LIEF::exception&) [inherited from LIEF::exception]’
         73 |   using exception::exception;
            |                    ^~~~~~~~~
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:73:20: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(std::string) [inherited from LIEF::exception]’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:73:20: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(const char*) [inherited from LIEF::exception]’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note: ‘class LIEF::read_out_of_bound’ defined here
         71 | class LIEF_API read_out_of_bound : public exception {
            |                ^~~~~~~~~~~~~~~~~
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/src/exception.cpp:58:1: error: no declaration matches ‘LIEF::read_out_of_bound::read_out_of_bound(uint64_t)’
         58 | read_out_of_bound::read_out_of_bound(uint64_t offset) : LIEF::exception("") {
            | ^~~~~~~~~~~~~~~~~
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note: candidates are: ‘LIEF::read_out_of_bound::read_out_of_bound(LIEF::read_out_of_bound&&)’
         71 | class LIEF_API read_out_of_bound : public exception {
            |                ^~~~~~~~~~~~~~~~~
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(const LIEF::read_out_of_bound&)’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound()’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:73:20: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(const LIEF::exception&) [inherited from LIEF::exception]’
         73 |   using exception::exception;
            |                    ^~~~~~~~~
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:73:20: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(std::string) [inherited from LIEF::exception]’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:73:20: note:                 ‘LIEF::read_out_of_bound::read_out_of_bound(const char*) [inherited from LIEF::exception]’
      /tmp/pip-install-52ewm9j6/lief_cc28cbc7016c4c068151ac682aa2ccd0/include/LIEF/exception.hpp:71:16: note: ‘class LIEF::read_out_of_bound’ defined here
         71 | class LIEF_API read_out_of_bound : public exception {
            |                ^~~~~~~~~~~~~~~~~
      make[3]: *** [CMakeFiles/LIB_LIEF.dir/build.make:138: CMakeFiles/LIB_LIEF.dir/src/exception.cpp.o] Error 1
      make[2]: *** [CMakeFiles/Makefile2:411: CMakeFiles/LIB_LIEF.dir/all] Error 2
      make[1]: *** [CMakeFiles/Makefile2:472: api/python/CMakeFiles/pyLIEF.dir/rule] Error 2
      make: *** [Makefile:306: pyLIEF] Error 2
      Traceback (most recent call last):
        File "/root/a-directory/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/root/a-directory/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/root/a-directory/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 434, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 484, in <module>
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 369, in run
          self.run_command("build")
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-vu9xs2jp/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 98, in run
        File "<string>", line 308, in build_extension
        File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['make', '-j', '1', 'pyLIEF']' returned non-zero exit status 2.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lief
Failed to build lief
ERROR: Could not build wheels for lief, which is required to install pyproject.toml-based projects

uname output:

Linux localhost 6.2.1-PRoot-Distro #2 SMP PREEMPT Wed Mar 15 17:29:14 KST 2023 armv8l GNU/Linux

Related
https://aur.archlinux.org/packages/python-lief#comment-914118

@romainthomas
Copy link
Member

Collecting lief
  Using cached lief-0.12.3.zip (16.2 MB)

@be4zad
Copy link
Author

be4zad commented Nov 5, 2023

I removed cached packages and tried again but it still install version 0.12.3.

$ pip install lief==0.13.2
ERROR: Could not find a version that satisfies the requirement lief==0.13.2 (from versions: 0.8.0.post7, 0.8.1.post1, 0.8.2.post1, 0.8.3.post3, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.11.5, 0.12.0, 0.12.1, 0.12.2, 0.12.3)
ERROR: No matching distribution found for lief==0.13.2

@romainthomas
Copy link
Member

PRoot-Distro [...] armv8l GNU/Linux

@Alexjr2
Copy link

Alexjr2 commented May 9, 2024

installed lief latest version and fix for termux user.. tested on termux arm64 device with python3.11.

pip install git+https://github.com/lief-project/LIEF.git#subdirectory=api/python && pkg install patchelf && patchelf --add-needed libpython3.11.so /data/data/com.termux/files/usr/lib/python3.11/site-packages/lief/_lief.so && patchelf --add-needed libandroid.so /data/data/com.termux/files/usr/lib/python3.11/site-packages/lief/_lief.so

@Alexjr2
Copy link

Alexjr2 commented May 9, 2024

IMG_20240509_180746_904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants