Discussion:
[Axiom-math] Axiom: Errors on suse 10.2, 32 bit
C. Frangos
2007-10-31 07:06:41 UTC
Permalink
I have installed the axiom binaries on a suse linux 10.2, 32 bit system, and
am trying some basic commands.

I am getting the errors below.

(Some time ago Tim Daly reported similar errors on my behalf. The two
responses that were posted referred to lisp, which I
unfortunately do not know. Its not clear how to fix the problem).

(In the meantime I am using 2004 axiom (no graphics) compiled on an old suse
linux 7.2 system, 32 bit).

Any assistance would be much appreciated.

TIA,

Constantine Frangos.




(11) -> x(s)==(q:=cos(s);return(q))
Type: Void
(12) -> x(y)
Compiling function x with type Variable y -> Expression Integer
cc1: error: /root/axiom/mnt/fedora5/bin/../h: Permission denied
(12) -> x(y)

(12) cos(y)
Type: Expression Integer
(13) ->


(11) -> draw(sin(x),x=-1..1);
Loading /home/apps/axiombin/mnt/fedora5/algebra/SEG.o for domain
Segment
Loading /home/apps/axiombin/mnt/fedora5/algebra/SEGBIND.o for domain
SegmentBinding
Loading /home/apps/axiombin/mnt/fedora5/algebra/FLOAT.o for domain
Float
.................................
Loading /home/apps/axiombin/mnt/fedora5/algebra/DISPLAY.o for
package DisplayPackage
Loading /home/apps/axiombin/mnt/fedora5/algebra/MKFLCFN.o for


package MakeFloatCompiledFunction
cc1: error: /root/axiom/mnt/fedora5/bin/../h: Permission denied
(SYSTEM "gcc -c -Wall -DVOL=volatile -fsigned-char -pipe
-I/root/axiom/mnt/fedora5/bin/../h -O3 -fomit-frame-pointer -c
\"/tmp/gazonk7.c\" -o \"/tmp/gazonk7.o\" -w") returned a non-zero value 0.

(11) ->
Daniel Herring
2007-11-01 00:57:45 UTC
Permalink
Post by C. Frangos
I have installed the axiom binaries on a suse linux 10.2, 32 bit system, and
am trying some basic commands.
I am getting the errors below.
The language you type into Axiom is interpreted by a lisp subsystem, more
specifically GCL. Every time you define a function in Axiom, this
triggers a lisp function to be generated; GCL actually writes out C source
files, compiles them with GCC, and links the objects back in.

Below are my ramblings as I found a solution.
Post by C. Frangos
(11) -> draw(sin(x),x=-1..1);
Loading /home/apps/axiombin/mnt/fedora5/algebra/SEG.o for domain
Segment
Loading /home/apps/axiombin/mnt/fedora5/algebra/SEGBIND.o for domain
SegmentBinding
Loading /home/apps/axiombin/mnt/fedora5/algebra/FLOAT.o for domain
Float
Here we see GCL loading the object files for some precompiled functions.
Post by C. Frangos
(SYSTEM "gcc -c -Wall -DVOL=volatile -fsigned-char -pipe
-I/root/axiom/mnt/fedora5/bin/../h -O3 -fomit-frame-pointer -c
\"/tmp/gazonk7.c\" -o \"/tmp/gazonk7.o\" -w") returned a non-zero value 0.
Here we see GCL trying to compile a new function... and failing.

Based on the previous error message, GCC was having trouble with the
"-I/root/axiom/mnt/fedora5/bin/../h". Clearly not good; this path
contains a reference to fedora5, while you're running suse and probably
not as root...

This is a funny artifact of how Axiom is compiled. This path points into
the compilation directory, but is totally unnecessary for Axiom to run
properly. On systems where the path doesn't exist, everything is fine.
Unfortunately, GCC sees that this path *might* exist but that your user
doesn't have permissions to look inside /root and see if it does...

For fun, run
Post by C. Frangos
strings `which AXIOMsys` | grep /root/axiom/mnt/fedora5/bin
You should see a line like
#+:akcl (setq si::*system-directory* "/root/axiom/mnt/fedora5/bin/")

That's where the problem lies.

To work around this, type the following line
)lisp (setf si::*system-directory* ".")
as your first command to Axiom after it starts up.

All your problems (wrt the above error) should go away.

Later,
Daniel
Constantine Frangos
2007-11-01 20:02:53 UTC
Permalink
Dear Daniel,

Thanks for the detailed analysis of the problem - much appreciated.

I have written a short script axiom_fix.input with the command you suggested
and which I run at startup:)read axiom_fix.input

)lisp (setf si::*system-directory* ".")

As you predicted there are no more error messages of this type.

Any assistance with the following would be appreciated:

(1) I am trying to run the program below testkinemat1, but axiom does not
seem to find the built-in functions nullity() (and simplify()) for the
symbolic matrix Acon, and gives error messages.

However, simplify seems to work ok for scalar arguments:

(29) -> simplify(sin(x)^2+cos(x)^2)

(29) 1
Type: Expression Integer
(30) ->


(2) The axiom syntax of piles/underscores _ , etc seems quite difficult to
use in developing complicated programs. Any detailed examples of nontrivial
programs using axiom constructs (variable declarations, loops, etc) would be
appreciated.

Thanks very much.

Regards,

C. Frangos.



(26) -> testkinemat1();
There are 3 exposed and 1 unexposed library operations named nullity
having 1 argument(s) but none was determined to be applicable.
Use HyperDoc Browse, or issue
)display op nullity
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.
Cannot find a definition or applicable library operation named
nullity with argument type(s)
Matrix Expression Integer

Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
AXIOM will attempt to step through and interpret the code.
There are 3 exposed and 1 unexposed library operations named nullity
having 1 argument(s) but none was determined to be applicable.
Use HyperDoc Browse, or issue
)display op nullity
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.

Cannot find a definition or applicable library operation named
nullity with argument type(s)
Matrix Expression Integer

Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
(26) ->







testkinemat1() ==
--)read expandsincos.input
Acon := matrix([[1 , 0 , Lo1*sin(phi) , -sin(phi)*a , 0 , 0 , 0 , 0 , 0],_
[0 , 1 , -Lo1*cos(phi) , a*cos(phi) , 0 , 0 , 0 , 0 , 0],_
[1 , 0 , -Lo1*sin(phi) , 0 , -a*sin(phi), 0 , 0 , 0 , 0],_
[0 , 1 , Lo1*cos(phi) , 0 , a*cos(phi) , 0 , 0 , 0 , 0],_
[1,0,-Lc*cos(phi)+Lo1*sin(phi),0,0,0,-a*sin(phi)*cos(delta3)_
-a*cos(phi)*sin(delta3),0,0],_
[0,1,-Lc*sin(phi)-Lo1*cos(phi),0,0,0,a*cos(phi)*cos(delta3)_
-a*sin(phi)*sin(delta3),0,0],_
[1,0,-Lc*cos(phi)-Lo1*sin(phi),0,0,(-2*sin(phi)*Lo1*sin(delta3)-sin(phi)*_
Lc*cos(delta3)-cos(phi)*Lc*sin(delta3))*a/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_

[0,1,-Lc*sin(phi)+Lo1*cos(phi),0,0,a*(2*cos(phi)*Lo1*sin(delta3)+_
cos(phi)*Lc*cos(delta3)-sin(phi)*Lc*sin(delta3))/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_
[0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , -k]])
-- pause()
Acon := simplify(Acon)
rankAcon := rank(Acon)
Acone := rowEchelon(Acon)
Aconnull := nullSpace(Acon)
Aconnullity := nullity(Acon)
--detAcon:=determinant(Acon)
--detAcon:=factor(detAcon)
--detAcon:=expandsincos(detAcon)
--detAcon:=simplify(detAcon)
--end of program.
Post by Daniel Herring
Post by C. Frangos
I have installed the axiom binaries on a suse linux 10.2, 32 bit system,
and am trying some basic commands.
I am getting the errors below.
The language you type into Axiom is interpreted by a lisp subsystem, more
specifically GCL. Every time you define a function in Axiom, this
triggers a lisp function to be generated; GCL actually writes out C source
files, compiles them with GCC, and links the objects back in.
Below are my ramblings as I found a solution.
Post by C. Frangos
(11) -> draw(sin(x),x=-1..1);
Loading /home/apps/axiombin/mnt/fedora5/algebra/SEG.o for domain
Segment
Loading /home/apps/axiombin/mnt/fedora5/algebra/SEGBIND.o for domain
SegmentBinding
Loading /home/apps/axiombin/mnt/fedora5/algebra/FLOAT.o for domain
Float
Here we see GCL loading the object files for some precompiled functions.
Post by C. Frangos
(SYSTEM "gcc -c -Wall -DVOL=volatile -fsigned-char -pipe
-I/root/axiom/mnt/fedora5/bin/../h -O3 -fomit-frame-pointer -c
\"/tmp/gazonk7.c\" -o \"/tmp/gazonk7.o\" -w") returned a non-zero value 0.
Here we see GCL trying to compile a new function... and failing.
Based on the previous error message, GCC was having trouble with the
"-I/root/axiom/mnt/fedora5/bin/../h". Clearly not good; this path
contains a reference to fedora5, while you're running suse and probably
not as root...
This is a funny artifact of how Axiom is compiled. This path points into
the compilation directory, but is totally unnecessary for Axiom to run
properly. On systems where the path doesn't exist, everything is fine.
Unfortunately, GCC sees that this path *might* exist but that your user
doesn't have permissions to look inside /root and see if it does...
For fun, run
Post by C. Frangos
strings `which AXIOMsys` | grep /root/axiom/mnt/fedora5/bin
You should see a line like
#+:akcl (setq si::*system-directory* "/root/axiom/mnt/fedora5/bin/")
That's where the problem lies.
To work around this, type the following line
)lisp (setf si::*system-directory* ".")
as your first command to Axiom after it starts up.
All your problems (wrt the above error) should go away.
Later,
Daniel
Bill Page
2007-11-01 21:18:43 UTC
Permalink
Constantine,

I think you should use:

-- map applies simplify to each cell of Acon
Acon := map(simplify,Acon)

Simplify does not automatically apply to each cell.

With this change I get the result:

(6) -> Aconnullity := nullity(Acon)

(6) 2
Type: PositiveInteger0

Regards,
Bill Page.
Post by Constantine Frangos
...
(1) I am trying to run the program below testkinemat1, but axiom does not
seem to find the built-in functions nullity() (and simplify()) for the
symbolic matrix Acon, and gives error messages.
...
testkinemat1() ==
--)read expandsincos.input
Acon := matrix([[1 , 0 , Lo1*sin(phi) , -sin(phi)*a , 0 , 0 , 0 , 0 , 0],_
[0 , 1 , -Lo1*cos(phi) , a*cos(phi) , 0 , 0 , 0 , 0 , 0],_
[1 , 0 , -Lo1*sin(phi) , 0 , -a*sin(phi), 0 , 0 , 0 , 0],_
[0 , 1 , Lo1*cos(phi) , 0 , a*cos(phi) , 0 , 0 , 0 , 0],_
[1,0,-Lc*cos(phi)+Lo1*sin(phi),0,0,0,-a*sin(phi)*cos(delta3)_
-a*cos(phi)*sin(delta3),0,0],_
[0,1,-Lc*sin(phi)-Lo1*cos(phi),0,0,0,a*cos(phi)*cos(delta3)_
-a*sin(phi)*sin(delta3),0,0],_
[1,0,-Lc*cos(phi)-Lo1*sin(phi),0,0,(-2*sin(phi)*Lo1*sin(delta3)-sin(phi)*_
Lc*cos(delta3)-cos(phi)*Lc*sin(delta3))*a/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_
[0,1,-Lc*sin(phi)+Lo1*cos(phi),0,0,a*(2*cos(phi)*Lo1*sin(delta3)+_
cos(phi)*Lc*cos(delta3)-sin(phi)*Lc*sin(delta3))/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_
[0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , -k]])
-- pause()
Acon := simplify(Acon)
rankAcon := rank(Acon)
Acone := rowEchelon(Acon)
Aconnull := nullSpace(Acon)
Aconnullity := nullity(Acon)
--detAcon:=determinant(Acon)
--detAcon:=factor(detAcon)
--detAcon:=expandsincos(detAcon)
--detAcon:=simplify(detAcon)
--end of program.
Loading...