help-octave
[Top][All Lists]
Advanced

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

Re: Problem building netcdf-1.0.0 on Mac OS 10.8 using recent compilers.


From: Alexander Barth
Subject: Re: Problem building netcdf-1.0.0 on Mac OS 10.8 using recent compilers.
Date: Tue, 27 Aug 2013 22:20:13 +0200




On Mon, Aug 26, 2013 at 6:23 PM, Alexander Hansen <address@hidden> wrote:
Hi.

I'm getting pretty much the same error when I use any of the following compilers that are available to Fink users on OS 10.8 to install the netcdf package:

Apple's clang:
 clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

Apple's llvm-gcc:
$ llvm-gcc-4.2 --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

FSF gcc 4.7.3 or 4.8.1 (we have earlier gcc's for prior OS versions, but I'd like to be able to put out a package that works on 10.8)

The failure is as follows (slightly re-ordered):

mkoctfile __netcdf__.cc -L/sw/lib -lnetcdf

__netcdf__.cc:112:15: error: ambiguous conversion for C-style cast from
      'octave_int<unsigned long long>' to 'size_t' (aka 'unsigned long')
          start[i] = (size_t)tmp(ndims-i-1);
                     ^~~~~~~~~~~~~~~~~~~~~~
/sw/include/octave-3.6.4/octave/oct-inttypes.h:777:3: note: candidate function
  operator T (void) const { return value (); }
  ^
/sw/include/octave-3.6.4/octave/oct-inttypes.h:781:3: note: candidate function
  operator double (void) const { return double_value (); }
  ^
/sw/include/octave-3.6.4/octave/oct-inttypes.h:783:3: note: candidate function
  operator float (void) const { return float_value (); }
  ^
...

Any thoughts on a workaround?


Hi,

Does it work if you simply use

start[i] = tmp(ndims-i-1);

instead of

start[i] = (size_t)tmp(ndims-i-1);

at line 112 of __netcdf__.cc.

Cheers,
Alex
 
--
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]