<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">and the command I used is:
*% sudo port install llvm-10 +universal*
But, what I see is:
*% otool -l /opt/local/libexec/llvm-10/lib/libLLVM.dylib| grep "minos\|sdk"*
minos 11.0
sdk 11.1
The sdk version looks fine, but why the minos is 11.0? shouldn't it be
10.14 as expected? What am I missing?
</pre></blockquote><div class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Well, you’re the first person I know of who has tried this, but I get what you’re up to — here are my thoughts:</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">When you try to build things universal, it happens in one of two ways. Either MacOS can build it as universal “in one go” with multiple arch flags, or MacOS cannot build it like that and you need to build it twice, once with each arch, and lipo them together.</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">MacPorts does the automatic lipoing together using a mechanism set up in the “muniversal” PortGroup.</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">When you build llvm-10, it’s a “one go” multiarch build.</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">I don’t think that the compiler would know exactly what to do with a build line like this:</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">clang++ -arch arm64 -arch x86_64 -macosx-version-min=10.14 … </pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">There is no way you can hope to build arm64 for a macosx-version-min of 10.14 (arm64 requires a version min of 11.0 I imagine). So, it is quite possible that to be helpful, it ignores your macosx-version-min=10.14 as being a likely “mistake” and bumps your macosx-version-min to something reasonable, like minos 11.0.</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">If, however, you built it separately and lipo’d them together yourself (or using the muniversal PG) something might be built that has one macosx-version-min for arm64 and a different macosx-version-min for x86_64.</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">I would say — Yuk. </pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Are you sure you want to build this exactly? If you did want to build a univeral binary that runs on x86_64 from 10.14 up, and on arm64, you might well have to build them separately and lipo them together, either manually or using the muniversal PG to do it for you.</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Best,</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Ken</pre></div></body></html>