[Cython] Strange cimport behaviour
Hi! I've found strange bug. In my example cimport misses "fcntl.h" include: ((c2f2e12...)) vitja@vitja-laptop:~/work/cython-vitek/zzz$ cat ./fff.pyx cimport posix.unistd cimport posix.fcntl print posix.fcntl.O_RDWR ((c2f2e12...)) vitja@vitja-laptop:~/work/cython-vitek/zzz$ make fff.so /usr//bin/python ../cython.py --gdb -v fff.pyx -o fff.c Compiling /home/vitja/work/cython-vitek/zzz/fff.pyx gcc -O0 -g3 -fPIC -I/usr//include/python2.6 -g3 -W -c -o fff.o fff.c fff.c: In function 'initfff': fff.c:537: error: 'O_RDWR' undeclared (first use in this function) fff.c:537: error: (Each undeclared identifier is reported only once fff.c:537: error: for each function it appears in.) make: *** [fff.o] Ошибка 1 -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Strange cimport behaviour
15 июля 2011 г. 23:32 пользователь Vitja Makarov написал: > Hi! > > I've found strange bug. In my example cimport misses "fcntl.h" include: > > ((c2f2e12...)) vitja@vitja-laptop:~/work/cython-vitek/zzz$ cat ./fff.pyx > cimport posix.unistd > cimport posix.fcntl > > print posix.fcntl.O_RDWR > > ((c2f2e12...)) vitja@vitja-laptop:~/work/cython-vitek/zzz$ make fff.so > /usr//bin/python ../cython.py --gdb -v fff.pyx -o fff.c > Compiling /home/vitja/work/cython-vitek/zzz/fff.pyx > gcc -O0 -g3 -fPIC -I/usr//include/python2.6 -g3 -W -c -o fff.o fff.c > fff.c: In function 'initfff': > fff.c:537: error: 'O_RDWR' undeclared (first use in this function) > fff.c:537: error: (Each undeclared identifier is reported only once > fff.c:537: error: for each function it appears in.) > make: *** [fff.o] Ошибка 1 > > Btw, from posix cimport unistd, fcntl works as expected -- vitja. ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Strange cimport behaviour
2011/7/15 Vitja Makarov : > I've found strange bug. In my example cimport misses "fcntl.h" include: > > ((c2f2e12...)) vitja@vitja-laptop:~/work/cython-vitek/zzz$ cat ./fff.pyx > cimport posix.unistd > cimport posix.fcntl > > print posix.fcntl.O_RDWR Fascinating; I can reproduce the error (on Scientific Linux 5.5), but it goes away when I reverse the order of the includes. -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel