<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr"><br></div><div dir="ltr">Well, if those static libraries are not even built for macOS….. they are never going to work on a mac.</div><div dir="ltr"><br></div><div dir="ltr">You need to either build them yourself, or download binaries for the OS you are actually using…</div><div dir="ltr"><br><blockquote type="cite">On 7 Jul 2022, at 11:31 pm, Tao Zhang <tao.zhang@colorado.edu> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="moz-cite-prefix">Chris,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"> Yes. I download those *.a from other
platform, not from Mac. <br>
</div>
<div class="moz-cite-prefix"> Gfortran works fine in my Mac if I do
not call those *.a in a code.</div>
<div class="moz-cite-prefix"> <br>
</div>
<div class="moz-cite-prefix"> <a class="moz-txt-link-freetext" href="https://github.com/NOAA-EMC/NCEPLIBS">https://github.com/NOAA-EMC/NCEPLIBS</a>
does not mention which platform the libs support.</div>
<div class="moz-cite-prefix"> </div>
<div class="moz-cite-prefix"> Thanks</div>
<div class="moz-cite-prefix"> Tao <br>
</div>
<div class="moz-cite-prefix"> <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 7/7/22 4:22 PM, Chris Jones wrote:<br>
</div>
<blockquote type="cite" cite="mid:A307BC0B-C2F6-4FB0-9615-80EEEF696F94@hep.phy.cam.ac.uk">
<div dir="ltr"><br>
</div>
<div dir="ltr">These are really questions not for macports, but
for the maintainers of the static libs, which I presume you
downloaded in binary form from somewhere? The first question is
what platforms do the libs support ? 64 or 32 bit, etc…</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Gfortran from macports works fine. This part is not
your problem… it should work just fine with those libs as long
as you use them correctly, which it doesn’t look like you
currently are doing..</div>
<div dir="ltr"><br>
<blockquote type="cite">On 7 Jul 2022, at 11:13 pm, Tao Zhang
<a class="moz-txt-link-rfc2396E" href="mailto:tao.zhang@colorado.edu"><tao.zhang@colorado.edu></a> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="moz-cite-prefix">
<div class="moz-cite-prefix">Sorry for the wrong info. below
is the new one.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Hi,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">When I compile the code in
other machine (maybe Linux), it works fine. But it does
not work in Mac because of the lib. issue. see below. <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I find that there are some
info. about NCEP lib., see <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><a class="moz-txt-link-freetext" href="https://github.com/NOAA-EMC/NCEPLIBS" moz-do-not-send="true">https://github.com/NOAA-EMC/NCEPLIBS</a></div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I am asking if Macport can
easily install some of them, especially for <a href="https://github.com/NOAA-EMC/NCEPLIBS-bacio" moz-do-not-send="true">NCEPLIBS-bacio</a>, <a href="https://github.com/NOAA-EMC/NCEPLIBS-ip" moz-do-not-send="true">NCEPLIBS-ip</a>, <a href="https://github.com/NOAA-EMC/NCEPLIBS-sp" moz-do-not-send="true">NCEPLIBS-sp</a>,</div>
<div class="moz-cite-prefix"> <br>
</div>
<div class="moz-cite-prefix"> <a href="https://github.com/NOAA-EMC/NCEPLIBS-w3emc" moz-do-not-send="true">NCEPLIBS-w3emc</a>, and <strong itemprop="name" class="mr-2 flex-self-stretch"><a data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="https://github.com/NOAA-EMC/NCEPLIBS-w3nco" moz-do-not-send="true">NCEPLIBS-w3nco</a><br>
</strong></div>
<div class="moz-cite-prefix"><br>
<strong itemprop="name" class="mr-2 flex-self-stretch"></strong></div>
<div class="moz-cite-prefix">Also, does gfortran work with
these libs.?<br>
<br>
</div>
<div class="moz-cite-prefix"> <br>
</div>
<div class="moz-cite-prefix"> Thanks <br>
<br>
Tao <br>
<br>
<br>
/Users/tzhang/Disk/CPC/mkgrbsst/anncli/File2> gflib
gribsst.daily.PSD.SST_cli.1991-2020.f <br>
ld: warning: ignoring file
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libsp_4.a, file was
built for archive which is not the architecture being
linked (x86_64):
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libsp_4.a <br>
ld: warning: ignoring file
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libip_4.a, file was
built for archive which is not the architecture being
linked (x86_64):
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libip_4.a <br>
ld: warning: ignoring file
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3emc_4.a, file was
built for archive which is not the architecture being
linked (x86_64):
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3emc_4.a <br>
ld: warning: ignoring file
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3nco_4.a, file was
built for archive which is not the architecture being
linked (x86_64):
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3nco_4.a <br>
ld: warning: ignoring file
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libbacio_4.a, file was
built for archive which is not the architecture being
linked (x86_64):
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libbacio_4.a <br>
Undefined symbols for architecture x86_64: <br>
"_main", referenced from: <br>
implicit entry/start for main executable <br>
ld: symbol(s) not found for architecture x86_64 <br>
collect2: error: ld returned 1 exit status <br>
<br>
/Users/tzhang/Disk/CPC/mkgrbsst/anncli/File2> which
gfnew <br>
gfnew: aliased to gfortran -m64 -ffixed-line-length-0
-finit-local-zero -fbounds-check <br>
<br>
gflib: <br>
<br>
----- <br>
<br>
#set -x <br>
gfnew \ <br>
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libsp_4.a \ <br>
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libip_4.a \ <br>
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3emc_4.a \ <br>
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3nco_4.a \ <br>
/Users/tzhang/Disk/CPC/mkgrbsst/bin/libbacio_4.a <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<br>
</div>
</blockquote>
</blockquote>
<p><br>
</p>
</div></blockquote></body></html>