MATLAB Answers

mcc fails to build using REQUIREMENTS but not DEPFUN

3 views (last 30 days)
Tom
Tom on 20 Apr 2015
Edited: Tom on 20 Apr 2015
Compiling the following trivial function
---compiletest.m----
function compiletest(varargin)
disp('hi');
end
---compiletest.m----
using the following commant line:
>> mcc -o compiletest -W main:compiletest -T link:exe -d ~/tmp/matlab compiletest.m -I /my/abs/path/to/add
however getting the following error:
-----------------
Compiler version: 5.2 (R2014b)
Dependency analysis by REQUIREMENTS.
Error using cellfun
All of the input arguments must be of the same size and shape.
Previous inputs had size 2589 in dimension 2. Input #3 has size 1
Error in matlab.depfun.internal.preloadWhichCache (line 52)
builtinStr = cellfun(@(sym,type,loc)wrapPath(sym,type,loc), ...
Error in matlab.depfun.internal.Completion (line 1921)
matlab.depfun.internal.preloadWhichCache(obj.db_path, pth);
Error in matlab.depfun.internal.requirements (line 184)
c = matlab.depfun.internal.Completion(files, tgt, 'useDatabase');
Unexpected error while determining required deployable files. Compilation terminated.
-----------------
however the following does
mcc -o compiletest -W main:compiletest -T link:exe -d ~/tmp/matlab -v compiletest.m
As I'm using MCC on the shell I need to use the -I flag to add the paths. Have double checked the paths are there. Also my compiletest.m function is so simple I have no dependancies, so it seems like just -I flag interaction with mcc.
It works fine when doing via DEPFUN and not REQUIREMENTS (export MCC_USE_DEPFUN=1) in the shell. This is undocumented, I just found this on the web.
Any ideas of what to test? Seems to be -I flag not implemented properly for this new REQUIREMENTS dependancy walker.
using 2014b on Linux RHL 6.4

Answers (0)

Community Treasure Hunt

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

Start Hunting!