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

Cutter for Windows support and pre-built binary #14

Open
julianxhokaxhiu opened this issue Mar 21, 2020 · 18 comments
Open

Cutter for Windows support and pre-built binary #14

julianxhokaxhiu opened this issue Mar 21, 2020 · 18 comments

Comments

@julianxhokaxhiu
Copy link

Hi,

I noticed this plugin is meant to be used on Linux and Mac, but there is no mention about Windows. Is this ever going to be supported?

Will you also provide pre-built binaries in order to ease the adoption on Cutter?

Thank you in advance,
Julian

@xkubov
Copy link
Contributor

xkubov commented Mar 24, 2020

Hi, the support for Windows is on my todo list but I had no time for that until now. On side of the RetDec, it should not be a problem as Win is supported there and I am going to take a look at that in upcoming days. I will provide updates in this thread.

Right now I am working on CI for retdec-r2plugin and as a result of that, we could create pre-built binaries.

@XVilka
Copy link

XVilka commented Apr 9, 2020

It will be also solved once binary packages for r2pm are implemented: radareorg/r2pm#7

@Jirubizu
Copy link

Just curious, i tried compiling the plugin myself and providing the paths for my r2 installation on my windows machine. However, it doenst compile and still gives me errors that its not able to include the libraries.

@xkubov
Copy link
Contributor

xkubov commented May 18, 2020

Hi, yeah as stated in README.md currently, there is support only for macOS and Linux. I have been working on Windows support and currently, you can try it on branch win-support. After finishing tests and some other improvements win-support will be included in the next release.

@julianxhokaxhiu
Copy link
Author

julianxhokaxhiu commented Jun 21, 2020

Hey, I've seen now this plugin supports Windows too, which is awesome!

What about including a CI job that builds now all the artifacts on top of the latest Cutter release? ( at least for Windows )

Thank you in advance :)

//EDIT: I just posted also a clarifying question on the cutter plugins GH repo as well, in order to understand who should be the one responsible to release the artifacts. I hope this is useful in the end to get something working OOB.

@xkubov
Copy link
Contributor

xkubov commented Jun 21, 2020

Hi, I forgot to mention that here. Yes, since the last release support for Windows should be provided. Currently, I am trying to extend the CI capabilities here on Github to build the cutter plugin also for Windows but I am still struggling with a few problems. Some of them I already solved and I hope that I will manage to provide support pre-built binaries for windows soon (on the latest Cutter). I will update you with the progress here in this thread.

@julianxhokaxhiu
Copy link
Author

Hi, is there any update related to this ticket? Do you need some help?

@xkubov
Copy link
Contributor

xkubov commented Aug 13, 2020

Hi, the last thing that I need to solve for automated providing of pre-built binaries of the cutter plugin is installing QT on the Windows machine on Github Actions. It is a lot more difficult than it needs to be. I tried a few approaches but it seems that I need to settle on a solution like https://github.com/jurplel/install-qt-action. For Github Actions, it seems that this is the only good way.

@julianxhokaxhiu
Copy link
Author

julianxhokaxhiu commented Aug 13, 2020

Thanks for the update. I've seen that solution already being used for Azure DevOps Pipelines, and as Github Actions is using the same infra, I suppose that's the "de-facto" solution for now. Either way, as long as it accomplishes the goal it's fine imho :)

Looking forward for the binary releases then!

@xgdgsc
Copy link

xgdgsc commented Aug 17, 2020

I tried buiding a cutter plugin so and when switching to it in cutter, cutter just crashes silently. Is there a linux binary for current latest cutter AppImage?

@julianxhokaxhiu
Copy link
Author

julianxhokaxhiu commented Aug 19, 2020

Hi,

I've seen you've made progress and the release 0.2 indeed provides some artifacts in the Actions tab ( https://github.com/avast/retdec-r2plugin/actions/runs/213574931 ).

I did try to download the Windows one, and I did copy the DLL file within the ZIP file at this path
RetDec-R2Plugin-Build-Windows.zip\share\RadareOrg\Cutter\plugins\native\
into the suggested Cutter plugin path
%AppData%\Roaming\RadareOrg\Cutter\plugins\native\

Once I did copy that, I did try to open Cutter without any exe loaded and went into Edit -> Preferences although no plugin is listed over there.

image

Would you be able to help me by letting me know what am I missing to install the plugin? I'm currently using Cutter 1.11.1.

Thank you in advance,
Julian

@xkubov
Copy link
Contributor

xkubov commented Aug 19, 2020

Hi Julian,

Yes - Github Actions seems to be ready now; however, this problem is in the plugin itself. Unfortunately, this is a problem that I found after release, and I am currently working on it so that it is solved as soon as possible. The root of the problem seems to be in the way the plugin is linked. After I solve this, I will merge it to master and update binary packages of release so that the cutter plugin is included and post an update here.

I have seen that the new annotations are now in the Cutter master, so I will merge fix for this with the new annotations support implemented.

@xkubov
Copy link
Contributor

xkubov commented Aug 21, 2020

Hi, I have fixed the cutter plugin and tested it on macOS. The manually built cutter-plugin works just fine. I am still having problems with the pre-built ones as on Github Actions I have QT that is not compatible.

This is, however, not the case for Windows. In the run https://github.com/avast/retdec-r2plugin/actions/runs/216585095 there is the same QT installed as is used in Cutter v1.11.1. I have tried to load the resulting plugin in the Cutter on Windows but it crashed the Cutter. I have tried to build a r2ghidra-dec cutter plugin manually and ended with same result - cutter crashed at the start while trying to load the plugin. As I am not using Windows primarily is there something I am missing? Could you verify that the same happens for you with the Windows artifact above?

@julianxhokaxhiu
Copy link
Author

Hi @xkubov thanks for letting me know.

Indeed I just did try it right now and I'm also having a crash:
image

This seems to be the stack trace based on the saved dump file:

r2retdec_cutter!qt_plugin_instance+0x7d
Qt5Core!QLibrary::metaObject+0x9e
cutter+0xf4056
cutter+0xf450f
cutter+0xf42fc
cutter+0xc5fe8
cutter+0xdc5e
cutter!PyInit_CutterBindings+0x37ec7
cutter!PyInit_CutterBindings+0x37486
kernel32!BaseThreadInitThunk+0x14
ntdll!RtlUserThreadStart+0x21

It seems the crash happens somewhere within your plugin code. I can't get more than this as there's no pdb file attached.
Maybe you can try to build it in Debug mode locally and then you can try get exactly which call is triggering that.

If I can help you somehow, just let me know :)

Cheers

@julianxhokaxhiu
Copy link
Author

Just checking in, any progress on the crash?

@apkunpacker
Copy link

please provide steps to install it on android termux

@fuomag9
Copy link

fuomag9 commented Nov 7, 2020

please provide steps to install it on android termux

Assuming you manage to run cutter on termux you need to compile the plugin for aarch64 by following the instructions (I can't guarantee it'll work tho)

@apkunpacker
Copy link

apkunpacker commented Nov 7, 2020

i am using
r2pm -i retdec-r2plugin
in termux to use it with radare2 CLI but it fail somewhere on 60% without any proper reason . i guess its due to filesystem / gcc problem which i can't manage to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants