-
Notifications
You must be signed in to change notification settings - Fork 31
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
Failing to build on Mac #245
Comments
alright, i was able to (hackily) get it working with these changes: diff --git a/src/circt-sys/build.rs b/src/circt-sys/build.rs
index b50db1c..ed3002f 100644
--- a/src/circt-sys/build.rs
+++ b/src/circt-sys/build.rs
@@ -26,7 +26,7 @@ fn main() {
.unwrap_or_else(|_| llvm_dir.join("build"));
// CIRCT/LLVM/MLIR libraries
- let lib_dirs = [circt_build_dir.join("lib"), llvm_build_dir.join("lib")];
+ let lib_dirs = [circt_build_dir.join("lib"), llvm_build_dir.join("lib"), PathBuf::from("/usr/local/Cellar/llvm/13.0.1_1/lib/")];
let lib_names = [
"CIRCTCAPIComb",
"CIRCTCAPIHW",
@@ -84,8 +84,9 @@ fn main() {
// System libraries
let system_libraries = [
- "stdc++", // llvm-config --system-libs --link-static
- "rt", "dl", "pthread", "m", "z", "tinfo",
+"LLVM-13",
+"m", "z", "curses", "xml2"
+
];
for name in &system_libraries {
println!("cargo:rustc-link-lib=dylib={}", name); |
That's fantastic thanks. I haven't tried the build on OSX in a while. Probably worth adding a CI job for it. Out of curiosity: the manual homebrew cellar path you had to add -- would that show up in |
Yup, ➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --libs --link-shared
-lLLVM-13
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --system-libs --link-shared
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --libs --link-static
-lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMCoverage -lLLVMLineEditor -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMWebAssemblyDisassembler -lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyDesc -lLLVMWebAssemblyUtils -lLLVMWebAssemblyInfo -lLLVMSystemZDisassembler -lLLVMSystemZAsmParser -lLLVMSystemZCodeGen -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSparcDisassembler -lLLVMSparcAsmParser -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMRISCVDisassembler -lLLVMRISCVAsmParser -lLLVMRISCVCodeGen -lLLVMRISCVDesc -lLLVMRISCVInfo -lLLVMPowerPCDisassembler -lLLVMPowerPCAsmParser -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMMSP430Disassembler -lLLVMMSP430AsmParser -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMipsDisassembler -lLLVMMipsAsmParser -lLLVMMipsCodeGen -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFDisassembler -lLLVMBPFAsmParser -lLLVMBPFCodeGen -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMAVRDisassembler -lLLVMAVRAsmParser -lLLVMAVRCodeGen -lLLVMAVRDesc -lLLVMAVRInfo -lLLVMARMDisassembler -lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMUtils -lLLVMARMInfo -lLLVMAMDGPUDisassembler -lLLVMAMDGPUAsmParser -lLLVMAMDGPUCodeGen -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMAMDGPUInfo -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMOrcJIT -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMDWP -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMMCA -lLLVMMCDisassembler -lLLVMLTO -lLLVMCFGuard -lLLVMFrontendOpenACC -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMFrontendOpenMP -lLLVMDWARFLinker -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMSelectionDAG -lLLVMCodeGen -lLLVMIRReader -lLLVMAsmParser -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTableGen -lLLVMSupport -lLLVMDemangle
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --system-libs --link-static
-lm -lz -lcurses -lxml2
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --libdir
/usr/local/Cellar/llvm/13.0.1_1/lib |
Awesome thanks! I've pushed a few changes to master that try to make use of |
Some of the issues I'm running into:
build.rs
attempts to compile. Fixed by settingCXX=
andCC=
to newer clang binaries.build.rs
are not the right ones for Mac -- presumably they're for Linux? I just hard-coded the Mac ones, but a better solution would probably be to callllvm-config
inbuild.rs
?Any thoughts? Totally perplexed by the reference to Itanium.
The text was updated successfully, but these errors were encountered: