couldn't run codegen under matlab
古いコメントを表示
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
採用された回答
その他の回答 (1 件)
Walter Roberson
2011 年 5 月 25 日
0 投票
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 件のコメント
Qingyan
2011 年 5 月 25 日
Kaustubha Govind
2011 年 5 月 25 日
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
2011 年 5 月 25 日
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
2011 年 5 月 25 日
Walter Roberson
2011 年 5 月 25 日
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
2011 年 5 月 26 日
@Qingyan: Have you tried running either:
!cp -p /some/source /some/destination
or
system('cp -p /some/source /some/destination')
Do they work okay?
カテゴリ
ヘルプ センター および File Exchange で MATLAB Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!