<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Greg, I am repeatedly building port NCARG with a simple recipe, as part of my local testing regime.  I never use any special options related to a clang version or OpenMP.  This seems to work fine every time.  I am on a Mac Pro, currently running OS 10.14.6 Mojave and Xcode 11.3.  This also worked fine with recent earlier versions.  Here is a summary of my current recipe. </div><div dir="ltr"><br></div><div>    Create local test directory in user space, not /opt/local</div><div>    Isolate a test environment, omit /opt/local and /usr /local</div><div><br></div><div>    Install macports base, current version</div>    port install -s gcc9    (with libunwind workaround)<br>    port install -s hdf5 +gcc9<br>    port install -s ncarg<div dir="ltr"><br></div><div>I repeatedly confirmed that the hdf5 +gcc9 variant is necessary here.  OpenMP requirements seem to be satisfied automatically within this simple scenario.  It is possible that my brief executable tests (NCL scripts) are not properly exercising OpenMP.</div><div><br></div><div>I would expect that a similar recipe would also work in the standard /opt/local location.  You might not need to source-build anything other than NCARG, maybe this hdf5 variant; not sure about that.  Try this if you think it might help.</div><div><br></div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 22, 2020 at 11:58 PM Greg Earle <<a href="mailto:earle@isolar.dyndns.org" target="_blank">earle@isolar.dyndns.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I'm looking at my dev Mac and there are several versions of "clang" on <br>
the system:<br>
<br>
mac{cmbuild}% /usr/bin/clang -v<br>
Apple LLVM version 10.0.1 (clang-1001.0.46.4)<br>
Target: x86_64-apple-darwin18.7.0<br>
Thread model: posix<br>
InstalledDir: <br>
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin<br>
<br>
mac{cmbuild}% /Library/Developer/CommandLineTools/usr/bin/clang -v<br>
Apple LLVM version 10.0.1 (clang-1001.0.46.4)<br>
Target: x86_64-apple-darwin18.7.0<br>
Thread model: posix<br>
InstalledDir: /Library/Developer/CommandLineTools/usr/bin<br>
<br>
mac{cmbuild}% <br>
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang <br>
-v<br>
Apple LLVM version 10.0.1 (clang-1001.0.46.4)<br>
Target: x86_64-apple-darwin18.7.0<br>
Thread model: posix<br>
<br>
mac{cmbuild}% /opt/local/libexec/llvm-9.0/bin/clang -v<br>
clang version 9.0.1<br>
Target: x86_64-apple-darwin18.7.0<br>
Thread model: posix<br>
InstalledDir: /opt/local/libexec/llvm-9.0/bin<br>
<br>
Now the MacPorts "clang-9.0" port might be a little behind the Apple <br>
version but it has something the Apple "clang" binaries don't have - <br>
support for "-fopenmp".<br>
<br>
I'm trying to build something (NCAR Graphics) that wants/demands <br>
"-fopenmp" support.<br>
<br>
How can I get the build to use the MacPorts "clang" part of the <br>
toolchain?<br>
<br>
Do I just stick "/opt/local/libexec/llvm-9.0/bin" at the front of $PATH <br>
and hope that "gcc"/"gfortran" et al. don't have any embedded "clang" <br>
paths (like "/usr/bin/clang") in them?<br>
<br>
Or do I have to install a matching GCC port (like libgcc8/gcc8 @8.2.0) <br>
to match up with "clang-9.0"?<br>
<br>
(I'm using a gfortran that's GCC 8.2.0-based, if it matters.)<br>
<br>
Thanks,<br>
<br>
                - Greg<br>
</blockquote></div></div>
</div></div></div>