Giter Site home page Giter Site logo

Support llvm-17/16/15 on Macos about setup-cpp HOT 10 OPEN

msclock avatar msclock commented on August 17, 2024
Support llvm-17/16/15 on Macos

from setup-cpp.

Comments (10)

aminya avatar aminya commented on August 17, 2024 1

The reason it works seems to be because some version is already cached/installed on the system:
https://github.com/serious-scaffold/ss-cpp/actions/runs/8645856705/job/23703966694#step:5:18

Otherwise, it would take hours to compile Z3 and LLVM from the source for x86 if you try this on some other runner or locally.

I think there are some things we can do to reuse the already cached installations and error out for other versions. For Arm, this is totally solvable by using the official binaries.

from setup-cpp.

aminya avatar aminya commented on August 17, 2024

This has been on my TODO list. See #242.

Upvote & Fund

@aminya is using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.

Thank you in advance for helping prioritize & fund our backlog!


Fund with Polar

from setup-cpp.

msclock avatar msclock commented on August 17, 2024

@aminya thanks for your rapid feedback. Excellent workπŸ‘

from setup-cpp.

ClausKlein avatar ClausKlein commented on August 17, 2024

I can not understand why it does not work on Darwin:

bash-5.2$ sudo ./setup-cpp-x64-macos --compiler llvm-18  
Invalid semver version 18 used for the compiler.
::group::Installing llvm 18
Coerced version '18' to '18.0.0'
Installing llvm 18 x64 via direct downloading
Error: Unsupported target! (platform='darwin', version='18'). Try one of the following: {}
::endgroup::
took 0 seconds
Failed to install the llvm-18
setup-cpp finished
Run `source ~/.cpprc` or restart your shell to update the environment.
bash-5.2$ sudo ./setup-cpp-x64-macos --compiler llvm-17
Invalid semver version 17 used for the compiler.
::group::Installing llvm 17
Coerced version '17' to '17.0.0'
Installing llvm 17 x64 via direct downloading
Error: Unsupported target! (platform='darwin', version='17'). Try one of the following: {}
::endgroup::
took 0 seconds
Failed to install the llvm-17
setup-cpp finished
Run `source ~/.cpprc` or restart your shell to update the environment.
bash-5.2$ 

from setup-cpp.

ClausKlein avatar ClausKlein commented on August 17, 2024

Today, setup-cpp install llvm-14 by default, that is not helpflully!

bash-5.2$ clang --version
Homebrew clang version 17.0.6
Target: x86_64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
bash-5.2$ 

from setup-cpp.

msclock avatar msclock commented on August 17, 2024

Today, setup-cpp install llvm-14 by default, that is not helpflully!

bash-5.2$ clang --version
Homebrew clang version 17.0.6
Target: x86_64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
bash-5.2$ 

At least 15 should be installed.🧐

This is my 15.0.3 installed.

from setup-cpp.

ClausKlein avatar ClausKlein commented on August 17, 2024

No, I need at least 17 for C++ modules!

from setup-cpp.

aminya avatar aminya commented on August 17, 2024

There are no official LLVM binaries for x86 on Apple after LLVM 16. Brew builds LLVM from the source, which I consider impractical for day-to-day usage.

However, I am planning to add support for Apple ARM

from setup-cpp.

msclock avatar msclock commented on August 17, 2024

There are no official LLVM binaries for x86 on Apple after LLVM 16. Brew builds LLVM from the source, which I consider impractical for day-to-day usage.

However, I am planning to add support for Apple ARM

And is it practical to consider to use brew to install llvm-17/16. 🫀 For example:

brew install llvm@17
# export CXX as /usr/local/opt/llvm@17/bin/clang++
# export CC as /usr/local/opt/llvm@17/bin/clang
# export PATH as PATH=/usr/local/opt/llvm/bin:$PATH
brew install llvm@16
# export CXX as /usr/local/opt/llvm@16/bin/clang++
# export CC as /usr/local/opt/llvm@16/bin/clang
# export PATH as PATH=/usr/local/opt/llvm/bin:$PATH

from setup-cpp.

msclock avatar msclock commented on August 17, 2024

I have adopted the above workaround temporarily in macos-12 and it works here.

from setup-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.