zyantific / zydis

Fast and lightweight x86/x86-64 disassembler and code generation library
https://zydis.re
MIT License
3.47k stars 434 forks source link

Installs include/Zydis/Zydis.h that refers to a missing header Zycore/Defines.h #419

Closed yurivict closed 1 year ago

yurivict commented 1 year ago

When Zycore isn't installed - Zydis installs the header include/Zydis/Zydis.h referring to a missing header Zycore/Defines.h

Version: 4.0.0 FreeBSD 13.1

flobernd commented 1 year ago

It sounds like you are trying to install Zydis using a package manager, right? I see that there is a v3.2.1 port available, but this port is unofficial and not maintained by us. Zycore is required by Zydis, so this needs to be fixed by the package/port maintainer (by specifying Zycore as a mandatory dependency).

As an alternative you could install Zydis by checking out this repository (use the v4.0.0 tag instead of master) and using CMake to compile and install the library yourself.

yurivict commented 1 year ago

But my point is that cmake should check all required dependencies and fail if something is missing.

flobernd commented 1 year ago

Ah sorry, I think I missunderstood you here. Just to clarify: You are using CMake to install Zydis (cmake .. && make install) and this completes successfully, but afterwards Zydis can not find the Zycore includes if Zycore was not already installed, right?

What is the value of the ZYAN_SYSTEM_ZYCORE CMake variable?

yurivict commented 1 year ago

Yes, it is like you described. With ZYAN_SYSTEM_ZYCORE=OFF the problem exists like I described in my OP. With ZYAN_SYSTEM_ZYCORE=ON - there is no such problem.

I don't particularly care about the bundled situation, but this behavior indicates that cmake scripts have a bug.