Vector35 / Vector35/binaryninja-api

Python3 `libbz2.so` needs soname change for some distros

Open
#8,511 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 6.1.10588-dev Personal, fdddf612
  • OS: fedora-asahi-remix
  • OS Version: 44
  • CPU Architecture: arm64

Bug Description:

Looking at the log, I saw the following line:

[ScriptingProvider] Failed to import python plugin: official/Vector35_Sidekick: libbz2.so.1.0: cannot open shared object file: No such file or directory (Details...)

Clicking "Details" shows the following:

Traceback (most recent call last):
  File "/home/jvoisin/bin/binaryninja/plugins/../python/binaryninja/scriptingprovider.py", line 1205, in _load_module
    __import__(module)
    ~~~~~~~~~~^^^^^^^^
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/__init__.py", line 34, in <module>
    plugin_instance = Plugin()
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/plugin.py", line 56, in __init__
    self._register_view_types()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/plugin.py", line 539, in _register_view_types
    register_all_view_types()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/__init__.py", line 13, in register_all_view_types
    from .sidekick_view import register_sidekick_view_type
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/sidekick_view/__init__.py", line 14, in <module>
    from .sidekick_view import (
    ...<14 lines>...
    )
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/sidekick_view/sidekick_view.py", line 66, in <module>
    from ..resource_browser import showNotebookEntryInResources
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/resource_browser/__init__.py", line 4, in <module>
    from .widget import (
    ...<7 lines>...
    )
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/resource_browser/widget.py", line 39, in <module>
    from ._details import (
    ...<5 lines>...
    )
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/resource_browser/_details.py", line 20, in <module>
    from ..code_maps._detail_widget import GraphicalCodeMapDetailWidget
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/code_maps/_detail_widget.py", line 41, in <module>
    from ._graph_builder import GraphBuildResult, GraphicalCodeMapGraphBuilder, NodeKey
  File "/home/jvoisin/.binaryninja/channels/official/plugins/Vector35_Sidekick/gui/code_maps/_graph_builder.py", line 8, in <module>
    import networkx as nx
  File "/home/jvoisin/.binaryninja/python313/site-packages/networkx/__init__.py", line 19, in <module>
    from networkx import utils
  File "/home/jvoisin/.binaryninja/python313/site-packages/networkx/utils/__init__.py", line 2, in <module>
    from networkx.utils.decorators import *
  File "/home/jvoisin/.binaryninja/python313/site-packages/networkx/utils/decorators.py", line 1, in <module>
    import bz2
  File "/home/jvoisin/bin/binaryninja/plugins/python/bundled-python3/lib/python313.zip/bz2.py", line 17, in <module>
    from _bz2 import BZ2Compressor, BZ2Decompressor
ImportError: libbz2.so.1.0: cannot open shared object file: No such file or directory

Steps To Reproduce:

  • Open Binary Ninja with Sidekick installed
  • Open the logs
  • See a red error line

Expected Behavior:

  • No error

Screenshots:

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the bundled Python path shown in python313.zip/bz2.py and the _bz2 import, then trace how libbz2 is built or packaged for Linux. Compare the required libbz2.so.1.0 name with Fedora's available soname and verify that scriptingprovider.py can import the Sidekick plugin without the reported error on arm64 Fedora.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.