-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
Build failed: build zydis as a dynamic link library on MacOS #474
Comments
Hi @JamesAldridge , like @athre0z mentioned in the original issue, we don't have Intel based Mac hardware available to test this. Could you please help us debugging? The relevant code is located here: zydis/include/Zydis/ShortString.h Lines 47 to 73 in 03b7723
As you can see, we are already using a guard to disable packing for AARCH64 on APPLE: #if !(defined(ZYAN_AARCH64) && defined(ZYAN_APPLE))
# pragma pack(push, 1)
#endif Are these macros defined for you when you are building the library? This is how we define these macros: |
I think we just have to get rid of the ARM64 portion of the check and simply do: #if !defined(ZYAN_APPLE)
I originally assumed that this was only an issue on aarch64 targets where Apple does pointer authentication, but it looks like the toolchain also complains about it on Intel. |
Only ZYAN_APPLE and ZYAN_X64 are defined not ZYAN_AARCH64 when i build |
That works, just tested |
Fix zydis alignment issues when building on Intel macOS builds was discussed with zydis devs zyantific/zydis#474 Verified locally that I can run open goal with the change. Co-authored-by: JamesAldridge <jamesaldridge@gmail.com>
Seems to be the same issue as #350
System Specifications:
Operating System: macOS Sonoma 14.1 (23B74)
CPU: 2.7 GHz Quad-Core Intel Core i7
Compiler Info:
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: x86_64-apple-darwin23.1.0
Thread model: posix
When i build zydis with shared flag, the problem I've encountered is as follows.
Originally posted by @JamesAldridge in #350 (comment)
The text was updated successfully, but these errors were encountered: