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

Installation fails in Ubuntu 22.0.4.01 LTS (unicorn build fails) #1364

Closed
AlixAbbasi opened this issue Nov 9, 2022 · 0 comments
Closed

Installation fails in Ubuntu 22.0.4.01 LTS (unicorn build fails) #1364

AlixAbbasi opened this issue Nov 9, 2022 · 0 comments
Labels

Comments

@AlixAbbasi
Copy link

Description

I just installed Ubuntu (ARM 64) in Parallels in a M1 Mac and tried to install pwndbg. The installation fails when installer tries to install unicorn.

Steps to reproduce

  1. You need a M1 mac and parallel (alternatively you can use Multipass (both yield the same results). Then perform apt update and upgrade. Install the git package. Then clone the pwndbg repo and inside the folder issue the ./setup.sh command.
    The result is below

parallels@ubuntu-linux-22-04-desktop:~/Documents/packages$ git clone https://github.com/pwndbg/pwndbg
Cloning into 'pwndbg'...
remote: Enumerating objects: 9602, done.
remote: Counting objects: 100% (379/379), done.
remote: Compressing objects: 100% (266/266), done.
remote: Total 9602 (delta 206), reused 232 (delta 113), pack-reused 9223
Receiving objects: 100% (9602/9602), 12.83 MiB | 10.97 MiB/s, done.
Resolving deltas: 100% (7066/7066), done.
parallels@ubuntu-linux-22-04-desktop:~/Documents/packages$ cd pwndbg/
parallels@ubuntu-linux-22-04-desktop:~/Documents/packages/pwndbg$ ./setup.sh
+ hash sudo
+ PYTHON=
+ INSTALLFLAGS=
+ osx
+ uname
+ grep -i Darwin
+ '[' '' == --user ']'
+ PYTHON='sudo '
+ linux
+ uname
+ grep -i Linux
++ grep '^ID=' /etc/os-release
++ sed -e 's/"//g'
++ cut -d= -f2
+ distro=ubuntu
+ case $distro in
+ install_apt
+ sudo apt-get update
Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
+ sudo apt-get install -y git gdb python3-dev python3-pip python3-setuptools libglib2.0-dev libc6-dbg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libglib2.0-dev is already the newest version (2.72.1-1).
python3-setuptools is already the newest version (59.6.0-1.2).
python3-pip is already the newest version (22.0.2+dfsg-1).
gdb is already the newest version (12.1-0ubuntu1~22.04).
git is already the newest version (1:2.34.1-1ubuntu1.5).
libc6-dbg is already the newest version (2.35-0ubuntu3.1).
python3-dev is already the newest version (3.10.6-1~22.04).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
+ grep x86_64
+ uname -m
+ hash gdb
+ git submodule update --init --recursive
Submodule 'gdb-pt-dump' (https://github.com/martinradev/gdb-pt-dump.git) registered for path 'gdb-pt-dump'
Cloning into '/home/parallels/Documents/packages/pwndbg/gdb-pt-dump'...
Submodule path 'gdb-pt-dump': checked out 'f25898adc61d60e5f30c6452b15700bbf1bd630c'
++ gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))'
+ PYVER=3.10
++ gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)'
+ PYTHON+=/usr/bin/python
+ osx
+ uname
+ grep -i Darwin
+ PYTHON+=3.10
+ linux
+ uname
+ grep -i Linux
+ '[' -z '' ']'
++ gdb -batch -q --nx -ex 'pi import site; print(site.getsitepackages()[0])'
+ SITE_PACKAGES=/usr/local/lib/python3.10/dist-packages
+ INSTALLFLAGS='--target /usr/local/lib/python3.10/dist-packages'
+ sudo /usr/bin/python3.10 -m pip -V
pip 22.3.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
+ sudo /usr/bin/python3.10 -m pip install --target /usr/local/lib/python3.10/dist-packages --upgrade pip
Collecting pip
  Using cached pip-22.3.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Successfully installed pip-22.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
+ sudo /usr/bin/python3.10 -m pip install --target /usr/local/lib/python3.10/dist-packages -Ur requirements.txt
Ignoring unicorn: markers 'python_version < "3.7"' don't match your environment
Collecting capstone==4.0.2
  Using cached capstone-4.0.2.tar.gz (2.0 MB)
  Preparing metadata (setup.py) ... done
Collecting future==0.18.2
  Using cached future-0.18.2-py3-none-any.whl
Collecting psutil==5.9.2
  Using cached psutil-5.9.2-cp310-cp310-linux_aarch64.whl
Collecting pwntools==4.8.0
  Using cached pwntools-4.8.0-py2.py3-none-any.whl (11.7 MB)
Collecting pycparser==2.21
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting pyelftools==0.29
  Using cached pyelftools-0.29-py2.py3-none-any.whl (174 kB)
Collecting Pygments==2.13.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting ROPGadget==7.1
  Using cached ROPGadget-7.1-py3-none-any.whl (31 kB)
Collecting unicorn==2.0.0
  Using cached unicorn-2.0.0.tar.gz (2.7 MB)
  Preparing metadata (setup.py) ... done
Collecting pyserial>=2.7
  Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting paramiko>=1.15.2
  Using cached paramiko-2.12.0-py2.py3-none-any.whl (213 kB)
Collecting rpyc
  Using cached rpyc-5.2.3-py3-none-any.whl (71 kB)
Collecting requests>=2.0
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting pysocks
  Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)
Collecting sortedcontainers
  Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting intervaltree>=3.0
  Using cached intervaltree-3.1.0-py2.py3-none-any.whl
Collecting pathlib2
  Using cached pathlib2-2.3.7.post1-py2.py3-none-any.whl (18 kB)
Collecting colored-traceback
  Using cached colored_traceback-0.3.0-py3-none-any.whl
Collecting six>=1.12.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting pip>=6.0.8
  Using cached pip-22.3.1-py3-none-any.whl (2.1 MB)
Collecting mako>=1.0.0
  Using cached Mako-1.2.3-py3-none-any.whl (78 kB)
Collecting MarkupSafe>=0.9.2
  Using cached MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (26 kB)
Collecting pynacl>=1.0.1
  Using cached PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl (601 kB)
Collecting cryptography>=2.5
  Using cached cryptography-38.0.3-cp36-abi3-manylinux_2_28_aarch64.whl (4.0 MB)
Collecting bcrypt>=3.1.3
  Using cached bcrypt-4.0.1-cp36-abi3-manylinux_2_28_aarch64.whl (583 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting plumbum
  Using cached plumbum-1.8.0-py3-none-any.whl (117 kB)
Collecting cffi>=1.12
  Using cached cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (449 kB)
Building wheels for collected packages: capstone, unicorn
  Building wheel for capstone (setup.py) ... done
  Created wheel for capstone: filename=capstone-4.0.2-py3-none-manylinux1_aarch64.whl size=2066624 sha256=9c6ec0e6d239fc7e016c5bb1e2d03e15382e64776413dff1a12b45952289960e
  Stored in directory: /root/.cache/pip/wheels/e1/0d/62/54b84e3f4e675f9012fcdd5dbc7bc370293d4f01ad5ec77b62
  Building wheel for unicorn (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [4 lines of output]
      running bdist_wheel
      running build
      Building C extensions
      error: [Errno 2] No such file or directory: '/tmp/pip-install-ncteadrn/unicorn_7dbceefc9fdd4208975596ce23e4f00e/../../include/unicorn'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for unicorn
  Running setup.py clean for unicorn
Successfully built capstone
Failed to build unicorn
Installing collected packages: unicorn, sortedcontainers, pyserial, pyelftools, urllib3, six, pysocks, pyparsing, Pygments, pycparser, psutil, plumbum, pip, MarkupSafe, intervaltree, idna, future, charset-normalizer, certifi, capstone, bcrypt, rpyc, ROPGadget, requests, python-dateutil, pathlib2, packaging, mako, colored-traceback, cffi, pynacl, cryptography, paramiko, pwntools
  Running setup.py install for unicorn ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for unicorn did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      Building C extensions
      error: [Errno 2] No such file or directory: '/tmp/pip-install-ncteadrn/unicorn_7dbceefc9fdd4208975596ce23e4f00e/../../include/unicorn'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> unicorn

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
parallels@ubuntu-linux-22-04-desktop:~/Documents/packages/pwndbg$ 

My setup

Mac M1 running Ubuntu 22.04.01 in Parallel and Multipass.

parallels@ubuntu-linux-22-04-desktop:~/Downloads/pwndbg-2022.08.30$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

GDB:

(gdb) show version
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
(gdb) 

Python:

>>> import sys; print(sys.version)
3.10.6 (main, Nov  2 2022, 18:53:38) [GCC 11.3.0]
  • pwndbg version/git commit id
    --> f71a4aa, dev branch
@AlixAbbasi AlixAbbasi added the bug label Nov 9, 2022
profesorek96 added a commit to profesorek96/pwndbg that referenced this issue Nov 10, 2022
Removed version lib unicorn in file requirements.txt. This change allow run pwndbg in Parallels MacBook with M1
profesorek96 added a commit to profesorek96/pwndbg that referenced this issue Nov 10, 2022
Removed version lib unicorn in file requirements.txt. This change allow run pwndbg in Parallels MacBook with M1
profesorek96 added a commit to profesorek96/pwndbg that referenced this issue Nov 10, 2022
Removed version lib unicorn in file requirements.txt. This change allow run pwndbg in Parallels MacBook with M1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant