Deploytool for MATLAB R2013b doesn't work, what has changed? - matlab

For years I've been using the integrated deploytool to create easily distributable *.exe files for my colleagues.
I installed R2013b a couple of days ago and I can't use the deploytool anymore. The log file when trying to package gives this:
ant:
<ant>
<mkdir dir="C:\Users\xxxx\Matlab\programxy\test\for_redistribution" />
<mkdir dir="C:\Users\xxxx\Matlab\programxy\test\for_testing" />
</ant>
mcc -C -o test -W WinMain:test -T link:exe -d 'C:\Users\xxxx\Matlab\programxy\test\for_testing' -v 'C:\Users\xxxx\Matlab\programxy\test.m'
Test checkout of feature 'Compiler' failed.
mcc failed.
This looks like a license issue but out license does include the compiler.
license('test', 'compiler')
gives '1'.
Is there anything new with R2013b that I'm just missing? Do I have to install some addon for this to work again?

As mentioned in the comment: if the problem is a missing license matlab typically expresses this very clearly.
Judging from your description I would guess that you did not set up / select the compiler after installing the new version of matlab.
Though it is a bit hard to read, I believe this site contains some things to try.

It does not seem like a licensing issue. But contacting technical support would be the best option.
Also, check if you have licenses for all the products you are trying to deploy with.
It might be worthy to check out if the compiler you are using with is compatible with R2013b.

Related

relating issues with mcc error & mbuild -setup settings for R2013b & deploytool for matlab

I try to make dll for vba in matlab using "deploytool" in matlab.
My environments are Matlab R2013b and VS2013.
I used bellow command to set the compiler
mbuild -setup
And I put the Visual studio 2013 as a compiler directory.
But deploytool is failed with below messages.
ant:
<ant>
<mkdir dir="C:\Program Files\MATLAB\R2013b\work\mymagic\for_redistribution" />
<mkdir dir="C:\Program Files\MATLAB\R2013b\work\mymagic\for_testing" />
mcc -W 'excel:mymagic,Class1,1.0' -T link:lib -b -d 'C:\Program
Files\MATLAB\R2013b\work\mymagic\for_testing' -v 'C:\Program
Files\MATLAB\R2013b\work\mymagic.m' 'class{Class1:C:\Program
Files\MATLAB\R2013b\work\mymagic.m}'
Test checkout of feature 'Compiler' failed.
mcc failed.
Also I checked lincese issues from other similar discussions.
Using !mcc and license('checkout','Compiler')
!mcc returns below error
Error: Could not check out a Compiler license:
Cannot find license file.
The license files (or license server system network addresses) attempted are
listed below. Use LM_LICENSE_FILE to use a different license file,
or contact your software provider for a license file.
Feature: Compiler
Filename: C:\Program Files\MATLAB\R2013b\licenses
License path: C:\Users\****1505\AppData\Roaming\MathWorks\MATLAB\R2013b_licenses;C:\Program Files\MATLAB\R2013b\licenses\license.dat;C:\Program Files\MATLAB\R2013b\licenses;
FLEXnet Licensing error:-1,359. System Error: 2 "No such file or directory"
For further information, refer to the FLEXnet Licensing documentation,
available at "www.flexerasoftware.com"..
But license('checkout','Compiler') gives me
ans = 1
I figure out one thing that matlab R2013b supports until Visual Studio 2012.
From below url.
http://kr.mathworks.com/support/compilers/R2013b/index.html?sec=win32
Should I install 2012 VS to use mcc in Matlab 2013 ?
Or is there any other methods to solve this problem
?
The similar question also doesn't get the proper answer.
Deploytool for MATLAB R2013b doesn't work, what has changed?
I will try below methods
http://de.mathworks.com/matlabcentral/answers/121413-error-using-mcc-test-checkout-of-feature-compiler-failed
Maybe the license for compiler is missing.
"mcc" command in matlab doesn't work.
So I will follow below
www.youtube.com/watch?v=PsKQ7loWZgU
Still it doesn't work
Firstly, the command "mcc" in matlab does't work
So, I try "mbuild -setup" again but it still gives same error messages.
The problem here was that, as I already mentioned in the question, Matlab 2013b doesn't comparable with the visual studio 2013.
So I downloaded SDK7 and .net framework 4 in below site
https://msdn.microsoft.com/ko-kr/vstudio/aa496123
https://www.microsoft.com/en-us/download/confirmation.aspx?id=8442
But choosing those options in "mbuild -setup" doesn't be resolved
I also try to download another package
https://www.microsoft.com/ko-kr/download/details.aspx?id=40784
still all failed
This is not an exact answer, just useful comments for this problem.
We can do 3 things to check our license for matlab compiler
license('checkout','Compiler')
!mcc
mcc
I think if we can pass those checking than we can use deploytool without any problems.
In my case, after activation of license it gives me an error, like,
Error: Could not check out a Compiler license:
SIGN= keyword required but missing from the license certificate.
This is probably because the license is older than the application
You need to obtain a SIGN= version of this license from your vendor.
Feature: Compiler
Missing: SIGN1=
License path: C:\Users\****1505\AppData\Roaming\MathWorks\MATLAB\R2013b_licenses;C:\Program Files\MATLAB\R2013b\licenses\license.dat;C:\Program Files\MATLAB\R2013b\licenses\license_****1505-PC_874166_R2013b.lic;
FLEXnet Licensing error:-114,582
For further information, refer to the FLEXnet Licensing documentation,
available at "www.flexerasoftware.com"..
So I might need to update my license to resolve this problem.
I simply change Matlab 2013 to 2014 version. It makes all fine
Also, I believe the reason for error was license issues.
After installing matlab 2014 I did below 3 things to make dll for vba
install MATLAB MCR
command
mcrinstaller
in matlab
install the generated file. In my case it was located in
C:\Program Files\MATLAB\R2014a\toolbox\compiler\deploy\win32\MCRInstaller.exe
allow macros in VBA from security center of Excel
Create VBA ADD IN using deploytool of Matlab

cross-compile postgresql for ARM Sitara AM335x

I'm having trouble cross compiling PostgreSQL for my TI Sitara AM335x EVM SK. My host system is an i386 machine running Ubuntu 12.04.
My application is written in C++ using Qt. When I try and compile, I get the error that libpq.so is incompatible. I believe this is because the cross compiler is trying to use the host libpq.so instead of one for the target system (which as I have found out, doesn't exist).
I've downloaded the source for PostgreSQL with the intention of cross compiling that in order to give me the libpq.so library that will be compatible with my target system, however there is virtually no information on how to do this.
I have tried using the CC argument with the configure file to change my compiler to the following: CC=/home/tim/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gcc but the configure script gives me this error: configure: error: cannot run C compiled programs. If you meant to cross compile, use --host.
The configure file makes a small reference to the --host option, but the only information in the file that I could find is in reference to mingw and windows, which isn't what I want.
I've done some quick searching through the configure file, and it references the --host option, but with no explanation of what is a valid host. I'm assuming that with --host option there will be an associated --target.
What arguments can I give the configure script so that it will cross compile with the correct compiler to generate a library that my target device can use? Are there any resources out there that I haven't found in regards to how the --host/--target works or how to use them?
OK, so after fiddling around for a little while, I think I was actually able to cross compile PostgreSQL and answer my own question.
Before I went any further, I had realized I had forgotten to add the path to my cross compiler to the PATH environment variable. I used the command export PATH=/path/to/cross/compiler:$PATH to insert the compiler path to the PATH environment variable.
Next, I did some experimenting with the --host option. To start off with I tried using ./configure --host=arm-linux-gnueabihf and running the configure script. The configure script seemed to accept this as the host argument. I then went to the next step of running the makefile. Running this makefile resulted in errors being generated. The errors were selected processor does not support Thumb mode. I did a quick search to see what information I could find about this error and came to this webpage: http://www.postgresql.org/message-id/E1Ra1sk-0000Pq-EL#wrigleys.postgresql.org.
This webpage gave me a bit more information since it seemed like the person was trying to do something very similar to me. One of the responders to the post mentioned that --disable-spinlocks is intended for processors that aren't supported by default by PostgreSQL. I emulated the arguments that were used in the website listed above and used the command: ./configure --host=arm-linux CC=arm-linux-gnueabihf-gcc AR=arm-linux-gnueabihf-ar CPP=arm-linux-gnueabihf-cpp --without-readline --without-zlib --disable-spinlocks to generate my makefile. This makefile actually generated all of the files, including the libpq.so library file I was needing.
Hope this helps somebody else in the future!

MATLAB Compiler

I use MATLAB 2012a. I need to compile a mex file in my program. Everything works fine with Microsoft SDK 7.1 but I need a minor compiler in order to work my program in other computers. Suggested compilers on MathWorks website are compilers that need to be installed as packages. Is there any compilers that work stand-alone and don't need to be installed?
You can use MinGW, but it is not straightforward. See this Q&A. The accepted answer suggest to compile and link MEX files outside of MATLAB, which is fine, but it's simple to just create mexopts.bat to do this.
A good mexopts.bat for MING is hosted here. Pick a MINGW distribution from win-builds and set the paths in mexopts. Then you can use mex -setup with this file.
gnumex is a disaster, IMO.

How to implement LIBSVM Matlab interface?

I am having problem with implementing LibSVM to MATLAB. I downloaded LibSVM package, libsvm-3.14 to my Windows 7 PC and tried to implement it, but I got this message:
"No supported SDK or compiler was found on this computer. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2011a/win64.html
If make.m fails, please check README about detailed instructions."
The problem is yet not solved even after downloading the folder from this website: http://www.csie.ntu.edu.tw/~cjlin/libsvm/#matlab Is there another site where I could download that?
I am using libsvm from the site you mentioned - no problems.
Sounds like you don't have the Windows SDK installed.
You can install it from the link at http://www.mathworks.com.au/support/compilers/R2011a/win64.html
Another possibility is that you don't have mex setup.
You can check using mex.getCompilerConfigurations()
If not run: mex -setup
You might also need to install a c++ compiler - there is a link to get VC2010 expressed om the web page above.

Getting a "ld: cannot find -lcunit" error with CUnit

I'm using NetBeans 7.1 on Windows 7. I downloaded the CUnit archive and used shell scripts supplied with the archive to install it ($make install, etc.). I'm using Cygwin as my compiler, and whenever I try to build the unit test, I get the following error:
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lcunit
Obviously, the linker (ld) doesn't know where to look for something, but I don't know the intricacies of how this stuff works. Searching for lcunit on my computer didn't return anything except for the makefile of this project.
One thing I think I should mention is that when I installed CUnit, NetBeans did not know where to look for it. It got installed into /usr/local/ and this was not one of the paths NetBeans parsed.
"-lcunit" is just a flag/option instructing your compiler to link all cunit stuff in your app.
usage could be something like this (gcc):
gcc test.c -lcunit -o test
looks like your compiler doesn't know what to do with this flag... :/