CCL Save-Application, Clisp Saveinitmem, Issues - lisp

On ccl on mac os x 10.9 i am having a problem cretaing executables.
(save-application "/full/path/to/saved-app" :prepend-kernel t) double clicking the produced executable file enters on terminal showing very long errors starting with a one like error: problems loadiing bundle:can't determine class name and ending with the kernel debugger options.
On ccl on windows i simply define a function and do the same above to save executable, later i can double click the output file it runs and remembers my defined function, ccl on mac dont remember also when i save image and load it to kernel manually.
on the clisp side, it creates executable on my mac, and on some widows installations it creates executable but i cannot launch executable, it gives an error prompt window saying something like
application failed to start because libreadline6.dll not found.
restarting application may solve the problem
but don't.
What are the problems here, any solutions?

The message says that the DLL cannot be found.
So, unless the OS is lying to us (which I wouldn't put past it, alas) the solution is
locate libreadline6.dll
add that directory to PATH or move/copy/link libreadline6.dll to a directory which is in PATH
or run your new image with an augmented PATH (either by creating an application shortcut or by running from the command line PATH=/path/to/libreadline6.dll:$PATH /my/new/lisp/image)

Related

how do I mimic the terminal path when making a system call in MATLAB on a mac

I'm trying to automate mac terminal calls in MATLAB. In my specific use case I used brew to install cmake but in MATLAB cmake isn't recognized [~,result] = system('cmake ..'); returns zsh:1: command not found: cmake
Using the following I am pretty sure I could update the path so that cmake is recognized.
(Mac,Matlab,bash) Changing the PATH of bash in Matlab for system commands
However, I was wondering if there was a generic way of mimicking the path that the terminal is seeing.
In particular when I run env in the terminal and in MATLAB using [~,result] = system('env'); the path variables are different and I'm wondering why that is and how to ensure they align.
When you start MATLAB from its icon on macOS, you never ran the login shell startup files, so most of your configuration is not loaded. That is, anything configured in ~/.zprofile, ~/.zshrc, etc. is not seen by MATLAB. Unlike other Unixes, macOS doesn’t start a login shell when you log on. See here for the differences between a login shell and a non-login shell.
One way around this is to launch MATLAB from a terminal window. Another way is to manually load the zsh configuration before running your shell command.
A cleaner solution is to avoid ~/.zprofile (loaded for login shells) and ~/.zshrc (loaded for interactive shells), and instead put your configuration in ~/.zshenv (loaded for all shells, including the one started by MATLAB for system() or !).
In particular, Homebrew adds a line
eval "$(/opt/homebrew/bin/brew shellenv)"
to your ~/.zprofile file. Moving this line to ~/.zshenv and restarting MATLAB should add the Homebrew configuration to shells started from within MATLAB.

SML/NJ Error in Command Prompt

So I installed SML/NJ in Windows 10 using the Windows Installer Package "smlnj-110.79", and following the instructions in this coursera video lecture, i should be able to open the command prompt and access sml by typing "sml". However, when I return "sml" I'm prompted that "sml is not recognized as an internal or external command, operable program or batch file". I should note that it works fine if I open the actual SML/NJ program itself. I am trying to use SML/NJ within emacs, will this affect that? Thank you!
You need to add the directory containing SML to your system path. On my machine the path entry is C:\Program Files (x86)\SMLNJ\bin\. See this for modifying the path in Windows 10. If you haven't manually edited your path before (which seems to be the case given the question) you do need to be careful to add to rather than overwrite the current path. Windows has always been clunky in making this possible. This is an article that suggests some utilities. I haven't tried them, so I can't vouch for them.

Load elf gdb error

I am trying to load an elf file into some .gdb file.\
When running the gdb file from cmd (Windows 7 - 64b), everything seems to be ok.
The commands execute properly, and the elf is loaded into the SRAM of my board.
The problem is when the same gdb file is ran from Eclipse (the Automotive feature of Eclipse).
The error I get:
Error in sourced command file:
"binary.elf" is not an object file: File format not recognized.
Can you help me to figure out what the problem should be?
"binary.elf" is not an object file: File format not recognized
This error means that you've tried to do (an equivalent of) file binary.elf in a GDB that was not compiled with ELF support (i.e. into native Windows version of GDB). That obviously wouldn't work.
You need to set up Eclipse to use appropriate cross-GDB, i.e. GDB that runs on Windows but knows how to debug ELF files. As dbrank0 said, you need to use correct launch configuration in Eclipse.

Can't get eclipse to run terminal command on mac

I have installed swig on my mac and it works in the console just fine. If I type swig -verison in terminal it spits out the version. Eclipse keeps telling me that it can't find swig. I am using the liquidfun library http://google.github.io/liquidfun/SWIG/html/index.html and it told me to put this export SWIG_BIN=$("which" swig) in .bashrc, which I did. This enviroment variable registers through terminal as well. Eclipse STILL won't grab swig properly. What the hell?
Bash reads .bash_profile, .bash_login or .profile. I don't expect the Eclipse process to load such a file (although I could be wrong) nor the SWIG_BIN variable to augment its search path for executables, but if you launch Eclipse from the shell, it should inherit the shell's environment variables.
Try running swig from eclipse using a full absolute path (the one that "which" returns).
The eclipse.ini file can set some startup parameters but perhaps not the path. There might be other eclipse startup files.
Another possibility is to add swig's directory to the path in a login script. (To test that, log out and back in, then start eclipse.)

MATLAB 7.6 Compile/Run Issue on Linux

I have created a program (GUI) on MATLAB 7.6 (2010a) and compiled it using depoytool. however, when I try to run the program, it complains about a missig library file (libmwmclmcrrt.so.7.6). I have installed MCR, and I am trying to point to it by typing the filename followed by the path to the MCR, but nothing is working.
Suggestions?
On linux, MATLAB creates the startup script called run_progname.sh. You should run this script, and not your compiled program directly. Assuming you are in the directory where the program progname is compiled, execute
./run_progname.sh <deployedMCRroot> args