Simulink warning and error in mex s-function

Hi,
I have installed Matlab 2008b in a linux CentOS 5.7.
I got the warning message ' warning undefined variable "xmlcomp" or class "xmlcomp.register" ' when I start the simulink.
Then I got an error: 'Error while obtaining sizes from MEX S-function 'flab_sfun_FCS' in 'flab_sfuntmpl_FCS_test/S-function'. MATLAB error message: ... ' from S-function in Simulink. (The simulink file works well in other machine. I took the simulink file ".mdl" and source code of the mex file in and complied the mex file in this machine)
-About the warning, I am not sure if this warning has anything to do with the error or not. But could you please advise how to correct it?
-About the error, could you please advise how I can solve this error?
Thank you.

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2011년 11월 2일

0 개 추천

For the warning, try running "rehash toolboxcache" at the MATLAB prompt, and then clear the checkbox under Start->Preferences->General->Toolbox path caching->Enable toolbox path cache. Then restart MATLAB and see if that fixes the warning.
The S-function error that you see appears unrelated however. Could you please post the complete error message? The part after "MATLAB error message", which you have left out is what will actually give you an indication of what went wrong.

댓글 수: 5

Thanan
Thanan 2011년 11월 2일
Thank you very much for your response.
I tried the method you mentioned but it couldn't fix the warning.
The full warning message is:
Warning: Undefined variable "xmlcomp" or class "xmlcomp.register
> In sl_refresh_customizations>call_all at 91
In sl_refresh_customizations at 52
In slcustomize at 4
In simulinkrc at 39
And the full error message is:
Error while obtaining sizes from MEX S-function 'flab_sfun_FCS' in 'flab_sfuntmpl_FCS_test/S-function'. MATLAB error message: Invalid MEX-file 'home/FL/test-2011-02-09/ex/flab_stun_FCS.mexglx': home/FL/test-2011-02-09/ex/flab_stun_FCS.mexglx: cannot restore segment prot after reloc: Permission denied.
The error seems to a Linux related issue (not that MEX files are essentially shared libraries and equivalent to .so files): http://fedoraforum.org/forum/showthread.php?t=214976
Thanan
Thanan 2011년 11월 3일
Thank you, Kaustubha.
Disabling the SELinux could remove the error. But it seems to be a bad option. I will try other methods in the forum and let you know the result.
About the warning, do you any other method to fix it?
Thanan: I'm not aware of any other way to fix the warning - did the one I suggested not work for you? If not, please try contacting MathWorks Tech Support.
Thanan
Thanan 2011년 11월 4일
Thank you very much, Kaustubha.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Block and Blockset Authoring에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by