Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

symbol __mt_MasterFunction_: referenced symbol not found

807575Feb 10 2006 — edited Mar 14 2006
I am trying to build a matlab s-function using Sun Studio 10 compilers. The program compiles but when I try to load it into matlab I get

??? Invalid MEX-file '/export/ford/sl0473/u/jmccall4/+Work/GMP_data/Release_tests_6/gmp_cf_4_state_gui_redo/gmp_4_state_base_gmp_mex.mexsol': ld.so.1: /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/MATLAB: fatal: relocation error: file /opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfai_isa.so.3: symbol __mt_MasterFunction_: referenced symbol not found.


This is a mixed Fortran and C program.
The fortran code is compiled with
f90 -c -I/apps/matlab/14sp3.p/vendor/extern/include -I/apps/matlab/14sp3.p/vendor/simulink/include -KPIC -C -e -u -O2 -v -r8const -mt -xopenmp base_main.f

The C code with
cc -c -I/apps/matlab/14sp3.p/vendor/extern/include -I/apps/matlab/14sp3.p/vendor/simulink/include -DMATLAB_MEX_FILE -KPIC -xO2 -xlibmieee -D__EXTENSIONS__ -D_POSIX_C_SOURCE=199506L -mt -xopenmp -D_XOPEN_SOURCE=600 -xlibmil -DNDEBUG base_mex.c

and the link is done with
f90 -xO2 -G -mt -xopenmp -M/apps/matlab/14sp3.p/vendor/extern/lib/sol2/fexport.map -o base_mex.mexsol base_main.o base_mex.o /apps/matlab/14sp3.p/vendor/extern/lib/sol2/version4.o my_base_main.a -L/apps/matlab/14sp3.p/vendor/bin/sol2 -lmx -lmex -lmat -lm -lc -L/apps/matlab/14sp3.p/vendor/bin/sol2 -lmx -lmex -lmat -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai -lfmaxvai -lfsu -lsunmath -lm -lc -lmtsk

an elfdump of the mtsk library leads me to believe the __mt_MasterFunction_ is defined in that library.

How can I compile this so it will run in Matlab?

James.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2006
Added on Feb 10 2006
7 comments
302 views