Skip to content

Thumb2 decoder generator fails to run out-of-the-box due to grako not being updated for python 3.10 #6780

Open
@jonathanzetier

Description

@jonathanzetier

Version and Platform (required):

  • Binary Ninja Version: 5.0.7218-dev
  • OS: Ubuntu
  • OS Version: 22.04
  • CPU Architecture: x64

Bug Description:
Dependency on a dead pip dependency, grako

I've got a bug fix I'd like to make for thumb2, but I can't run binaryninja-api/arch/armv7/thumb2_disasm/generator.py because it depends on grako, which hasn't been updated in 8 years. grako fails to import with the following error:

ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

In python 3.10, Mapping was moved from collections to collections.abc.

Steps To Reproduce:

pip install grako
cd binaryninja-api/arch/armv7/thumb2_disasm
./generator.py

Expected Behavior:
One potential solution is to vendor grako into the thumb2 directory so that it can be updated as python3 changes. I'm sure workarounds exist from people who know python/python dependency management better than me, but the longer this goes on the more interesting those workarounds get.

Screenshots/Video Recording:
N/A

Binary:
N/A

Additional Information:
Please add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Arch: ARM/ThumbIssues with the ARM/Thumb architecture pluginComponent: ArchitectureIssue needs changes to an architecture pluginEffort: LowIssue should take < 1 weekImpact: LowIssue is a papercut or has a good, supported workaroundType: BugIssue is a non-crashing bug with repro steps

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions