[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #YWJ-176640]: NetCDF installation issue in Mac OS



Good morning Dian,

In addition to the suggestions Russ has made, you might want to
make sure that XCode has installed the command line tools. Starting
about a year ago, XCode did not install command line developer tools
by default; instead, developers must request them explicitly.

Under XCode, open preferences and then go to the 'Downloads' sections.
In the 'Components' panel, you will want to install the 'Command Line
Tools' package if it is not already installed.

I hope this helps!

-Ward

On 6/18/13 8:59 AM, Russ Rew wrote:
> New Staff Reply: NetCDF installation issue in Mac OS
>
> Hi Dian
>
>> I have problem with NetCDF installation on Mac OS X ver.10.8.3.
>>
>> I had installed:
>> - the gcc,
>> - the gfortran,
>> - the OSX Xcode
>>
>> But somehow something wrong happen. It might connect with this error
>> in config.log file:
>> gcc: error: unrecognized command line option '-V'
>> gcc: fatal error: no input files
>> compilation terminated.
>>
>> I've attached the config.file here to help you diagnose the problem.
>> If you need any other files, please let me know. I appreciate very
>> much for your help, thanks.
> That '-V' error is not the problem, but this error message from config.log
> indicates that gcc is not installed or configured correctly, because it
> can't compile a simple C program:
>
>    configure:4225: checking whether the C compiler works
>    configure:4247: gcc    conftest.c  >&5
>    gcc: error trying to exec 'cc1': execvp: No such file or directory
>    configure:4251: $? = 1
>    configure:4289: result: no
>
> Until the C compiler is fixed, you can't build the netCDF library.  It
> may be something simple, such as your environment variables like PATH
> or DYLD_LIBRARY_PATH, but I can't really help much with that.
>
> Although XCode comes with its own C compiler in /usr/bin, it doesn't
> include a gfortran that works with it, and it can be difficult to
> get a gcc and gfortran that work well together for OSX.  I suggest
> you download and install the compilers from one of these sites:
>
>    http://hpc.sourceforge.net/
>    
> or follow the advice from one of these sites:
>
>    http://web.mit.edu/mfloyd/www/computing/mac/gfortran/
>    http://gcc.gnu.org/wiki/GFortranBinaries#MacOS
>
> Alternatively, if you install the "port" package from macports.org, you
> can get a the netCDF C and Fortran libraries installed by running the
> command
>
>    sudo port install netcdf-fortran
>
> although this can take a long time, because it builds gcc and gfortran from
> source first.
>
> --Russ
>
>
>
> Russ Rew                                         UCAR Unidata Program
> address@hidden                      http://www.unidata.ucar.edu
>
>
>
> Ticket Details
> ===================
> Ticket ID: YWJ-176640
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> Link:  
> https://www.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=viewticket&ticketid=22249



Ticket Details
===================
Ticket ID: YWJ-176640
Department: Support netCDF
Priority: Normal
Status: Closed