Ropper icon indicating copy to clipboard operation
Ropper copied to clipboard

Ubuntu install of ropper fails. NameError: name 'CS_ARCH_ARM64' is not defined. Did you mean: ' CS_ARCH_ARM'

Open csergi opened this issue 1 year ago • 6 comments

Traceback (most recent call last): File "", line 189, in _run_module_as_main File "", line 148, in _get_module_details File "", line 112, in _get_module_details File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/init.py", line 29, in from .console import Console File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/console.py", line 29, in from ropper.loaders.loader import Loader, Type File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/loaders/init.py", line 29, in from . import elf File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/loaders/elf.py", line 30, in from ropper.loaders.loader import * File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/loaders/loader.py", line 33, in from ropper.arch import * File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/arch.py", line 535, in ARM64 = ArchitectureArm64() ^^^^^^^^^^^^^^^^^^^ File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/common/abstract.py", line 41, in call self._instance = super(AbstractSingletonMeta, self).call() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/arch.py", line 441, in init super(ArchitectureArm64, self).init(CS_ARCH_ARM64, CS_MODE_ARM, 8, 4) ^^^^^^^^^^^^^ NameError: name 'CS_ARCH_ARM64' is not defined. Did you mean: 'CS_ARCH_ARM'?

Fresh install, ropper 1.13.8

csergi avatar Oct 06 '24 19:10 csergi

Many thanks. Capstone has renamed a global variable. I am fixing this in the bugfix branch

sashs avatar Oct 27 '24 09:10 sashs

Traceback (most recent call last): File "", line 189, in _run_module_as_main File "", line 148, in _get_module_details File "", line 112, in _get_module_details File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/init.py", line 29, in from .console import Console File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/console.py", line 29, in from ropper.loaders.loader import Loader, Type File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/loaders/init.py", line 29, in from . import elf File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/loaders/elf.py", line 30, in from ropper.loaders.loader import * File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/loaders/loader.py", line 33, in from ropper.arch import * File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/arch.py", line 535, in ARM64 = ArchitectureArm64() ^^^^^^^^^^^^^^^^^^^ File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/common/abstract.py", line 41, in call self._instance = super(AbstractSingletonMeta, self).call() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/astracerus/.local/lib/python3.12/site-packages/ropper/arch.py", line 441, in init super(ArchitectureArm64, self).init(CS_ARCH_ARM64, CS_MODE_ARM, 8, 4) ^^^^^^^^^^^^^ NameError: name 'CS_ARCH_ARM64' is not defined. Did you mean: 'CS_ARCH_ARM'?

Fresh install, ropper 1.13.8

I tried to install capstone == 5.0.0 , and succeed . I guess maybe low version capstone library didn't rename this global variable

fuchen-03 avatar Dec 26 '24 12:12 fuchen-03

And I wanna konw , where is the setup.py ?

Many thanks. Capstone has renamed a global variable. I am fixing this in the bugfix branch

fuchen-03 avatar Dec 26 '24 12:12 fuchen-03

My solution is use pip3 install --user 'capstone<6' Maybe you need to check your capstone version.

Naupjjin avatar Feb 23 '25 12:02 Naupjjin

Should work now with all capstone versions.

sashs avatar Feb 23 '25 18:02 sashs

@GUANZH1 setup.py is replaced with pyproject.toml In order to install ropper plz use pip install .

sashs avatar Feb 23 '25 18:02 sashs