ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 23 Nov 2014 03:38:46 +0100%cython in notebook doesn’t work anymorehttps://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/hello, <br>
running sage-6.3.app on macosx 10.9.5, i can’t use %cython in the notebook anymore (it used to work some time ago though, with older sage and system versions);
<br>
i get the following: *error: command 'gcc' failed with exit status 1*
<br>
more precisely, gcc doesn’t find a certain file limits.h (see details below) that, however, exists at the given address - i checked it; <br>
how can i make it work again?
PS: same gcc error when loading a .spyx file in the command line <br>
PS2: same errors with the 6.4 version (sage-6.4-x86_64-Darwin-OSX_10.9_x86_64.dmg)<br>
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/csage -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python/site-packages/numpy/core/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/ext -I/Applications/Sage-6.3.app/Contents/Resources/sage/src -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/gsl -I/Users/fabrice/.sage/sage_notebook.sagenb/home/admin/123/code -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -c _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c -o build/temp.macosx-10.9-x86_64-2.7/_Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.o -w -O2
In file included from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/syslimits.h:7:0,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:34,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7/Python.h:19,
from _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c:16:
/Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.Sun, 16 Nov 2014 18:49:45 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/Comment by kcrisman for <p>hello, <br/>
running sage-6.3.app on macosx 10.9.5, i can’t use %cython in the notebook anymore (it used to work some time ago though, with older sage and system versions);
<br/>
i get the following: <em>error: command 'gcc' failed with exit status 1</em>
<br/>
more precisely, gcc doesn’t find a certain file limits.h (see details below) that, however, exists at the given address - i checked it; <br/>
how can i make it work again? </p>
<p>PS: same gcc error when loading a .spyx file in the command line <br/>
PS2: same errors with the 6.4 version (sage-6.4-x86_64-Darwin-OSX_10.9_x86_64.dmg)<br/></p>
<pre><code>gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/csage -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python/site-packages/numpy/core/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/ext -I/Applications/Sage-6.3.app/Contents/Resources/sage/src -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/gsl -I/Users/fabrice/.sage/sage_notebook.sagenb/home/admin/123/code -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -c _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c -o build/temp.macosx-10.9-x86_64-2.7/_Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.o -w -O2
In file included from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/syslimits.h:7:0,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:34,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7/Python.h:19,
from _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c:16:
/Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.
</code></pre>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24898#post-id-24898Does it work in the command line? (I mean does Cython at all work?) Since you have 6.3, https://github.com/sagemath/sagenb/issues/260 should not be relevant to you. It's also possible that there is some incompleteness from the compiled binary to your specific platform.Mon, 17 Nov 2014 16:27:33 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24898#post-id-24898Comment by Fabrice for <p>hello, <br/>
running sage-6.3.app on macosx 10.9.5, i can’t use %cython in the notebook anymore (it used to work some time ago though, with older sage and system versions);
<br/>
i get the following: <em>error: command 'gcc' failed with exit status 1</em>
<br/>
more precisely, gcc doesn’t find a certain file limits.h (see details below) that, however, exists at the given address - i checked it; <br/>
how can i make it work again? </p>
<p>PS: same gcc error when loading a .spyx file in the command line <br/>
PS2: same errors with the 6.4 version (sage-6.4-x86_64-Darwin-OSX_10.9_x86_64.dmg)<br/></p>
<pre><code>gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/csage -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python/site-packages/numpy/core/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/ext -I/Applications/Sage-6.3.app/Contents/Resources/sage/src -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/gsl -I/Users/fabrice/.sage/sage_notebook.sagenb/home/admin/123/code -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -c _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c -o build/temp.macosx-10.9-x86_64-2.7/_Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.o -w -O2
In file included from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/syslimits.h:7:0,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:34,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7/Python.h:19,
from _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c:16:
/Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.
</code></pre>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24927#post-id-24927In the command line, i can load a .sage file but not a .spyx file, for the very same reason as above (same gcc failed error message)Thu, 20 Nov 2014 12:58:50 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24927#post-id-24927Answer by Fabrice for <p>hello, <br/>
running sage-6.3.app on macosx 10.9.5, i can’t use %cython in the notebook anymore (it used to work some time ago though, with older sage and system versions);
<br/>
i get the following: <em>error: command 'gcc' failed with exit status 1</em>
<br/>
more precisely, gcc doesn’t find a certain file limits.h (see details below) that, however, exists at the given address - i checked it; <br/>
how can i make it work again? </p>
<p>PS: same gcc error when loading a .spyx file in the command line <br/>
PS2: same errors with the 6.4 version (sage-6.4-x86_64-Darwin-OSX_10.9_x86_64.dmg)<br/></p>
<pre><code>gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/csage -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python/site-packages/numpy/core/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/ext -I/Applications/Sage-6.3.app/Contents/Resources/sage/src -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/gsl -I/Users/fabrice/.sage/sage_notebook.sagenb/home/admin/123/code -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -c _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c -o build/temp.macosx-10.9-x86_64-2.7/_Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.o -w -O2
In file included from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/syslimits.h:7:0,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:34,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7/Python.h:19,
from _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c:16:
/Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.
</code></pre>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?answer=24936#post-id-24936How the problem was fixed (magic algorithm):
<li> i installed the command line tools of xcode (seemingly not included under osx 10.9)
<li> started to compile sage-6.4 from source
<li> stopped the compilation after around 1h and deleted the whole sage-6.4 folder
After that, sage-6.3.app recovered its usual %cython behavior in the notebook.
Could be that only the first step was useful, but no way checking it now. Fri, 21 Nov 2014 18:11:36 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?answer=24936#post-id-24936Answer by slelievre for <p>hello, <br/>
running sage-6.3.app on macosx 10.9.5, i can’t use %cython in the notebook anymore (it used to work some time ago though, with older sage and system versions);
<br/>
i get the following: <em>error: command 'gcc' failed with exit status 1</em>
<br/>
more precisely, gcc doesn’t find a certain file limits.h (see details below) that, however, exists at the given address - i checked it; <br/>
how can i make it work again? </p>
<p>PS: same gcc error when loading a .spyx file in the command line <br/>
PS2: same errors with the 6.4 version (sage-6.4-x86_64-Darwin-OSX_10.9_x86_64.dmg)<br/></p>
<pre><code>gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/csage -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python/site-packages/numpy/core/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/ext -I/Applications/Sage-6.3.app/Contents/Resources/sage/src -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/gsl -I/Users/fabrice/.sage/sage_notebook.sagenb/home/admin/123/code -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -c _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c -o build/temp.macosx-10.9-x86_64-2.7/_Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.o -w -O2
In file included from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/syslimits.h:7:0,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:34,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7/Python.h:19,
from _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c:16:
/Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.
</code></pre>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?answer=24931#post-id-24931Under Mac OS X 10.8, you should use the binaries for OS X 10.7 rather than those for OS X 10.9.
If you want to build from source, I would recommend to:
- apply system updates to run the latest version of OS X 10.8,
- update XCode to the latest version compatible with OS X 10.8,
- install command-line tools,
- start XCode once and quit it.
Then you can build from source and all should go well. If there are any problems, report them here or on sage-release.Thu, 20 Nov 2014 16:35:04 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?answer=24931#post-id-24931Comment by Fabrice for <p>Under Mac OS X 10.8, you should use the binaries for OS X 10.7 rather than those for OS X 10.9.</p>
<p>If you want to build from source, I would recommend to:</p>
<ul>
<li>apply system updates to run the latest version of OS X 10.8,</li>
<li>update XCode to the latest version compatible with OS X 10.8,</li>
<li>install command-line tools,</li>
<li>start XCode once and quit it.</li>
</ul>
<p>Then you can build from source and all should go well. If there are any problems, report them here or on sage-release.</p>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24932#post-id-24932thanks,
and right: so sorry, i run 10.9 not 8 (updated the question);
with the 6.1 version of xcode;
half good news: <br>
- i started to build sage 6.4 from source but had to interrupt the compilation - so i trashed the 6.4 folder before leaving here;
just in case, i tried sage-6.3.app... now it works fine, %cython in notebook has its usual behavior (isn't that magic?)
- now i have to find some log of the interrupted make (if any) in order to see what could have changed, i guess this might be a compiler problem
to be followedThu, 20 Nov 2014 17:57:17 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24932#post-id-24932Comment by kcrisman for <p>Under Mac OS X 10.8, you should use the binaries for OS X 10.7 rather than those for OS X 10.9.</p>
<p>If you want to build from source, I would recommend to:</p>
<ul>
<li>apply system updates to run the latest version of OS X 10.8,</li>
<li>update XCode to the latest version compatible with OS X 10.8,</li>
<li>install command-line tools,</li>
<li>start XCode once and quit it.</li>
</ul>
<p>Then you can build from source and all should go well. If there are any problems, report them here or on sage-release.</p>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24952#post-id-24952I'm pretty sure it was installing Xcode that solved it, because probably now *somewhere* in your path there were appropriate headers etc. Cython won't work on a binary, probably, without a compiler, I seem to remember a ticket about making that more obvious - even if gcc is installed in Sage I'm not sure it's easy to use it properly in a binary. Wish I could remember more offhand.Sun, 23 Nov 2014 03:38:46 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24952#post-id-24952Comment by Fabrice for <p>Under Mac OS X 10.8, you should use the binaries for OS X 10.7 rather than those for OS X 10.9.</p>
<p>If you want to build from source, I would recommend to:</p>
<ul>
<li>apply system updates to run the latest version of OS X 10.8,</li>
<li>update XCode to the latest version compatible with OS X 10.8,</li>
<li>install command-line tools,</li>
<li>start XCode once and quit it.</li>
</ul>
<p>Then you can build from source and all should go well. If there are any problems, report them here or on sage-release.</p>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24935#post-id-24935the original log is lost; all i can say is what happened between the dates "6.3.app doesn't run cython" and "6.3.app does run cython":
<li> i installed the command line tools of xcode (seemingly not included under osx 10.9)
<li> started to compile sage-6.4 from source
<li> stopped the compilation after around 1h and deleted the whole sage-6.4 folder
this doesn't help me to figure out what the bug is, only greatly restricts the possibilities;
thanks for your help!Fri, 21 Nov 2014 18:03:34 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24935#post-id-24935Answer by kcrisman for <p>hello, <br/>
running sage-6.3.app on macosx 10.9.5, i can’t use %cython in the notebook anymore (it used to work some time ago though, with older sage and system versions);
<br/>
i get the following: <em>error: command 'gcc' failed with exit status 1</em>
<br/>
more precisely, gcc doesn’t find a certain file limits.h (see details below) that, however, exists at the given address - i checked it; <br/>
how can i make it work again? </p>
<p>PS: same gcc error when loading a .spyx file in the command line <br/>
PS2: same errors with the 6.4 version (sage-6.4-x86_64-Darwin-OSX_10.9_x86_64.dmg)<br/></p>
<pre><code>gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/csage -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/lib/python/site-packages/numpy/core/include -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/ext -I/Applications/Sage-6.3.app/Contents/Resources/sage/src -I/Applications/Sage-6.3.app/Contents/Resources/sage/src/sage/gsl -I/Users/fabrice/.sage/sage_notebook.sagenb/home/admin/123/code -I/Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7 -c _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c -o build/temp.macosx-10.9-x86_64-2.7/_Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.o -w -O2
In file included from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/syslimits.h:7:0,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:34,
from /Applications/Sage-6.3.app/Contents/Resources/sage/local/include/python2.7/Python.h:19,
from _Users_fabrice__sage_sage_notebook_sagenb_home_admin_123_code_sage2_spyx_0.c:16:
/Applications/Sage-6.3.app/Contents/Resources/sage/local/bin/../lib/gcc/x86_64-apple-darwin13.3.0/4.7.3/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.
</code></pre>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?answer=24928#post-id-24928Okay, so there is something wrong with your Sage, not the notebook per se. You could download a more recent Sage, compile from scratch, or even try to recompile the Sage in your app (it turns out you can swap out different Sage versions in the app, in fact there is even a preferences item for this). I'm not sure of the exact cause, however, if that file really does exist.Thu, 20 Nov 2014 14:28:06 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?answer=24928#post-id-24928Comment by Fabrice for <p>Okay, so there is something wrong with your Sage, not the notebook per se. You could download a more recent Sage, compile from scratch, or even try to recompile the Sage in your app (it turns out you can swap out different Sage versions in the app, in fact there is even a preferences item for this). I'm not sure of the exact cause, however, if that file really does exist.</p>
https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24930#post-id-24930thanks for the answer kcrisman;
i just downloaded the 6.4 version (not the .app this time, in order to eliminate a doubt);
exactly the same problem, both with the notebook and the command line;
recompiling sage?
i fear i'll have some problems with xcode anyway... but i'll try;
now, with which compiler? any gcc would do the job?
ps:
useless to say i'd prefer it would work directly from the downloaded binaries! :))Thu, 20 Nov 2014 15:25:45 +0100https://ask.sagemath.org/question/24885/cython-in-notebook-doesnt-work-anymore/?comment=24930#post-id-24930