Arthur Ralfs <art...@mathbrane.ca> writes: | Hi Gaby, | | The panserver.spad file seems to compile with latest trunk but now I get: | | ; /mnt/sdb3/arthur-home1/openaxiom/panserver/SOCKLIB.NRLIB/code.fasl written | ; compilation finished in 0:00:00.105 | | >> System error: | Compilation of generated Lisp failed
Hi Arthur, This problem is separate from the FFI interface code per se. The errors are caused by mixing Lisp variables/instructions with Spad variables/instructions in way that the Spad compiler does not understand. This is a problem common to all AXIOM compilers; older versions may let it pass by, but only to lead to random `memory may be damaged' errors. For example, in sendCommand(), we have SETQ(tmpmathml$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp SETQ(tmpalgebra$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp SETQ(savemathml$Lisp, _$texOutputStream$Lisp)$Lisp SETQ(savealgebra$Lisp, _$algebraOutputStream$Lisp)$Lisp As currently written, the variables `tmpmathml', `tmpalgebra', etc., appear to be intended to Lisp-level special variables, not Spad variables. However the Spad compiler does not know that. So it generates code that does not tell the Lisp compiler that they are special variables. The way we tell the Spad compiler that a Lisp variable is special, is that its name starts with a dollar -- e.g. _$algebraOutputStream. On the other hand, I am not too sure you wanted `tmpmathml' or `tmpalgebra' to be Lisp-level special variables. So, my question is: are they reasons why you don't say tmpmathml := MAKE_-STRING_-OUTPUT_-STREAM()$Lisp tmpalgebra := MAKE_-STRING_-OUTPUT_-STREAM()$Lisp savemathml := _$texOutputStream$Lisp savealgebra := _$algebraOutputStream$Lisp -- Gaby ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel