[MacPorts] #62426: libc++: using a newer libc++ to build software on older macos systems

MacPorts noreply at macports.org
Thu Sep 29 15:00:05 UTC 2022


#62426: libc++: using a newer libc++ to build software on older macos systems
-------------------------------------+--------------------
  Reporter:  kencu                   |      Owner:  kencu
      Type:  enhancement             |     Status:  closed
  Priority:  Normal                  |  Milestone:
 Component:  ports                   |    Version:
Resolution:  fixed                   |   Keywords:
      Port:  libcxx macports-libcxx  |
-------------------------------------+--------------------

Comment (by RJVB):

 Replying to [comment:72 kencu]:
 > Although this example with the llvm libraries demonstrates the issue,
 probably by using the newest/greatest,  I believe a similar thing can
 happen with any software.

 I think what's happening is that the failing `=` operation/or is being
 executed in the "influence domain" of the wrong libc++ (or more likely,
 libc++abi). I have just done some checking with KDevelop, which has a
 code-parser *plugin* that is based on libClang (and thus libLLMV). All
 LLVM operations are internal to the plugin, which of course also links to
 a libc++. I haven't been able to notice any off behaviour by forcing the
 wrong libc++ to load. Yet.

 > BTW, I'm sure you know, up until I changed it, the clang-N ports just
 ditto copied the new headers from libc++. I removed that when I started
 installing libc++ instead.

 I saw, yes. You'll see in my clang-12 port changes that there is a proper
 way to achieve the same thing, which includes the generated libc++ headers
 (the libc++abi headers will still have to be installed by hand).

 > So all macports-clang-N installations always use the headers that match
 that libc++ version

 Yes, and that could at some point become a API problem ... since LLVM do
 not appear to care about that.

 Remember that my testing above seems to suggest that all should be fine as
 long as you use the same libc++ that was used for building the
 compiler(s). There's a bootstrap problem here, but also the question how
 LLVM imagine their default build should be used. Because your demo issue
 should bite on every platform that uses libc++ as the system C++ runtime.

 >
 > https://github.com/macports/macports-
 ports/blob/d08617c395900282d3034185baf81987a9954e59/lang/llvm-9.0/Portfile#L597

-- 
Ticket URL: <https://trac.macports.org/ticket/62426#comment:74>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list