NCEPLIB in Mac

Tao Zhang tao.zhang at colorado.edu
Thu Jul 7 22:31:54 UTC 2022


Chris,

  Yes. I download those *.a from other platform, not from Mac.
  Gfortran works fine in my Mac if I do not call those *.a in a code.

https://github.com/NOAA-EMC/NCEPLIBS does not mention which platform the 
libs support.
  Thanks
  Tao


On 7/7/22 4:22 PM, Chris Jones wrote:
>
> 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…
>
> 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..
>
>> On 7 Jul 2022, at 11:13 pm, Tao Zhang <tao.zhang at colorado.edu> wrote:
>>
>> 
>> Sorry for the wrong info. below is the new one.
>>
>> Hi,
>>
>> 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.
>>
>> I find that there are some info. about NCEP lib., see
>>
>> https://github.com/NOAA-EMC/NCEPLIBS
>>
>> I am asking if Macport can easily install some of them, especially 
>> for NCEPLIBS-bacio <https://github.com/NOAA-EMC/NCEPLIBS-bacio>, 
>> NCEPLIBS-ip <https://github.com/NOAA-EMC/NCEPLIBS-ip>, NCEPLIBS-sp 
>> <https://github.com/NOAA-EMC/NCEPLIBS-sp>,
>>
>> NCEPLIBS-w3emc <https://github.com/NOAA-EMC/NCEPLIBS-w3emc>,  and 
>> *NCEPLIBS-w3nco <https://github.com/NOAA-EMC/NCEPLIBS-w3nco>
>> *
>>
>> **
>> Also, does gfortran work with these libs.?
>>
>>
>>  Thanks
>>
>>  Tao
>>
>>
>> /Users/tzhang/Disk/CPC/mkgrbsst/anncli/File2> gflib 
>> gribsst.daily.PSD.SST_cli.1991-2020.f
>> 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
>> 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
>> 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
>> 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
>> 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
>> Undefined symbols for architecture x86_64:
>>   "_main", referenced from:
>>      implicit entry/start for main executable
>> ld: symbol(s) not found for architecture x86_64
>> collect2: error: ld returned 1 exit status
>>
>> /Users/tzhang/Disk/CPC/mkgrbsst/anncli/File2> which gfnew
>> gfnew:      aliased to gfortran -m64 -ffixed-line-length-0 
>> -finit-local-zero -fbounds-check
>>
>> gflib:
>>
>> -----
>>
>> #set -x
>> gfnew \
>> /Users/tzhang/Disk/CPC/mkgrbsst/bin/libsp_4.a \
>> /Users/tzhang/Disk/CPC/mkgrbsst/bin/libip_4.a \
>> /Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3emc_4.a \
>> /Users/tzhang/Disk/CPC/mkgrbsst/bin/libw3nco_4.a \
>> /Users/tzhang/Disk/CPC/mkgrbsst/bin/libbacio_4.a
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20220707/eacdbcd8/attachment.htm>


More information about the macports-users mailing list