I am cross-posting this question; I think this question is more numpy-related than cython-related. Original question is at bottom.
On Mon, Dec 19, 2011 at 1:37 PM, mark florisson <markflorisson88@gmail.com> wrote:Hm, could you paste the full compiler output and possibly the source code?On 19 December 2011 00:04, Adam Klein <adam@lambdafoundry.com> wrote:
> Hi all,
>
> I'm getting the following error:
>
> source.cpp:1969: error: invalid conversion from ‘__pyx_t_5numpy_int64_t*’ to
> ‘int64_t*’
>
> I am on OSX (10.6). Same make compiles fine on Linux.
>
> The problematic compiler command:
>
> /usr/bin/llvm-gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch
> x86_64 -O3 -march=core2 -w -pipe -DNDEBUG -g -fwrapv -O3 -Wall
> -Wstrict-prototypes
> -I/Volumes/HD2/adam/.virtualenvs/py27/lib/python2.7/site-packages/numpy/core/include
> -I/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/include/python2.7
> -c source.cpp -o build/temp.macosx-10.5-intel-2.7/source.o
>
> I figured out that if I take out the flag "-arch x86_64", it builds.
>
> I don't have any ARCHFLAGS or CFLAGS defined otherwise in my environments.
>
> Any ideas?
>
> Thanks!
>
> --Adam
I figured out, using the -E switch of gcc, that /usr/include/i386/types.h is being included, which defines int64_t as#ifndef _INT64_T#define _INT64_Ttypedef long long int64_t;#endifIt seems to be chosen from /usr/include/machine,#elif defined (__i386__) || defined(__x86_64__)#include "i386/types.h"This matches the stdint.h definition in /usr/include/stdint.h.This all conflicts with the npy_common.h definition,#elif NPY_BITSOF_LONG == 64#define NPY_INT64 NPY_LONG#define NPY_UINT64 NPY_ULONGtypedef long npy_int64;I'm still trying to find an OSX header int64_t definition that isn't defined as "long long"...