-
Notifications
You must be signed in to change notification settings - Fork 57
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
[help] Please provide instructions to install on Windows #7
Comments
You may use mingw64 to compile it on Windows ( Which is mentioned in #5, but I not try it, suggest you to use it on Linux ) |
cross compile for windows with mingw on linux? |
I guess you can compile it directly on Windows with MSYS2 or something? |
Ok I'll try MSYS2. I've also made a fork for using CI to compile for Windows using MSVC, can you check out why pkg-config is not finding unicorn2 even after compiling it :) |
Because the command |
Ah right. he also faces the same error. Should we try using mingw then? |
You can build udbserver in your CI after applying this patch: diff --git a/Cargo.toml b/Cargo.toml
index fa78420..3870acd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ capi = []
[dependencies]
gdbstub = "0.6"
-unicorn-engine = { version = "2.0.0-rc7", features = ["use_system_unicorn"] }
+unicorn-engine = { git = "https://github.com/unicorn-engine/unicorn", branch="dev", features = ["dynamic_linkage"] }
singlyton = "*"
[package.metadata.capi.header] It seems that unicorn is statically embedded in |
Ohh. Thanks a lot, I'll try this :) |
@bet4it Thanks a lot. It worked :D 👍🏼 |
Btw, the python bindings cant find the header during compilation. Edit: library_dirs=['../../build/win/lib','../../unicorn', '../../unicorn/'],
include_dirs=['../../build/win/include', '../../unicorn/include', '../../unicorn/include/unicorn', '../../unicorn/build/Release/include'], Error:
|
#4 is the promising way to build python bindings on Windows, let's wait until it lands, or you can change base on it. By the way, can the C bindings work on your computer? |
Nope, even the C bindings give symbol errors n/ld.exe: lib/udbserver.lib(gdbstub-3323238ae3d9c88b.gdbstub.0ea11fd1-cgu.12.rcgu.o):gdbstub.0ea11fd1-c:(.xdata[$cppxdata$_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb2c9ac909102a556E]+0xc): undefined reference to `__CxxFrameHandler3'
e:/mytools/c/winlibs/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/udbserver.lib(gdbstub-3323238ae3d9c88b.gdbstub.0ea11fd1-cgu.12.rcgu.o):gdbstub.0ea11fd1-c:(.xdata[$cppxdata$_ZN7gdbstub4conn5impls9tcpstream83_$LT$impl$u20$gdbstub..conn..ConnectionExt$u20$for$u20$std..net..tcp..TcpStream$GT$4peek17hc41013a9c5bab834E]+0x10): undefined reference to `__CxxFrameHandler3'
e:/mytools/c/winlibs/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/udbserver.lib(gdbstub-3323238ae3d9c88b.gdbstub.0ea11fd1-cgu.15.rcgu.o):gdbstub.0ea11fd1-c:(.xdata[$cppxdata$_ZN3std2io18default_read_exact17h24da8919fa0050e0E]+0x18): more undefined references to `__CxxFrameHandler3' follow
collect2.exe: error: ld returned 1 exit status |
If you don't mind, are you on telegram / discord / matrix? That way it would be a bit more easy to debug the errors. |
I just built udbserver on mingw64 and everything works fine like on Linux.
I'm sorry I don't have such accounts. Maybe we can use something like gitter? But it seems that it has little difference with chatting on Github😅 |
Yeah sure. I'm on gitter as well :) |
Hello 👋🏼. I just managed to run the udbserver under msys2, but how can i use it under windows python? Can i package the python module with the dependencies somehow? |
Oh, I really don't know how to do it, but as I said before, if you want to do it, remember to base on the work #4 had done. |
I just extracted the unicorn package from MSYS2 and the build folder from msys2 udbserver and pasted it into my windows Mingw64, and added |
Great! So this can only be used in MSYS2/Mingw64? Or you can use it directly on Windows? |
It can be used in Windows Python installation! however, I had to copy the include folder to my python install path, and libs to python libs folder. This can also be done by packaging these files inside the |
Hope you can send a PR on build python package for Windows by Github Action! |
Sure I will try :D |
Hello,
I've been trying to install this server following the instructions.
But while installing I'm getting:
How do I install unicorn engine for pkg-config?
The text was updated successfully, but these errors were encountered: