couldn't run codegen under matlab
Ältere Kommentare anzeigen
I have trial version of matlab coder,and download a sample coder from mathwork: hello_world. and followed the instruction of how to setup and run the sample.
when I tried to run codegen to generate mex function within matlab, I get a error message like: >> codegen hello_world ??? cp: preserving permissions for `/var/local/scratch/qguan/coder2/coderdemo_hello_world/codegen/mex/hello_world/mexopts.sh': Operation not supported
I checked uid and gid for the current workfolder, it is set all fine and rw enabled.
what else I should be looking into? or is it known issue?
Thanks so much for your help! Qingyan
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 25 Mai 2011
0 Stimmen
It sounds as if at some point the script is executing the Linux command
cp -p SomeFile /var/local/scratch/qguan/coder2/coderdemo_hello_world/codegen/mex/hello_world/mexopts.sh
(Or --preserve instead of -p)
and that for some reason keeping the permissions is not possible.
Sometimes preserving permissions is not possible with networked file systems.
What I would probably do is fine the "cp" line and remove the "-p" or "--preserve" option.
6 Kommentare
Qingyan
am 25 Mai 2011
Kaustubha Govind
am 25 Mai 2011
Could it be that there is a firewall-like software that doesn't allow MATLAB to run with the same privileges as when you run from shell?
Walter Roberson
am 25 Mai 2011
Firewall-like software seems unlikely for Linux.
Differences in operation are possible if codegen or something it exec()'s is suid or sgid for some reason.
I can tell from the message that "cp" itself is being executed at some level. You could probably determine where using Linux's strace.
Qingyan
am 25 Mai 2011
Walter Roberson
am 25 Mai 2011
The documentation for copyfile is inconsistent with copyfile being equivalent to cp -p . The copyfile documentation indicates, "The read-only and archive attributes of source are not preserved in destination." but the point of cp -p is to preserve at least the read-only attribute.
Kaustubha Govind
am 26 Mai 2011
@Qingyan: Have you tried running either:
!cp -p /some/source /some/destination
or
system('cp -p /some/source /some/destination')
Do they work okay?
Kategorien
Mehr zu MATLAB Coder finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!