angr / angr-dev

Some helper scripts to set up an environment for angr development.
BSD 2-Clause "Simplified" License
117 stars 95 forks source link

Development install "./setup.sh -i -p angr" is not working #124

Closed gkso closed 3 years ago

gkso commented 3 years ago

Under the current version (June 23, 2021) angr-dev (cfad4e1a0112af18c6a3d7e9ca56be1dcf00559e) angr development install is not working, the following error occurs. I'm using Ubuntu 20.04.2 LTS.

Requirement already satisfied: virtualenvwrapper in /usr/lib/python3/dist-packages (4.8.4)
created virtual environment PyPy3.7.10.final.0-64 in 77ms
  creator PyPy3Posix(dest=/home/alan/.virtualenvs/angr.ta, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, pkg_resources=latest, via=copy, app_data_dir=/home/alan/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
virtualenvwrapper.user_scripts creating /home/alan/.virtualenvs/angr.ta/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/alan/.virtualenvs/angr.ta/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/alan/.virtualenvs/angr.ta/bin/preactivate
virtualenvwrapper.user_scripts creating /home/alan/.virtualenvs/angr.ta/bin/postactivate
virtualenvwrapper.user_scripts creating /home/alan/.virtualenvs/angr.ta/bin/get_env_details
Traceback (most recent call last):
  File "/home/alan/.virtualenvs/angr.ta/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/home/alan/.virtualenvs/angr.ta/site-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/alan/.virtualenvs/angr.ta/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/alan/.virtualenvs/angr.ta/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/alan/.virtualenvs/angr.ta/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
    from pip._internal.exceptions import CommandError
  File "/home/alan/.virtualenvs/angr.ta/site-packages/pip/_internal/exceptions.py", line 10, in <module>
    from pip._vendor.six import iteritems
ModuleNotFoundError: No module named 'pip._vendor.six'
[!!] An error occurred on line 332. Saved output:
wuruoyu commented 3 years ago

I modify the pypy_venv.sh as @bannsec suggests but another error pops up as follows. Any help would be greatly appreciated!

[-] pip-installing: -e mulpyplexer.
Obtaining file:///home/ruoyu/lib/angr-dev/mulpyplexer
Installing collected packages: mulpyplexer
  Running setup.py develop for mulpyplexer
    ERROR: Command errored out with exit status 1:
     command: /home/ruoyu/.virtualenvs/angr_pypy/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/ruoyu/lib/angr-dev/mulpyplexer/setup.py'"'"'; __file__='"'"'/home/ruoyu/lib/angr-dev/mulpyplexer/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /home/ruoyu/lib/angr-dev/mulpyplexer/
    Complete output (30 lines):
    running develop
    /home/ruoyu/.virtualenvs/angr_pypy/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '0.09' to '0.9'
      normalized_version,
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/ruoyu/lib/angr-dev/mulpyplexer/setup.py", line 55, in <module>
        py_modules=['mulpyplexer']
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/dist.py", line 984, in run_command
        cmd_obj.ensure_finalized()
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/home/ruoyu/.virtualenvs/angr_pypy/site-packages/setuptools/command/develop.py", line 56, in finalize_options
        easy_install.finalize_options(self)
      File "/home/ruoyu/.virtualenvs/angr_pypy/site-packages/setuptools/command/easy_install.py", line 312, in finalize_options
        'install_lib', ('install_dir', 'install_dir')
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/cmd.py", line 287, in set_undefined_options
        src_cmd_obj.ensure_finalized()
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/home/ruoyu/.virtualenvs/angr_pypy/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
        self.set_undefined_options('install',('install_layout','install_layout'))
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/cmd.py", line 290, in set_undefined_options
        setattr(self, dst_option, getattr(src_cmd_obj, src_option))
      File "/home/ruoyu/lib/angr-dev/pypy/pypy3.7-v7.3.5-linux64/lib-python/3/distutils/cmd.py", line 103, in __getattr__
        raise AttributeError(attr)
    AttributeError: install_layout
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ruoyu/.virtualenvs/angr_pypy/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/ruoyu/lib/angr-dev/mulpyplexer/setup.py'"'"'; __file__='"'"'/home/ruoyu/lib/angr-dev/mulpyplexer/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
[!!] pip failure (-e mulpyplexer). Check /tmp/setup-3488517 for details, or read it here:
ltfish commented 3 years ago

@wuruoyu This is usually caused by an outdated version of setuptools. Can you tell me which version of setuptools is installed in this new virtualenv?

wuruoyu commented 3 years ago

It works, thanks!