On Dec 3, 11:32 pm, "Carlo Hamalainen" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I want to write a spyx file to do some things with finite fields. I'm
> guessing that my first step is to cimport either finite_field_givaro
> or finite_field_ntl_gf2e (given that the pxd files exist in my sage
> source tree) but both of these fail. Am I doing something wrong here?
>
> [EMAIL PROTECTED]:/tmp$ cat test.spyx
>
> cimport sage.rings.finite_field_givaro
>
> [EMAIL PROTECTED]:/tmp$ sage
> ----------------------------------------------------------------------
> | SAGE Version 2.8.14, Release Date: 2007-11-24                      |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
>
> sage: load "test.spyx"
> Compiling test.spyx...
> Error compiling cython file:
> Error compiling test.spyx:
> running build
> running build_ext
> building 'test_spyx_0' extension
> creating build
> creating build/temp.linux-i686-2.5
> gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> -fPIC -I/opt/sage/local/include/csage/ -I/opt/sage/local/include/
> -I/opt/sage/local/include/python2.5/
>  -I/opt/sage/devel/sage/sage/ext/ -I/opt/sage/devel/sage/
> -I/opt/sage/devel/sage/sage/gsl/ -I
> -I/opt/sage/local/include/python2.5 -c test_spyx_0.c -o
> build/temp.linux-i6
> 86-2.5/test_spyx_0.o -w
>
> In file included from test_spyx_0.c:38:
> /opt/sage/local/include/givaro/givconfig.h:193:18: error: limits: No
> such file or directory
>
> This is odd because I do have a limits include file for C/C++:
>
> [EMAIL PROTECTED]:~$ find /usr/include/ -iname '*limits*'
> /usr/include/linux/limits.h
> /usr/include/limits.h
> /usr/include/x86_64-linux-gnu/limits.h
> /usr/include/c++/4.2/tr1/climits
> /usr/include/c++/4.2/tr1/limits.h
> /usr/include/c++/4.2/climits
> /usr/include/c++/4.2/limits
>
> Trying finite_field_ntl_gf2e fails in a different way:
>
> [EMAIL PROTECTED]:/tmp$ cat test.spyx
>
> cimport sage.rings.finite_field_ntl_gf2e
>
> [EMAIL PROTECTED]:/tmp$ sage
> ----------------------------------------------------------------------
> | SAGE Version 2.8.14, Release Date: 2007-11-24                      |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
>
> sage: load "test.spyx"
> Compiling test.spyx...
> Error compiling cython file:
> Error compiling test.spyx:
> running build
> running build_ext
> building 'test_spyx_0' extension
> creating build
> creating build/temp.linux-i686-2.5
> gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> -fPIC -I/opt/sage/local/include/csage/ -I/opt/sage/local/include/
> -I/opt/sage/local/include/python2.5/
>  -I/opt/sage/devel/sage/sage/ext/ -I/opt/sage/devel/sage/
> -I/opt/sage/devel/sage/sage/gsl/ -I
> -I/opt/sage/local/include/python2.5 -c test_spyx_0.c -o
> build/temp.linux-i6
> 86-2.5/test_spyx_0.o -w
>
> test_spyx_0.c:1481: error: field 'F' has incomplete type
> test_spyx_0.c:1512: error: field 'x' has incomplete type
> error: command 'gcc' failed with exit status 1
>
> Full logs:      http://carlo-hamalainen.net/sagetmp/err1.txt
>                      http://carlo-hamalainen.net/sagetmp/err2.txt
>
> My version of gcc:
>
> [EMAIL PROTECTED]:~$ gcc -v
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v
> --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
> --enable-shared --with-system-zlib --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --enable-nls
> --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
> --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr
> --enable-targets=all --enable-checking=release --build=i486-linux-gnu
> --host=i486-linux-gnu --target=i486-linux-gnu
> Thread model: posix
> gcc version 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
>
> Any ideas?

Hello Carlo,

have a look a the top of "sage/rings/finite_field_givaro.pxd", there
are some includes there that you might need to copy into your own
code. Since I am pressed for time I cannot debug this right now, but I
am hoping that including some of those includes will fix the problem
for you.

Cheers,

Michael

>
> --
> Carlo Hamalainenhttp://carlo-hamalainen.net
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to