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

How to compile on MacOS Sonoma 14.6.1 x64 #902

Open
sillyc0n opened this issue Oct 3, 2024 · 1 comment
Open

How to compile on MacOS Sonoma 14.6.1 x64 #902

sillyc0n opened this issue Oct 3, 2024 · 1 comment

Comments

@sillyc0n
Copy link

sillyc0n commented Oct 3, 2024

Beginner question, because I must be doing something wrong.

I used instructions from the User Manual:
cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release - this one passes
and
cmake --build profiler/build --config Release --parallel - on this one i get errors:

clang: error: unknown argument: '-fexperimental-library'

and

the clang compiler does not support '-march=native'

I tried forcing brew version of llvm with a bunch of exports but it makes no difference

export PATH="/usr/local/opt/llvm/bin:$PATH
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
export CXX="/usr/local/opt/llvm/bin/clang++"
export CC="/usr/local/opt/llvm/bin/clang"

What am i missing?

@sillyc0n
Copy link
Author

sillyc0n commented Oct 5, 2024

Using these exports

export PATH="/usr/local/opt/cmake/bin:/usr/local/opt/llvm/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
export CXX="/usr/local/opt/llvm/bin/clang++"
export CC="/usr/local/opt/llvm/bin/clang"

and calling
cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DNO_ISA_EXTENSIONS=ON

cmake --build profiler/build --config Release --parallel

I can get past previous errors but it gets stuck on:

warning: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: Unknown attribute kind (86) (Producer: 'LLVM19.1.0' Reader: 'LLVM APPLE_1_1316.0.21.1_0')
fatal error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't figure out the architecture type of: /var/folders/v_/xwv19rqs4b5fbgf_txn4v79r0000gn/T/MCInstrDesc-aee33d/MCInstrDesc-x86_64.o
clang: error: lipo command failed with exit code 1 (use -v to see invocation)
make[2]: *** [_deps/capstone-build/CMakeFiles/capstone.dir/MCInstrDesc.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....

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

1 participant