On Sep 15, 10:47 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> ON 32-bit linux, i.e., meccah.math.harvard.edu, I get the following
> errors when trying to be build FLINT:
>
> flint.h:126: warning: implicit declaration of function `__builtin_clzl'
> gcc -std=c99 -I"/usr/include" -I/home/was/sage-bdist/local/include/
> -I/home/was/sage-bdist/local/include  -funroll-loops
> -fexpensive-optimizations  -fPIC  -O3 -c mpz_poly.c -o mpz_poly.o
> In file included from mpz_poly.c:11:
> flint.h: In function `FLINT_BIT_COUNT':
> flint.h:126: warning: implicit declaration of function `__builtin_clzl'
> gcc -std=c99 -I"/usr/include" -I/home/was/sage-bdist/local/include/
> -I/home/was/sage-bdist/local/include  -funroll-loops
> -fexpensive-optimizations  -fPIC  -O3 -c ZmodF_poly.c -o ZmodF_poly.o
> In file included from ZmodF_poly.c:14:
> flint.h: In function `FLINT_BIT_COUNT':
> flint.h:126: warning: implicit declaration of function `__builtin_clzl'
> gcc -std=c99 -I"/usr/include" -I/home/was/sage-bdist/local/include/
> -I/home/was/sage-bdist/local/include  -funroll-loops
> -fexpensive-optimizations  -fPIC  -O3 Z_mpn-test.o test-support.o -o
> Z_mpn-test mpn_extras.o Z.o memory-manager.o Z_mpn.o ZmodF.o
> ZmodF_mul.o ZmodF_mul-tuning.o fmpz.o fmpz_poly.o mpz_poly-tuning.o
> mpz_poly.o ZmodF_poly.o -L/home/was/sage-bdist/local/lib/ -L"qd"
> -lgmp -lpthread -lm
> Z_mpn.o(.text+0x663): In function `__Z_mpn_mul':
> : undefined reference to `__builtin_clzl'
> Z_mpn.o(.text+0x67c): In function `__Z_mpn_mul':
> : undefined reference to `__builtin_clzl'
> Z_mpn.o(.text+0x1667): In function `Z_mpn_mul_precomp_init':
> : undefined reference to `__builtin_clzl'
> Z_mpn.o(.text+0x19cc): In function `Z_mpn_mul_precomp':
> : undefined reference to `__builtin_clzl'
> Z_mpn.o(.text+0x1bad): In function `__Z_mul':
> : undefined reference to `__builtin_clzl'
> Z_mpn.o(.text+0x1bc6): more undefined references to `__builtin_clzl' follow
> collect2: ld returned 1 exit status
> make: *** [Z_mpn-test] Error 1
> g++ -fPIC -shared -fPIC -o libflint.so mpn_extras.o Z.o
> memory-manager.o Z_mpn.o ZmodF.o ZmodF_mul.o ZmodF_mul-tuning.o fmpz.o
> fmpz_poly.o mpz_poly-tuning.o mpz_poly.o ZmodF_poly.o -lgmp
>

Looks like a gcc issue (from 
http://sourceware.org/ml/libc-alpha/2005-12/msg00020.html):

GCC 3.4 and greater provide __builtin_clz which can be used for
a better and simpler implementation.  This patch makes soft-fp use
these
built-in functions.

meccah uses a gcc 3.3.5.

Cheers,

Michael

> -------
>
> FLINT then doesn't work:
>
> sage: sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
> ---------------------------------------------------------------------------
> <type 'exceptions.ImportError'>           Traceback (most recent call last)
>
> /home/was/sage-bdist/<ipython console> in <module>()
>
> <type 'exceptions.ImportError'>:
> /home/was/sage-bdist/local/lib/libflint.so: undefined symbol:
> __builtin_clzl
>
> William


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to