NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] Snow Leopard and netcdf4

On 9/3/09 8:19 AM, Roy Mendelssohn said:

>Has any tried to compile the full netcdf4/hdf5 suite under Mac OS
>10.6?  Does it work?  Did you include Fortran, and if so, which
>compiler?

I tried the basic:

cd netcdf
./configure

and it failed with:

configure: error: C compiler cannot create executables
See `config.log' for more details.

The log file shows:

configure:4053: cc    conftest.c  >&5
ld: library not found for -lcrt1.10.6.o
collect2: ld returned 1 exit status

If you replace the 6 with a 5 and google that, it's actually a common
issue.  But NetCDF should be fixed.  So I tried again like so:

export CFLAGS="-mmacosx-version-min=10.6 -isysroot /Developer/SDKs/
MacOSX10.6.sdk"
export CXXFLAGS="-mmacosx-version-min=10.6 -isysroot /Developer/SDKs/
MacOSX10.6.sdk"
./configure

and it worked.  This was with gcc 4.2 (the default compiler).  There
were some warnings.  Note that I didn't turn any warnings on explicitly:

vardata.c:76: warning: cast to pointer from integer of different size
vardata.c: In function 'print_any_val':
vardata.c:98: warning: cast to pointer from integer of different size
vardata.c: In function 'pr_any_vals':
vardata.c:229: warning: format not a string literal and no format arguments
vardata.c:240: warning: format not a string literal and no format arguments
vardata.c: In function 'vardata':
vardata.c:431: warning: format not a string literal and no format arguments
indent.c: In function 'indent_out':
indent.c:43: warning: format not a string literal and no format arguments
indent.c:46: warning: format not a string literal and no format arguments
ncvalues.cpp: In member function 'virtual char NcValues_ncbyte::as_char
(long int) const':
ncvalues.cpp:81: warning: comparison is always false due to limited
range of data type

Note that on 10.6 things build by default as 64 bit, I'm guessing those
pointer->int warnings probably don't happen in 32 bit.

I didn't try any fortran stuff.

--
____________________________________________________________
Sean McBride, B. Eng                 sean@xxxxxxxxxxxxxxxxxx
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada




  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: