NCEPLIB in Mac

Chris Jones jonesc at hep.phy.cam.ac.uk
Thu Jul 7 22:49:22 UTC 2022


The build instructions at

https://github.com/NOAA-EMC/NCEPLIBS

Do not look too complex, a fairly standard looking cmake build. It might not be too hard for an interested party to create a portfile for it….

> On 7 Jul 2022, at 11:37 pm, Tao Zhang <tao.zhang at colorado.edu> wrote:
> 
> 
> Yes. I have to build it by myself if Macport does not have these package.
> Thanks
>  Tao
> 
>> On 7/7/22 4:33 PM, Chris Jones wrote:
>> 
>> Well, if those static libraries are not even built for macOS….. they are never going to work on a mac.
>> 
>> You need to either build them yourself, or download binaries for the OS you are actually using…
>> 
>>> On 7 Jul 2022, at 11:31 pm, Tao Zhang <tao.zhang at colorado.edu> wrote:
>>> 
>>> 
>>> 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, NCEPLIBS-ip, NCEPLIBS-sp,
>>>>>  
>>>>>  NCEPLIBS-w3emc,  and 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/177f946b/attachment.htm>


More information about the macports-users mailing list