Git Product home page Git Product logo

Comments (6)

cho-m avatar cho-m commented on August 24, 2024 1

Previous versions of homebrew LLVM worked fine out of the box

Just noting that similar issues could have (and did) happen with previous LLVM versions depending on how old the version of Xcode's LLVM was. The root cause is mixing of different LLVM headers and libraries is not officially supported.

LLVM 18 specifically introduced changes to std::make_exception_ptr so any code that uses it hits the failure when linking to Xcode's libc++.

A prior situation was LLVM 15/16 introducing verbose abort feature (which impacted Monterey and older), e.g. llvm/llvm-project#87590

from homebrew-core.

carlocab avatar carlocab commented on August 24, 2024

Can you try adding

-L"$(brew --prefix llvm)/lib/c++" -L"$(brew --prefix llvm)/lib" -lunwind

to cxxflags when building to see if it helps?

from homebrew-core.

mborland avatar mborland commented on August 24, 2024

Can you try adding

-L"$(brew --prefix llvm)/lib/c++" -L"$(brew --prefix llvm)/lib" -lunwind

to cxxflags when building to see if it helps?

With those flags added to linkflags the libraries successfully build. Full command is now:

./b2 cxxstd=20 toolset=clang --stage linkflags="-L"$(brew --prefix llvm)/lib/c++" -L"$(brew --prefix llvm)/lib" -lunwind"

from homebrew-core.

carlocab avatar carlocab commented on August 24, 2024

Good to know, thanks. Do you consider this issue resolved?

The solution isn't ideal, but making it better could prove a little painful for some other users...

from homebrew-core.

mborland avatar mborland commented on August 24, 2024

Good to know, thanks. Do you consider this issue resolved?

The solution isn't ideal, but making it better could prove a little painful for some other users...

Do you expect this to be a temporary or permanent workaround? Previous versions of homebrew LLVM worked fine out of the box and there's now a few other issues elsewhere pointing to this one.

from homebrew-core.

carlocab avatar carlocab commented on August 24, 2024

Yes, the issue seems to be that LLVM prioritises use of its included C++ headers when it has no guarantee that it will be linking with a compatible libc++. For a long time this didn't cause anyone problems. I'm not sure if this was by chance, or if there's been a policy change upstream.

from homebrew-core.

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.