<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Courier;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Andale Mono";
        panose-1:2 11 5 9 0 0 0 0 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><div><p class=MsoNormal style='margin-left:.5in'>On the Apple side I filed this a few years ago as FB7253366<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>I see. Glad you did – and sorry it did not get the appropriate reaction.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>Can the LLVM maintainers here make this change (which would be the best/simplest)? Or does it have to come from the Apple side (which appears to be far harder to reach)?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>TNX<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><div><div><p class=MsoNormal style='margin-left:.5in'>On Mon, Jun 21, 2021 at 10:52 AM Blumenthal, Uri - 0553 - MITLL via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>This is about building Clang-12 on MacOS (Big Sur 11.4, in case it matters). Some machines have a problem with how LLVM selects the SDK to use and pass to compiler as  </span><span style='font-size:12.0pt;font-family:Courier'>-isysroot</span><span style='font-size:12.0pt'>  argument. It appears that the build process locates SDK via</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;text-indent:.5in'><span style='font-size:12.0pt;font-family:Courier'>xcrun --sdk macosx –show-sdk-path</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>that returns </span><span style='font-size:12.0pt;font-family:Courier'>MacOSX11.3.sdk</span><span style='font-size:12.0pt'>, while </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;text-indent:.5in'><span style='font-size:12.0pt;font-family:Courier'>xcrun --show-sdk-path</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>returns </span><span style='font-size:12.0pt;font-family:Courier'>MacOSX.sdk</span><span style='font-size:12.0pt'>.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>I’m bringing this up to your attention, because MacOSX11.3.sdk (that is symlink’ed to MacOSX.sdk) seems to fail the build (see <a href="https://trac.macports.org/ticket/63038#comment:39" target="_blank">https://trac.macports.org/ticket/63038#comment:39</a>). It fails to locate an SDK-provided header file.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>Here’s what the problem/error looks like:</span><o:p></o:p></p><div style='border:solid #D7D7D7 1.0pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;margin-left:21.0pt;margin-right:21.0pt'><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build [ 11%] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetMachine.cpp.o</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build cd opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/build/lib/Target/AArch64 && /usr/bin/clang++ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/build/lib/Target/AArch64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/lib/Target/AArch64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/include -isystem /opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -O3 -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -mmacosx-version-min=11.0  -fno-exceptions -std=c++14 -o CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetMachine.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp:12:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/lib/Target/AArch64/AArch64TargetMachine.h:16:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/lib/Target/AArch64/AArch64InstrInfo.h:16:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/lib/Target/AArch64/AArch64.h:17:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h:18:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/memory:688:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cassert:20:10: fatal error: 'assert.h' file not found</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build #include <assert.h></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build          ^~~~~~~~~~</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:.5in;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New";color:black'>:info:build 1 error generated.</span><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>The workaround for this problem is removing the </span><span style='font-size:12.0pt;font-family:Courier'>--sdk macosx</span><span style='font-size:12.0pt'>  flag. Then </span><span style='font-size:12.0pt;font-family:Courier'>xcrun</span><span style='font-size:12.0pt'> locates the “main” MacOSX.sdk rather a symlink to it, and everything works fine. This flag is unnecessary to begin with, and harmful on some machines.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>Therefore, I’d like to request the maintainers to remove the “</span><span style='font-size:12.0pt;font-family:Courier'>--sdk macosx”</span><span style='font-size:12.0pt'>   flag from the build config.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:12.0pt'>Thank you!</span><o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='color:black'>--</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'>Regards,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'>Uri Blumenthal                              Voice: (781) 981-1638 </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'>Secure Resilient Systems and Technologies   Cell:  (339) 223-5363</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'>MIT Lincoln Laboratory                      </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'>244 Wood Street, Lexington, MA  02420-9108      </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'>Web:     <a href="https://www.ll.mit.edu/biographies/uri-blumenthal" target="_blank" title="https://www.ll.mit.edu/biographies/uri-blumenthal"><span style='color:#713C56'>https://www.ll.mit.edu/biographies/uri-blumenthal</span></a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:10.0pt;font-family:"Andale Mono";color:black'>Root CA: <a href="https://www.ll.mit.edu/llrca2.pem" target="_blank" title="https://www.ll.mit.edu/llrca2.pem"><span style='color:#713C56'>https://www.ll.mit.edu/llrca2.pem</span></a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><i><span style='color:black'>There are two ways to design a system. One is to make is so simple there are obviously no deficiencies.</span></i><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><i><span style='color:black'>The other is to make it so complex there are no obvious deficiencies.</span></i><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><i><span style='color:black'>                                                                                                                                     -  C. A. R. Hoare</span></i><o:p></o:p></p></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'> <o:p></o:p></p></div></div><p class=MsoNormal style='margin-left:.5in'>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p></blockquote></div></div></body></html>