Why do I receive a "Cache file not built" error when I build my standalone component using MATLAB Compiler 4.9 (R2008b) on a Linux machine?

1 view (last 30 days)
I am using DEPLOYTOOL or MCC to compile my project into a standalone executable on a Linux computer. I get the following error during compilation:
Input/output error
Warning: Could not write cache file . . .
file = $HOME/.matlab/R2008b/mcc.cache/1.24.4.17:user:3393823678
Cache file not built . . .
??? Error using ==> mcc
Error executing mcc, return status = 1.
There were errors during compilation process

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 28 Jan 2010
This error can occur when using MATLAB Compiler 4.9 (R2008b) on a Linux machine whose HOME directory is one that was mounted from a Windows file system. In Linux, by default, an MCC cache is written to speed up compilation, and the cache file name contains colon (:) characters, which are not allowed in Windows folder filenames.
To work around this issue, change the path of the "mcc.cache" folder as follows:
Check if the home folder of the LINUX machine uses a environment variable called "HOME". Within MATLAB, set this environment variable to some different home directory, configured on a Linux file server from MATLAB using the SETENV command.
You can do this in either of the ways:
a. Find if you have a file named "startup.m" in MATLAB by typing the following at MATLAB command prompt.
which -all startup.m
b. If it does not exist, create an MATLAB file with the name STARTUP in a directory which is on the MATLAB path.
c. Place the following line in the startup.m file:
setenv('HOME',<TempHOMEDirectoryonLinux>)
where TempHOMEDirectoryonLinux is a different home directory, located on a Linux file server.
If you do not wish to change your HOME environment variable in MATLAB for all sessions for any reasons, you would need to change the HOME environment variable for that particular session before building a stand-alone application, and then set it back to the original value.

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products


Release

R2008b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!