Re: AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomial' object has no attribute 'lc'

74 views
Skip to first unread message

John H Palmieri

unread,
Oct 31, 2012, 1:14:37 PM10/31/12
to sage-s...@googlegroups.com


On Wednesday, October 31, 2012 9:39:11 AM UTC-7, V wrote:
Hello,

I try to execute one of the examples for computing the variety of a system of Boolean polynomials from the Sage reference manual:

http://www.sagemath.org/doc/reference/sage/rings/polynomial/pbori.html

and I get the error:

[snip]

 

I am using Sage version: 'Sage Version 4.8, Release Date: 2012-01-20' on a 64-bit machine running Debian GNU/Linux.

 


Your version of Sage is too old. That example in the reference manual was introduced in version 5.2 of Sage, so it doesn't work in version 4.8.

--
John

V

unread,
Oct 31, 2012, 1:42:38 PM10/31/12
to sage-s...@googlegroups.com
Thank you for the quick reply! I tried to compile Sage-5.3 from source and I get an error related to gcc-4.6.3:

In file included from /usr/include/features.h:378:0,
                 from /usr/include/stdio.h:28,
                 from ../../../src/libgcc/../gcc/tsystem.h:87,
                 from ../../../src/libgcc/../gcc/libgcc2.c:29:
/usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file or directory
compilation terminated.
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build/x86_64-unknown-linux-gnu/libgcc'
make[4]: *** [all-stage1-target-libgcc] Error 2
make[4]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[3]: *** [stage1-bubble] Error 2
make[3]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'


************************************************************************
Error installing package gcc-4.6.3
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
  /tmp/sage-5.3/spkg/logs/gcc-4.6.3.log

...

Please find attached the log file. FYI, I am using Debian GNU/Linux running on a 64-bit machine.

Thanks for your help!

V.

V

unread,
Oct 31, 2012, 1:49:06 PM10/31/12
to sage-s...@googlegroups.com

Sorry, I was not able to attach the full log file gcc-4.6.3.log. Please find below the most relevant parts of it.
...
checking whether the target assembler supports thread-local storage... yes
checking whether the thread-local storage support is from emutls... yes
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: executing default commands
make[5]: Entering directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build/x86_64-unknown-linux-gnu/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build/./gcc/xgcc -B/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build/./gcc/ -B/tmp/sage-5.3/local/x86_64-unknown-linux-gnu/bin/ -B/tmp/sage-5.3/local/x86_64-unknown-linux-gnu/lib/ -isystem /tmp/sage-5.3/local/x86_64-unknown-linux-gnu/include -isystem /tmp/sage-5.3/local/x86_64-unknown-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I../../../src/libgcc -I../../../src/libgcc/. -I../../../src/libgcc/../gcc -I../../../src/libgcc/../include -I../../../src/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../src/libgcc/../gcc/libgcc2.c \
-fvisibility=hidden -DHIDE_EXPORTS

In file included from /usr/include/features.h:378:0,
from /usr/include/stdio.h:28,
from ../../../src/libgcc/../gcc/tsystem.h:87,
from ../../../src/libgcc/../gcc/libgcc2.c:29:
/usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file or directory
compilation terminated.
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build/x86_64-unknown-linux-gnu/libgcc'
make[4]: *** [all-stage1-target-libgcc] Error 2
make[4]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[3]: *** [stage1-bubble] Error 2
make[3]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'

real	2m53.027s
user 2m34.986s
sys 0m13.329s

************************************************************************
Error installing package gcc-4.6.3
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
/tmp/sage-5.3/spkg/logs/gcc-4.6.3.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/tmp/sage-5.3/spkg/build/gcc-4.6.3 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '/tmp/sage-5.3/spkg/build/gcc-4.6.3' && '/tmp/sage-5.3/sage' -sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************

Dima Pasechnik

unread,
Oct 31, 2012, 3:48:47 PM10/31/12
to sage-s...@googlegroups.com
On 2012-10-31, V <vesselin....@gmail.com> wrote:
> ------=_Part_281_17041689.1351705746629
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
>
> Sorry, I was not able to attach the full log file gcc-4.6.3.log. Please=20
> find below the most relevant parts of it.

it looks like you need to install libc library headers, i.e. dpkg named
libc6-dev

V

unread,
Nov 1, 2012, 4:27:43 AM11/1/12
to sage-s...@googlegroups.com
Maybe this is not the problem, because as far as I can see libc6-dev is installed:

$ dpkg -l |grep libc6-dev
ii  libc6-dev                            2.11.3-4                           Embedded GNU C Library: Development Libraries and Header Files
$

Any other suggestions?

Dima Pasechnik

unread,
Nov 1, 2012, 7:37:58 AM11/1/12
to sage-s...@googlegroups.com
On 2012-11-01, V <vesselin....@gmail.com> wrote:
> ------=_Part_80_29635451.1351758463692
> Content-Type: text/plain; charset=ISO-8859-1
>
> Maybe this is not the problem, because as far as I can see libc6-dev is
> installed:
>
> $ dpkg -l |grep libc6-dev
> ii libc6-dev 2.11.3-4
> Embedded GNU C Library: Development Libraries and Header Files
> $
>
> Any other suggestions?
well, I just looked at this error:

/usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file
or directory

and (presuming your hardware is "amd64", the file stubs-64.h should be
in libc6-dev

http://packages.debian.org/search?searchon=contents&keywords=stubs-64.h&mode=exactfilename&suite=stable&arch=any

maybe you don't have it?
Then look at the above like and try to figure out which dpkg needs to be
installed...

HTH,
Dmitrii

V

unread,
Nov 1, 2012, 9:35:02 AM11/1/12
to sage-s...@googlegroups.com
Thanks! The missing library was libc6-dev-amd64. I installed it and this fixed the stubs-64.h error. Now the compilation breaks with the  error:

/usr/bin/ld: cannot find -lmpc

A more detailed log:

/usr/bin/ld: skipping incompatible /tmp/sage-5.3/local/lib/libmpc.a when searching for -lmpc
/usr/bin/ld: cannot find -lmpc
collect2: ld returned 1 exit status
make[5]: *** [cc1] Error 1
make[5]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build/gcc'
make[4]: *** [all-stage2-gcc] Error 2

make[4]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[3]: *** [stage2-bubble] Error 2

make[3]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/sage-5.3/spkg/build/gcc-4.6.3/gcc-build'

real    20m42.735s
user    20m1.815s
sys     0m29.186s

************************************************************************
Error installing package gcc-4.6.3
************************************************************************

...

make[1]: *** [installed/gcc-4.6.3] Error 1
make[1]: Leaving directory `/tmp/sage-5.3/spkg'

I can see that I have the library libmpc installed:

$ dpkg -l |grep mpc
ii  libmpc-dev                           0.8.2-1+b1                         multiple precision complex floating-point library development package
ii  libmpc2                              0.8.2-1+b1                         multiple precision complex floating-point library

Any ideas?

Thanks!

V.
I

Dima Pasechnik

unread,
Nov 1, 2012, 10:24:39 AM11/1/12
to sage-s...@googlegroups.com
On 2012-11-01, V <vesselin....@gmail.com> wrote:
> ------=_Part_278_14526898.1351776902054
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thanks! The missing library was libc6-dev-amd64. I installed it and this

> fixed the stubs-64.h error. Now the compilation breaks with the error:
>
> /usr/bin/ld: cannot find -lmpc

(you know, I suppose, that -lmpc expands to libmpc.*)
the drill is almost the same:
http://packages.debian.org/search?searchon=contents&keywords=libmpc.so&mode=exactfilename&suite=stable&arch=any
I guess you need libmpc-dev

if you aleady have it, this might mean you have some "multiplatform" issue, one
of these with recent debian releases...


Reply all
Reply to author
Forward
0 new messages