Compiler in 2017a fails to package scripts that compiled well in 2016b

1 visualización (últimos 30 días)
I've been using compiler in 2016b to produce a standalone application based on a series of scripts. These are mainly GUIs, with a few being used to process the user's input, perform some basic matrix operations and export data in a few file formats. In 2016b, this has always complied well, producing an installer of size 10 MB.
Moving to 2017a, the packaging step seems to fail. This produces an installer of around 40 MB, even though they are operating on the same set of scripts. Compiler 2017a produces a few warnings like this one:
[Warning: Excluded "C:/Program
Files/MATLAB/R2017a/toolbox/fixedpoint/fixedpoint/+embedded/+ntxui/@NTX/NTX.m",
reason: The file or function has been excluded from packaging for the "MCR"
target environment according to the "Compiler" license. Either remove the file
or function from your code, or use the MATLAB function "isdeployed" to ensure
the function is not invoked in the deployed component.]
I know some functions cannot be used in standalone applications, but I've looked into this and don't think my scripts use any of these.
I also get this warning:
[Warning: Your deployed application may error out because file or folder paths
not present in the deployed environment may be included in your MATLAB startup
file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
determine the appropriate execution environment when including file and folder
paths, and recompile your application.
... but I can't tell if this is the reason the packaging seems not be working properly.
Any help would be much appreciated.
Ian
  4 comentarios
Kojiro Saito
Kojiro Saito el 7 de Sept. de 2017
OK, so the packaging log does not give us a hint. You need to enable a log file by turning on log files option in Additional Runtime Settings of MATLAB Compiler window then what errors occur when executing the standalone application.
Ian Maskery
Ian Maskery el 8 de Sept. de 2017
I've always used this option. I've found it helpful for diagnosing errors when the program is run in standalone mode. However, I haven't encountered any new errors whilst compiling in 2017a.
The application has been under development for some time, so only a few minor errors remain, and these occur infrequently. In general, the 2017a version runs error-free. In this respect it is no different from its performance when compiled with previous versions of Compiler.
The only real difference seems to be the failure of 2017a to package the application properly. I see this when I attempt to compile:
... and, as I said in the original post, the resulting application installer is around 4x bigger than it ought to be.
Ian

Iniciar sesión para comentar.

Respuestas (3)

Amit Doshi
Amit Doshi el 8 de Sept. de 2017
Editada: Amit Doshi el 8 de Sept. de 2017
Hello Ian,
MATLAB Compiler does not support deployment of all built-in functions. If a user invokes an unsupported function in a deployed application, the application will not work as expected. Starting MATLAB R2017a, we added a feature to warn users if they are using an unsupported function in their deployed application.
The warnings about functions from Fixed Point Designer started appearing as a by-product of this new feature, even though the user is not directly invoking Fixed Point Designer or any of its function. The developers are aware of this issue and are working on fixing it in a future release.
In the meantime, it is safe to ignore warnings about functions from the following path, unless you are specifically using Fixed Point Designer in your application:
C:/Program Files/MATLAB/R2017a/toolbox/fixedpoint/fixedpoint
For warnings generated from other function paths, please ensure that you are not using any unsupported functions or Toolbox functionality in your deployed application. Please refer to the following resources for a complete list of unsupported functions:
Commonly used built-in functions which cannot be deployed:
MATLAB Compiler support by toolbox:
  1 comentario
Johan Meijdam
Johan Meijdam el 11 de Sept. de 2017
Hi Amit,
I have a related question, because I cannot figure out whether some functions can, or cannot be compiled, even with that list. For instance, it is my understanding that the eval statement cannot be compiled (amongst others because if it depends on user input anything could be called with it). However I do not see it in the list of unsupported-functions. Does this belong to "Functions that require a command line, for example, the MATLAB lookfor function, will not work"? Also, the line "Simulink® functions, in general, will not work" is still a bit vague for me. Does this mean that also functions to parse the .mdl file are not supported, or is this more related to the UI-simulink functionality.
Kind regards

Iniciar sesión para comentar.


Jessie Bessel
Jessie Bessel el 4 de En. de 2020
Hello! Did you solve the error? I have the same error and I can not figure it out! Can you help me?

Image Analyst
Image Analyst el 4 de En. de 2020
For the warning: "[Warning: Your deployed application may error out because file or folder paths not present in the deployed environment may be included in your MATLAB startup file."
see my full explanation in this Answer in another Question.

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by