rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.88k stars 1.15k forks source link

Allow for building plugins when using ubuntu OBS cutter and rizin packages #3377

Open wannkunstbeikor opened 1 month ago

wannkunstbeikor commented 1 month ago

Is your feature request related to a problem? Please describe.

When installing the ubuntu 22.04 (not sure if this is the case for other distros, I only tested on ubuntu) package of cutter and rizin it doesnt include any decompiler. I only tried to install the rz-ghidra decompiler by building it, but that also doesn't work, bc the package doesnt include a pkg config file and maybe probably also the library files, not sure since the build failed on getting the package config file.

Describe the solution you'd like

Include the package config file and library files in a package, so that u can build plugins for cutter and rizin when using packaged builds. This would also solve the rz-pm not being able to install plugins when using the packaged build of rizin.

Describe alternatives you've considered

Include the decompiler directly like done with the AppImage.

Additional context

CMake Error at CMakeLists.txt:8 (find_package):
  By not providing "FindRizin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Rizin", but
  CMake did not find one.

  Could not find a package configuration file provided by "Rizin" with any of
  the following names:

    RizinConfig.cmake
    rizin-config.cmake

  Add the installation prefix of "Rizin" to CMAKE_PREFIX_PATH or set
  "Rizin_DIR" to a directory containing one of the above files.  If "Rizin"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
XVilka commented 1 month ago

@ret2libc take a look please when you have time

wannkunstbeikor commented 1 month ago

I just looked at how its handled in fedora, and they have seperate devel packages for cutter and rizin, which allows plugins to build if they are installed. https://pkgs.org/download/cutter-re-devel

karliss commented 1 month ago

OBS build should already have the dev packages: image image

@wannkunstbeikor Did you install any of them?

wannkunstbeikor commented 1 month ago

Why did i never check that, I feel stupid sorry

wannkunstbeikor commented 1 month ago

okay yeah those packages exist, but librizin-dev can't be installed if libzstd-dev is already installed

Error: error processing archive /var/cache/apt/archives/librizin-dev_0.7.2-1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/pkgconfig/libzstd.pc', which is also in package libzstd-dev:amd64 1.5.6+dfsg-1~22.04.sav0
 trying to overwrite '/usr/lib/x86_64-linux-gnu/pkgconfig/libzstd.pc', which is also in package libzstd-dev:amd64 1.5.6+dfsg-1~22.04.sav0