sage: solve(x^2 + 3*x + 2, x)
In file included from /Applications/sage/local/lib/ecl/ecl/ecl-cmp.h:22:0,
from /private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001XIVVfM.c:5:
/Applications/sage/local/lib/ecl/ecl/ecl.h:20:65: fatal error: sys/types.h: No such file or directory
#include <sys/types.h> /* size_t, pthread_t, pthread_mutex_t */
^
compilation terminated.
;;; Internal error:
;;; ** Error code 1 when executing
;;; (RUN-PROGRAM "gcc" ("-I." "-I/Applications/sage/local/lib/ecl/" "-I/Users/buildslave-sage/slave/sage_git/build/local/include" "-I/Users/buildslave-sage/slave/sage_git/build/local/include" "-g" "-O2" "-fPIC" "-fno-common" "-Ddarwin" "-O2" "-c" "/private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001XIVVfM.c" "-o" "/private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001XIVVfM.o"))---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-2-b5c9e6391cf6> in <module>()
----> 1 solve(x**Integer(2) + Integer(3)*x + Integer(2), x)
/Applications/sage/local/lib/python2.7/site-packages/sage/symbolic/relation.pyc in solve(f, *args, **kwds)
732 from sage.symbolic.expression import is_Expression
733 if is_Expression(f): # f is a single expression
--> 734 ans = f.solve(*args,**kwds)
735 return ans
736
/Applications/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression.solve (build/cythonized/sage/symbolic/expression.cpp:45798)()
/Applications/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression._maxima_ (build/cythonized/sage/symbolic/expression.cpp:5388)()
/Applications/sage/local/lib/python2.7/site-packages/sage/structure/sage_object.so in sage.structure.sage_object.SageObject._interface_ (build/cythonized/sage/structure/sage_object.c:4897)()
/Applications/sage/local/lib/python2.7/site-packages/sage/misc/lazy_import.so in sage.misc.lazy_import.LazyImport.__getattr__ (build/cythonized/sage/misc/lazy_import.c:3030)()
/Applications/sage/local/lib/python2.7/site-packages/sage/misc/lazy_import.so in sage.misc.lazy_import.LazyImport._get_object (build/cythonized/sage/misc/lazy_import.c:2030)()
/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py in <module>()
79 ecl_eval("(setf *compile-verbose* NIL)")
80 ecl_eval("(setf *load-verbose* NIL)")
---> 81 ecl_eval("(require 'maxima)")
82 ecl_eval("(in-package :maxima)")
83 ecl_eval("(setq $nolabels t))")
/Applications/sage/local/lib/python2.7/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_eval (build/cythonized/sage/libs/ecl.c:9161)()
/Applications/sage/local/lib/python2.7/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_eval (build/cythonized/sage/libs/ecl.c:9094)()
/Applications/sage/local/lib/python2.7/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_safe_eval (build/cythonized/sage/libs/ecl.c:4494)()
RuntimeError: ECL says: The variable C::GAZONK is unbound.
sage: solve(x^2 + 3*x + 2, x)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-3-b5c9e6391cf6> in <module>()
----> 1 solve(x**Integer(2) + Integer(3)*x + Integer(2), x)
/Applications/sage/local/lib/python2.7/site-packages/sage/symbolic/relation.pyc in solve(f, *args, **kwds)
732 from sage.symbolic.expression import is_Expression
733 if is_Expression(f): # f is a single expression
--> 734 ans = f.solve(*args,**kwds)
735 return ans
736
/Applications/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression.solve (build/cythonized/sage/symbolic/expression.cpp:45798)()
/Applications/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression._maxima_ (build/cythonized/sage/symbolic/expression.cpp:5388)()
/Applications/sage/local/lib/python2.7/site-packages/sage/structure/sage_object.so in sage.structure.sage_object.SageObject._interface_ (build/cythonized/sage/structure/sage_object.c:4897)()
/Applications/sage/local/lib/python2.7/site-packages/sage/misc/lazy_import.so in sage.misc.lazy_import.LazyImport.__getattr__ (build/cythonized/sage/misc/lazy_import.c:3030)()
/Applications/sage/local/lib/python2.7/site-packages/sage/misc/lazy_import.so in sage.misc.lazy_import.LazyImport._get_object (build/cythonized/sage/misc/lazy_import.c:2030)()
/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py in <module>()
83 ecl_eval("(setq $nolabels t))")
84 ecl_eval("(defvar *MAXIMA-LANG-SUBDIR* NIL)")
---> 85 ecl_eval("(set-locale-subdir)")
86 ecl_eval("(set-pathnames)")
87 ecl_eval("(defun add-lineinfo (x) x)")
/Applications/sage/local/lib/python2.7/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_eval (build/cythonized/sage/libs/ecl.c:9161)()
/Applications/sage/local/lib/python2.7/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_eval (build/cythonized/sage/libs/ecl.c:9094)()
/Applications/sage/local/lib/python2.7/site-packages/sage/libs/ecl.so in sage.libs.ecl.ecl_safe_eval (build/cythonized/sage/libs/ecl.c:4494)()
RuntimeError: ECL says: The function SET-LOCALE-SUBDIR is undefined.
----
Any hints would be appreciated!
;;; Loading #P"/Applications/sage/local/lib/ecl/cmp.fas"
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; End of Pass 1.In file included from /Applications/sage/local/lib/ecl/ecl/ecl-cmp.h:22:0,
from /private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001IqKQ2b.c:5:
/Applications/sage/local/lib/ecl/ecl/ecl.h:20:65: fatal error: sys/types.h: No such file or directory
#include <sys/types.h> /* size_t, pthread_t, pthread_mutex_t */
^
compilation terminated.
;;; Internal error:
;;; ** Error code 1 when executing
;;; (RUN-PROGRAM "gcc" ("-I." "-I/Applications/sage/local/lib/ecl/" "-I/Users/buildslave-sage/slave/sage_git/build/local/include" "-I/Users/buildslave-sage/slave/sage_git/build/local/include" "-g" "-O2" "-fPIC" "-fno-common" "-Ddarwin" "-O2" "-c" "/private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001IqKQ2b.c" "-o" "/private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001IqKQ2b.o"))
Condition of type: UNBOUND-VARIABLE
The variable C::GAZONK is unbound.
No restarts available.
Top level.
>
----------------------------------------I run the following code:$ sage -maximaAnd the messages are:
--
You received this message because you are subscribed to a topic in the Google Groups "sage-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-support/wj4ObDhv_xE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-support...@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
;;; (RUN-PROGRAM "gcc" ("-I." "-I/Applications/sage/local/lib/ecl/" "-I/Users/buildslave-sage/slave/sage_git/build/local/include" "-I/Users/buildslave-sage/slave/sage_git/build/local/include" "-g" "-O2" "-fPIC" "-fno-common" "-Ddarwin" "-O2" "-c" "/private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001IqKQ2b.c" "-o" "/private/var/folders/gh/26025ywx7w128zfds279s_9r0000gn/T/ecl001IqKQ2b.o"))Condition of type: UNBOUND-VARIABLE
The variable C::GAZONK is unbound.
Problem solved. I did not install 'Command Line Tools for Xcode' previously on my Mac because I did not read instructions on installing Sage from source code. After installing Command Line Tools, it works now. Though the installation of Sage is still from a binary one.
It could be caused by the following lines in the Maxima source code (in src/commac.lisp):
(defparameter trailing-zeros-regex-f-0 (compile nil (maxima-nregex::regex-compile "^(.*\\.[0-9]*[1-9])00*$")))
(defparameter trailing-zeros-regex-f-1 (compile nil (maxima-nregex::regex-compile "^(.*\\.0)00*$")))
(defparameter trailing-zeros-regex-e-0 (compile nil (maxima-nregex::regex-compile "^(.*\\.[0-9]*[1-9])00*([^0-9][+-][0-9]*)$")))
(defparameter trailing-zeros-regex-e-1 (compile nil (maxima-nregex::regex-compile "^(.*\\.0)00*([^0-9][+-][0-9]*)$")))
These are executed each time Maxima starts. The call to compile apparently invokes the C compiler.
On Thursday, November 20, 2014 4:36:52 AM UTC-8, Peter Bruin wrote:Indeed, a feature of ECL is that compile defers to the C compiler. It is of course crazy this gets compiled every initialization of maxima. I don't think this happened before either. These definitions seem to have been introduced between 5.33.0 and 5.34.1.It could be caused by the following lines in the Maxima source code (in src/commac.lisp):
(defparameter trailing-zeros-regex-f-0 (compile nil (maxima-nregex::regex-compile "^(.*\\.[0-9]*[1-9])00*$")))
(defparameter trailing-zeros-regex-f-1 (compile nil (maxima-nregex::regex-compile "^(.*\\.0)00*$")))
(defparameter trailing-zeros-regex-e-0 (compile nil (maxima-nregex::regex-compile "^(.*\\.[0-9]*[1-9])00*([^0-9][+-][0-9]*)$")))
(defparameter trailing-zeros-regex-e-1 (compile nil (maxima-nregex::regex-compile "^(.*\\.0)00*([^0-9][+-][0-9]*)$")))
These are executed each time Maxima starts. The call to compile apparently invokes the C compiler.
Are these warnings signs that maxima is still compiling itself every time I started?
Since these problems seem to be unique only on my mac (and the weird non-existence of CLT in Xcode), can I assume that the problem actually lies in my OSX or Xcode?
On Thursday, November 20, 2014 7:10:15 PM UTC-8, Bozh wrote:Are these warnings signs that maxima is still compiling itself every time I started?It looks like Peter correctly identified the problem. According to his assessment, Maxima compiles *some code* upon startup, but not all of maxima.
Since these problems seem to be unique only on my mac (and the weird non-existence of CLT in Xcode), can I assume that the problem actually lies in my OSX or Xcode?The fact that maxima tries to compile something is not unique to your mac. The fact that the compilations failed was something relatively specific to your mac, but not unique to it. Peter sketched a system where it didn't work either.
Hopefully, Peter will patch the maxima shipped with sage so that we avoid the compilation. Then probably the next sage release will not have this compilation issue anymore. In the longer run, hopefully the maxima people find a way around compiling some code at init-time. Then we can remove our patched behaviour we're going to need in the mean time.
This example is edited with linux mint 17.
I tested this example with linux ubuntu 14.10 and sagemath runs correctly !