0

I have a deploytool project that compiles and packages a MATLAB command line application correctly to an windows 64 installable exe if I run deploytool inside MATLAB. The packaging process also works correctly if I build inside the MATLAB deploytool GUI.

If I run the deploytool from the Windows command line, the same project correctly builds the application, with the results in the for_testing folder, but fails to create the installable image with the error message, "Package failed", but no further information. I cannot find a log file or any other data to help resolve the problem.

Please help.

I am using MATLAB R2014a under 64 bit Windows 7.

Here is the output from inside MATLAB (which is the same for deploytool or applicationcompiler). what is slightly odd is that the MATLAB command prompt comes back after the mcc line, event though the process is still running, as though it is running in the background:

>> applicationCompiler -package nam_converter.prj
Some of the build deliverables are missing. Rebuilding the project.
ant:

<ant>

  <mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_redistribution" />

  <mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing" />

</ant>
mcc -C -o nam_converter -W main:nam_converter -T link:exe -d C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing -R '-logfile,nam_converter.log' -v C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m 
Compiler version: 5.1 (R2014a)
Dependency analysis by REQUIREMENTS.
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\matlab\winfun\NET 
> In path at 33
  In requirements at 156 
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR 
> In path at 33
  In requirements at 156 
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR\dataclasses 
> In path at 33
  In requirements at 156 
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\simulink\simulink\MPlayIO 
> In path at 33
  In requirements at 156 
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\slvnv\reqmgt\RTExplorer 
> In path at 33
  In requirements at 156 
[Warning: Adding path
"C:\Users\ndavies\Documents\matlab_utilities\nam_converter" to Compiler path
instance. 
Parsing file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m"
  (Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\deployprint.m"
  (Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\printdlg.m"
  (Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\readme.txt".
Start packaging process
Packaging...
Adding custom icon C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter_resources\icon.ico to C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\nam_converter.exe.
Attempting to embed the CTF archive into the application C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\nam_converter.exe.
Finished embedding CTF archive. Deleting the external CTF archive.
Creating the bundle...
Web based installer created at C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_redistribution\nam_converter_installer_web.exe.
Packaging complete.
Package finished

Here is the output in the command window:

C:\Users\ndavies\Documents\matlab_utilities\nam_converter>deploytool -package nam_converter.prj
Some of the build deliverables are missing. Rebuilding the project.
ant:
<ant>
  <mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_redistribution" />
  <mkdir dir="C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing" />
</ant>
mcc -C -o nam_converter -W main:nam_converter -T link:exe -d C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing -R '-logfile,nam_converter.log' -v C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m
lprj
mcc -C -o 'nam_converter' -W 'main:nam_converter' -T 'link:exe' -d 'C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing' -R -logfile,nam_converter.log -v 'C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m'
Compiler version: 5.1 (R2014a)
Dependency analysis by REQUIREMENTS.
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\matlab\winfun\NET
> In path at 33
  In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR
> In path at 33
  In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\rtw\targets\AUTOSAR\AUTOSAR\dataclasses
> In path at 33
  In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\simulink\simulink\MPlayIO
> In path at 33
  In requirements at 156
Warning: Duplicate directory name: C:\Program
Files\MATLAB\R2014a\toolbox\slvnv\reqmgt\RTExplorer
> In path at 33
  In requirements at 156
Warning: Adding path
"C:\Users\ndavies\Documents\matlab_utilities\nam_converter" to Compiler path
instance.
Parsing file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter.m"
        (Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\deployprint.m"
        (Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\printdlg.m"
        (Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "C:\Users\ndavies\Documents\matlab_utilities\nam_converter\nam_converter\for_testing\readme.txt".
Start packaging process
Package failed

C:\Users\ndavies\Documents\matlab_utilities\nam_converter>
sepp2k
  • 363,768
  • 54
  • 674
  • 675
Nigel Davies
  • 1,640
  • 1
  • 13
  • 26
  • I'm not sure what the immediate issue is, but as I understand it Simulink, RTW and Simulink V and V are not supported by MATLAB Compiler, so I'm surprised anything is happening at all. – Sam Roberts Feb 05 '15 at 13:47
  • @Sam, Why do you say that? I am not using Simulink or RTW. My application is pure MATLAB. Have you spotted something that is invoking those components by mistake? – Nigel Davies Feb 05 '15 at 13:59
  • The warnings in the output you included in your question refer to directories that are part of those products. If you're sure your application doesn't use those products, might you have some issue with those products being on your path? Perhaps you could (in deploytool anyway, I'm not sure how to do this with `mcc`) go into the project settings and explicitly remove any of those products from the list of toolboxes referenced. I'm just speculating, though. – Sam Roberts Feb 05 '15 at 14:13
  • @Sam Roberts I think those error messages are benign. I have tried hard to understand and eliminate them. My MATLAB path has pair of lines like this: C:\Program Files\MATLAB\R2014a\toolbox\rtw\targets\autosar\autosar\dataclasses C:\Program Files\MATLAB\R2014a\toolbox\rtw\targets\autosar\autosar which I blame for the problem. Compiling with mcc -N raises a different error, again with minimal debug help. (BTW, do you know if there is a way to move this conversation off the main board to keep the original question/answer cleaner? – Nigel Davies Feb 05 '15 at 14:36
  • SO does have some sort of "chat room" facility for moving conversations offline, but I'm afraid I've never used it. In any case, I don't think I have more advice to offer immediately - sorry. – Sam Roberts Feb 05 '15 at 14:57
  • @ Sam Roberts, I have edited my matlab path with pathtool and eliminated those error messages. Packaging still fails in the Windows commmand window. And thanks anyway. – Nigel Davies Feb 05 '15 at 14:58

1 Answers1

1

This turns out to be a fault in MATLAB R2014a, fixed in R2014b.

Nigel Davies
  • 1,640
  • 1
  • 13
  • 26