I just did a sizeof(size_t) and got 8. so i defined that at the beginning of the file _pycuda_struct.c (which might not be advisable... will remove it). but i get a different error after that .
running build_ext building '_pvt_struct' extension gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -O3 -DNDEBUG -fPIC -I/usr/include/python2.4 -c src/wrapper/_pycuda_struct.c -o build/temp.linux-x86_64-2.4/src/wrapper/_pycuda_struct.o src/wrapper/_pycuda_struct.c: In function ‘_range_error’: src/wrapper/_pycuda_struct.c:289: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 4 has type ‘Py_ssize_t’ src/wrapper/_pycuda_struct.c:289: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 5 has type ‘Py_ssize_t’ src/wrapper/_pycuda_struct.c: In function ‘prepare_s’: src/wrapper/_pycuda_struct.c:830: error: ‘PY_SSIZE_T_MAX’ undeclared (first use in this function) On Fri, Mar 18, 2011 at 2:26 AM, Raghuram.O.S. <raghuramos1...@gmail.com>wrote: > I changed it to gcc-4.2.3. Some progress. But now I'm getting this, > > running build > running build_py > running build_ext > building '_pvt_struct' extension > gcc -pthread -fno-strict-aliasing -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > -D_GNU_SOURCE -fPIC -O3 -DNDEBUG -fPIC -I/usr/include/python2.4 -c > src/wrapper/_pycuda_struct.c -o > build/temp.linux-x86_64-2.4/src/wrapper/_pycuda_struct.o > src/wrapper/_pycuda_struct.c: In function ‘_range_error’: > src/wrapper/_pycuda_struct.c:275: error: ‘SIZEOF_SIZE_T’ undeclared (first > use in this function) > src/wrapper/_pycuda_struct.c:275: error: (Each undeclared identifier is > reported only once > src/wrapper/_pycuda_struct.c:275: error: for each function it appears in.) > src/wrapper/_pycuda_struct.c:288: warning: format ‘%zd’ expects type > ‘signed size_t’, but argument 4 has type ‘Py_ssize_t’ > src/wrapper/_pycuda_struct.c:288: warning: format ‘%zd’ expects type > ‘signed size_t’, but argument 5 has type ‘Py_ssize_t’ > src/wrapper/_pycuda_struct.c: In function ‘prepare_s’: > src/wrapper/_pycuda_struct.c:829: error: ‘PY_SSIZE_T_MAX’ undeclared (first > use in this function) > src/wrapper/_pycuda_struct.c: In function ‘s_unpack’: > src/wrapper/_pycuda_struct.c:1010: warning: format ‘%zd’ expects type > ‘signed size_t’, but argument 3 has type ‘Py_ssize_t’ > src/wrapper/_pycuda_struct.c: In function ‘s_unpack_from’: > src/wrapper/_pycuda_struct.c:1053: warning: format ‘%zd’ expects type > ‘signed size_t’, but argument 3 has type ‘Py_ssize_t’ > src/wrapper/_pycuda_struct.c: In function ‘s_pack’: > src/wrapper/_pycuda_struct.c:1147: warning: format ‘%zd’ expects type > ‘signed size_t’, but argument 3 has type ‘Py_ssize_t’ > src/wrapper/_pycuda_struct.c: In function ‘s_pack_into’: > src/wrapper/_pycuda_struct.c:1188: warning: format ‘%zd’ expects type > ‘signed size_t’, but argument 3 has type ‘int’ > src/wrapper/_pycuda_struct.c:1200: warning: implicit declaration of > function ‘PyInt_AsSsize_t’ > src/wrapper/_pycuda_struct.c:1212: warning: format ‘%zd’ expects type > ‘signed size_t’, but argument 3 has type ‘Py_ssize_t’ > src/wrapper/_pycuda_struct.c: In function ‘s_get_size’: > src/wrapper/_pycuda_struct.c:1234: warning: implicit declaration of > function ‘PyInt_FromSsize_t’ > src/wrapper/_pycuda_struct.c:1234: warning: return makes pointer from > integer without a cast > src/wrapper/_pycuda_struct.c: In function ‘calcsize’: > src/wrapper/_pycuda_struct.c:1357: warning: return makes pointer from > integer without a cast > error: command 'gcc' failed with exit status 1 > make: *** [install] Error 1 > > > On Fri, Mar 18, 2011 at 12:37 AM, Andreas Kloeckner < > li...@informa.tiker.net> wrote: > >> On Fri, 18 Mar 2011 00:26:54 -0400, "Raghuram.O.S." < >> raghuramos1...@gmail.com> wrote: >> > Yup. Its passed. >> > >> > gcc -pthread -fno-strict-aliasing -fwrapv -Wall -O3 -DNDEBUG -fPIC >> -Isrc/cpp >> > -I/nfs/01/osu5574/local/boost/include >> -I/nfs/01/osu5574/local/cuda/include >> > >> -I/nfs/01/osu5574/local/python/lib/python2.7/site-packages/numpy/core/include >> > >> -I/nfs/01/osu5574/softwares/virtualenv-1.4.9/../Python-2.7/include/python2.7 >> > -c src/wrapper/mempool.cpp -o >> > build/temp.linux-x86_64-2.7/src/wrapper/mempool.o >> > -DBOOST_PYTHON_NO_PY_SIGNATURES >> > >> > This is the final one at which it fails. Should I use the latest >> version? Or >> > do you suggest a specific version? >> >> Anythying that's not version 4.1 ought to be ok. >> >> Andreas >> > > > > -- > Regards, > Onti > -- Regards, Onti
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda