#10082: Python spkg: ImportError: No module named math
------------------------+---------------------------------------------------
   Reporter:  mpatel    |       Owner:  tbd     
       Type:  defect    |      Status:  new     
   Priority:  major     |   Milestone:  sage-4.6
  Component:  packages  |    Keywords:          
     Author:            |    Upstream:  N/A     
   Reviewer:            |      Merged:          
Work_issues:            |  
------------------------+---------------------------------------------------

Old description:

> On the Skynet hosts flavius (x86_64-Linux-k8-f12), iras (ia64-Linux-
> suse), and menas (x86_64-Linux-core2-suse), installing the Python package
> sometimes fails with
> {{{
> #!python
> [...]
> Sleeping for three seconds before testing python
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> ImportError: No module named math
> math module failed to import
> }}}
> This is with 4.6.alpha2.  Running `./sage -python` and doing `import
> math` works.
>
> From near the end of `spkg-install`:
> {{{
> #!sh
> [...]
> # Sleeping for three seconds so that parallel 'make install' catches up
> # with the following test.
> echo "Sleeping for three seconds before testing python"
> sleep 3
>
> # Make sure extension modules were built correctly.
> python -c "import math"
>
> if [ $? -eq 0 -a -f "$SAGE_LOCAL/bin/python" ]; then
>     echo "math module OK"
> else
>     echo "math module failed to import"
>     exit 1
> fi
> [...]
> }}}

New description:

 On the Skynet hosts flavius (x86_64-Linux-k8-f12), iras (ia64-Linux-suse),
 installing the Python package sometimes fails with
 {{{
 [...]
 Sleeping for three seconds before testing python
 'import site' failed; use -v for traceback
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
 ImportError: No module named math
 math module failed to import
 }}}
 This is with 4.6.alpha2.  Running `./sage -python` and doing `import math`
 works.

 From near the end of `spkg-install`:
 {{{
 #!sh
 [...]
 # Sleeping for three seconds so that parallel 'make install' catches up
 # with the following test.
 echo "Sleeping for three seconds before testing python"
 sleep 3

 # Make sure extension modules were built correctly.
 python -c "import math"

 if [ $? -eq 0 -a -f "$SAGE_LOCAL/bin/python" ]; then
     echo "math module OK"
 else
     echo "math module failed to import"
     exit 1
 fi
 [...]
 }}}

--

Comment(by mpatel):

 Logs are [http://sage.math.washington.edu/home/mpatel/trac/10082 here].

 Actually, the error on menas (x86_64-Linux-core2-suse) is different:
 {{{
 [...]
 gcc  -pthread
 
-L/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/lib
 -Xlinker -export-dynamic -o python \
                         Modules/python.o \
                         -L. -lpython2.6 -lpthread -ldl  -lutil   -lm
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/spkg/build/python-2.6.4.p9/src/Modules/cPickle.c:
 In function ‘Unpickler_noload’:
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/spkg/build/python-2.6.4.p9/src/Modules/cPickle.c:202:5:
 warning: assuming signed overflow does not occur when assuming that (X -
 c) > X is always false
 In file included from
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/include/readline/readline.h:36:0,
                  from
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/spkg/build/python-2.6.4.p9/src/Modules/readline.c:31:
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/include/readline/rltypedefs.h:34:1:
 warning: function declaration isn’t a prototype
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/include/readline/rltypedefs.h:35:1:
 warning: function declaration isn’t a prototype
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/include/readline/rltypedefs.h:36:1:
 warning: function declaration isn’t a prototype
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/include/readline/rltypedefs.h:37:1:
 warning: function declaration isn’t a prototype
 In file included from
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/spkg/build/python-2.6.4.p9/src/Modules/readline.c:31:0:
 
/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/include/readline/readline.h:378:1:
 warning: function declaration isn’t a prototype
 /bin/sh: line 1: 22203 Segmentation fault
 
LD_LIBRARY_PATH=/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/spkg/build/python-2.6.4.p9/src:/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/lib/R/lib:/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/lib/openmpi:/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/lib/:/usr/local/gcc-4.5.1/x86_64
 -Linux-core2-suse/lib64 CC='gcc  -pthread' LDSHARED='gcc  -pthread
 -shared'
 
LDFLAGS='-L/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/local/lib
 ' OPT='-DNDEBUG -g  -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py
 -q build
 make[2]: *** [sharedmods] Error 139
 make[2]: Leaving directory
 
`/home/buildbot/build/sage/menas-1/menas_full/build/sage-4.6.alpha3pre2/spkg/build/python-2.6.4.p9/src'
 Error building Python.
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10082#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to