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

Any plans to provide prebuilt compiler binary for macOS x64? #1585

Open
achou11 opened this issue Oct 31, 2024 · 3 comments
Open

Any plans to provide prebuilt compiler binary for macOS x64? #1585

achou11 opened this issue Oct 31, 2024 · 3 comments
Labels
Missing Feature Feature that is required for the language
Milestone

Comments

@achou11
Copy link

achou11 commented Oct 31, 2024

I'm working on an Intel-based macOS machine. Took a look at the the installation docs and seems like if I want to use c3c, I'll have to build from source. I'm guessing this was a deliberate choice (which is understandable), but wanted to write up this issue in case others come across the same question.

Wondering if there's any interest in providing a prebuild for those of us still stuck on macOS x64 😄 Thanks!

@achou11
Copy link
Author

achou11 commented Oct 31, 2024

For additional context, I have no problem with building from source, but for programming languages I like to use a proper version manager tool. In my case, I'm using mise and was attempting to install c3 using https://github.com/RobLoach/asdf-c3. While the asdf plugin could be updated to build from source in my specific case, it's definitely more convenient if a prebuilt binary is already provided.

@lerno
Copy link
Collaborator

lerno commented Oct 31, 2024

Yes, that's planned. Using brew like we do now is broken anyway, since it adds dependencies on having z3 installed through Homebrew(!!!) on LLVM 18. The Homebrew install for LLVM 19 is utterly broken. So the plan is to have a CI building LLVM, and then this can be used to link with C3 and we can build for both Intel and Aarch64

@lerno lerno added the Missing Feature Feature that is required for the language label Oct 31, 2024
@lerno lerno added this to the 0.8 milestone Oct 31, 2024
@abritov
Copy link

abritov commented Nov 27, 2024

I managed to put together all build deps to cmake c3 compiler with a nix package manager:
nix-shell -p llvmPackages_18.libllvm -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/05bbf675397d5366259409139039af8077d695ce.tar.gz cmake libxml2 lld xar
but it crushes on the finish line:

...
-- Configuring done (3.0s)
-- Generating done (4.4s)
-- Build files have been written to: /Users/int09h/projects/c3c/build
[  2%] Built target miniz
[  4%] Built target c3c_wrappers
[  5%] Linking CXX executable c3c
ld: warning: direct access in function 'std::__1::__function::__func<llvm::GenericCycle<llvm::GenericSSAContext<llvm::Function>>::print(llvm::GenericSSAContext<llvm::Function> const&) const::'lambda'(llvm::raw_ostream&), std::__1::allocator<llvm::GenericCycle<llvm::GenericSSAContext<llvm::Function>>::print(llvm::GenericSSAContext<llvm::Function> const&) const::'lambda'(llvm::raw_ostream&)>, void (llvm::raw_ostream&)>::target(std::type_info const&) const' from file '/nix/store/43wdpw9nws5jl985r6rdfgdwy30rv6vx-llvm-18.1.8-lib/lib/libLLVMAnalysis.a(CycleAnalysis.cpp.o)' to global weak symbol 'typeinfo name for llvm::GenericCycle<llvm::GenericSSAContext<llvm::Function>>::print(llvm::GenericSSAContext<llvm::Function> const&) const::'lambda'(llvm::raw_ostream&)' from file '/nix/store/43wdpw9nws5jl985r6rdfgdwy30rv6vx-llvm-18.1.8-lib/lib/libLLVMCore.a(CycleInfo.cpp.o)' means the weak symbol cannot beoverridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

With some help I can make a working solution for intel macs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing Feature Feature that is required for the language
Projects
None yet
Development

No branches or pull requests

3 participants