Matlab compiler large CTF file error

13 Ansichten (letzte 30 Tage)
Laurent
Laurent am 5 Dez. 2024
Beantwortet: Laurent am 6 Dez. 2024
Hi everyone,
I'm trying to compile a relatively small function "dataset_processing.m" using Matlab Compiler R2022b on a Linux machine, for later deployment as a standalone executable on another Linux machine. I compile in the Linux terminal with the following command:
mcc -m dataset_processing.m -a functions/ -d test_compiler/ -R -nodisplay
I obtain the following error:
Out of disk space. Failed to create CTF file. Please free 11515542204 bytes and re-run Compiler.
The requested CTF file size is huge (10.7 GB), so I suspect a problem. Indeed, I tested other compilations to compare: when testing a compilation on Windows with R2023b it works fine and the executable is 1.5 MB, and when testing on Linux with R2018b it works fine and the executable is 3 MB. Sadly, I cannot use Windows, nor Linux with R2018b because my code uses functions from recent releases. I also cannot free the required disk space because the Linux machine for compilation is a small dedicated server with limited disk space.
I also tried to compile with R2020b, R2021a, and R2021b, but I had the same issue. I tried to put the -C flag as compiler option to prevent creating a CTF file (from what I understood from the documentation) but the same error appeared.
Would someone have a solution to avoid creating the CTF file, or to prevent it from being that large?
Thank you in advance!
Laurent

Akzeptierte Antwort

Laurent
Laurent am 6 Dez. 2024
Update:
I managed to solve the problem: the flag -d to specify the destination folder was causing the problem. When doing
mcc -m dataset_processing.m -a functions/ -d test_compiler/ -R -nodisplay
I have the huge CTF file problem, but when doing
mcc -m dataset_processing.m -a functions/ -R -nodisplay
it works fine. This is very strange, but it works now.

Weitere Antworten (1)

Subhajyoti
Subhajyoti am 5 Dez. 2024
It is my understanding that you are creating a standalone application for deployment outside MATLAB.
You can creates a deployable standalone application with additional options using the 'compiler.build.standaloneApplication'. It has been introduced since MATLAB R202b.
Refer to the following MathWorks Documentation to know more about it:
  1 Kommentar
Laurent
Laurent am 6 Dez. 2024
Thank you for your answer. I tried using the 'compiler.build.standaloneApplication' with various options such as 'EmbedArchive','Off' and 'SupportPackages","none" to make a test without embedding the CTF file and without including any package/toolbox, however I still get the same error as when trying to compile with the usual mcc command...
Would you know what could be causing that CTF file to be so large (even with no included toolbox), or what else could be tried to reduce its size? Thank you in advance.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Application Deployment finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by