Closed FrankXie05 closed 1 month ago
I use zycore provided by vcpkg.
I'm not actively using vcpkg but according to this site zycore 1.5.0 should be available via vcpkg. This version contains ZYAN_DIV64
changes and should work fine, so please check if that's the version you have.
@mappzor Thanks for your Reply. :)
I don't see the exported symbol for ZYAN_DIV64
in local Zycore.lib
. Also I don't see ZYCORE_EXPORT
in the ZYAN_DIV64
code section.
Zycore
:
#if defined(ZYAN_LINUX) && defined(ZYAN_KERNEL)
# include <asm/div64.h> /* do_div */
# define ZYAN_DIV64(n, divisor) do_div(n, divisor)
#else
# define ZYAN_DIV64(n, divisor) (n /= divisor)
#endif
This version contains ZYAN_DIV64 changes and should work fine
I think it is because zydis
will build or deploy zycore
by itself, and will not use cmake to find zycore.lib
.
https://github.com/zyantific/zydis/blob/569320ad3c4856da13b9dbf1f0d9e20bda63870e/CMakeLists.txt#L98
ZYAN_DIV64
is a macro that on Windows will simply resolve to n /= divisor
. It will never be exported as a symbol. Also Zydis doesn't need zycore.lib
at all, it only uses its headers.
Sounds like vcpkg is pulling old headers from somewhere and those don't have ZYAN_DIV64
defined at all. In that case linker tries to resolve it as external symbol and obviously fails. Unfortunately I have no idea how vcpkg deals with dependencies and how it will work with CMake logic you've referenced.
@mappzor It seems that the core of the problem may be that the version of vcpkg's zycore is too low.
Thank you for your patience in explaining. I will try to update zycore
to v1.5.0
and debug again. :)
Hi, all. I am the maintainer of vcpkg.
Recently I get an error when updating version to
v4.1.0
onx64-windows
:Note I use
zycore
provided by vcpkg.I see that the function definition of zycore is designed to work on Linux.
Request: Will our current support triplets for
ZYAN_DIV64
change due to the above reasons? Or do we need to make any adjustments to supportwindows
Related PR: https://github.com/zyantific/zydis/pull/424 https://github.com/zyantific/zycore-c/pull/62