[ncl-talk] WRAPIT error: stdio.h: No such file or directory
Dennis Shea
shea at ucar.edu
Thu May 7 10:23:04 MDT 2020
Hi Phillippe,
Thank you. This type if information can be quite useful.
Regards
Stay Healthy
D
On Wed, May 6, 2020 at 5:28 PM Philippe Papin <pppapin at gmail.com> wrote:
> Hi Rick and Dennis,
>
> I believe I do have XCode developer tools on my Mac.
>
> Ultimately I figured out the error was related to how newer versions of
> MacOSX (I'm running v10.15.4 Catalina) store critical headers to compile C
> programs. It turns out the <stdio.h> file was in another location on my
> machine, rather than in */usr/local/lib* which is where the current
> version of *gcc* I'm using is located.
>
> To fix that, this stackoverflow thread helped (in particular setting this
> option below):
> https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave
>
> export
> CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/
>
> After that, WRAPIT was able to compile the fortran program properly!
>
> (base) Philippes-MacBook-Pro:test pppapin$ WRAPIT ex.f
>
>
>
> WRAPIT Version: 120209
>
> COMPILING ex.f
>
> LINKING
>
> END WRAPIT
>
>
>
> Hope this can be a useful guide for people who run into the same issues
> trying to use WRAPIT on a Mac.
>
> -Philippe
>
> On Wed, May 6, 2020 at 7:45 AM Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> Hi,
>>
>> Have you installed the XCode developer tools on your mac?
>>
>> Rick
>>
>> On Wed, May 6, 2020 at 2:54 AM Philippe Papin via ncl-talk <
>> ncl-talk at ucar.edu> wrote:
>>
>>> Hi NCL talk,
>>>
>>> I've been running into issues using WRAPIT on a version 6.6.2 of NCL
>>> loaded on my Mac. Just trying to use the troubleshooting example in
>>> http://www.ncl.ucar.edu/Document/Tools/WRAPIT.shtml#TroubleShooting gave
>>> me this curious error below
>>>
>>> (base) Philippes-MacBook-Pro:test pppapin$ WRAPIT ex.f
>>>
>>>
>>>
>>> WRAPIT Version: 120209
>>>
>>> *WRAPIT.c:4:10:* *fatal error: *stdio.h: No such file or directory
>>>
>>> #include *<stdio.h>*
>>>
>>> *^~~~~~~~~*
>>>
>>> compilation terminated.
>>>
>>> COMPILING ex.f
>>>
>>> LINKING
>>>
>>> *gcc:* *error: *WRAPIT.o: No such file or directory
>>>
>>> rm: WRAPIT.o: No such file or directory
>>>
>>> END WRAPIT
>>>
>>>
>>>
>>> *My information:*
>>>
>>>
>>> (base) Philippes-MacBook-Pro:test pppapin$ uname -a
>>>
>>> Darwin Philippes-MacBook-Pro.local 19.4.0 Darwin Kernel Version 19.4.0:
>>> Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64
>>> x86_64
>>>
>>>
>>> (base) Philippes-MacBook-Pro:test pppapin$ gcc --version
>>>
>>> gcc (GCC) 7.1.0
>>>
>>> Copyright (C) 2017 Free Software Foundation, Inc.
>>>
>>>
>>> (base) Philippes-MacBook-Pro:test pppapin$ ncl -V
>>>
>>> 6.6.2
>>>
>>> Dennis Shea last year showed a simple example of WRAPIT failing with a
>>> similar error message with a similar setup:
>>> http://mailman.ucar.edu/pipermail/ncl-talk/2019-June/015029.html
>>>
>>> Any reason for why this error comes up? Is this a gcc compiler issue?
>>> Any help is appreciated!
>>> -Philippe
>>>
>>> --
>>>
>>> -------------------------------------
>>> Philippe P. Papin, Ph.D.
>>> NRC Research Associate
>>> Global Modeling Division
>>> Naval Research Laboratory - Monterey, CA
>>> http://www.atmos.albany.edu/student/ppapin/
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> --
>
> -------------------------------------
> Philippe P. Papin, Ph.D.
> NRC Research Associate
> Global Modeling Division
> Naval Research Laboratory - Monterey, CA
> http://www.atmos.albany.edu/student/ppapin/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200507/b286edb3/attachment.html>
More information about the ncl-talk
mailing list