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

[MacOS] don't hardcode z3lib.so and build errors #8

Closed
nullhook opened this issue Feb 22, 2022 · 2 comments
Closed

[MacOS] don't hardcode z3lib.so and build errors #8

nullhook opened this issue Feb 22, 2022 · 2 comments

Comments

@nullhook
Copy link

nullhook commented Feb 22, 2022

if you want this to be cross-platform do not hardcode link_libraries("/usr/lib/libz3.so"). Perhaps add a dep requirement in the readme and if/else OS directive?

i have installed z3 via homebrew and it triggers the build: link_libraries("/opt/homebrew/lib/libz3.dylib")

however, I get lots of build warnings and errors half way.

.../Obfuscation/CryptoUtils.h:68:2: error: "Unknown endianness of the compilation platform, check this header aes_encrypt.h" #error

@SsageParuders
Copy link

SsageParuders commented Feb 23, 2022

For MacBook Pro with M1.
Patch CryptoUtils.h just as:obfuscator-llvm/obfuscator#160
image

@bluesadi
Copy link
Owner

Changed to:

add_llvm_component_library(LLVMObfuscation
  HelloWorld.cpp
  SplitBasicBlock.cpp
  CryptoUtils.cpp
  Utils.cpp
  Flattening.cpp
  BogusControlFlow.cpp
  Substitution.cpp
  GlobalsEncryption.cpp
  VariableSubstitution.cpp
  RandomControlFlow.cpp
  TrapAngr.cpp
  LinearMBAObfuscation.cpp
  MBAUtils.cpp

  DEPENDS
  intrinsics_gen
  
  LINK_LIBS
  z3

  LINK_COMPONENTS
  Core
  Support
  Analysis
  TransformUtils
)

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

3 participants