couldn't run codegen under matlab
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 25 de Mayo de 2011
0 votos
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 comentarios
Qingyan
el 25 de Mayo de 2011
Kaustubha Govind
el 25 de Mayo de 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
el 25 de Mayo de 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
el 25 de Mayo de 2011
Walter Roberson
el 25 de Mayo de 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
el 26 de Mayo de 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?
Categorías
Más información sobre MATLAB Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!