R2024b Linux packaging error when including MATLAB Runtime: Invalid MEX-file mcrcachedir.mexa64 / libmwdservices.so undefined symbol ioGetDirList

I am trying to package a MATLAB application from the location on a Linux cluster environment:
I am using MATLAB R2024b installed on the cluster
/gpfs2/app/matlab/R2024b
Issue
Packaging the application without including MATLAB Runtime works correctly. However, when I try to package the application with MATLAB Runtime included, MATLAB throws the following error:
Invalid MEX-file '/gpfs2/app/matlab/R2024b/toolbox/compiler/mcrcachedir.mexa64':
/gpfs2/app/matlab/R2024b/toolbox/compiler/../../../bin/glnxa64/../../bin/glnxa64/libmwdservices.so:
undefined symbol: ioGetDirList
What I would like help with
  1. What causes mcrcachedir.mexa64 / libmwdservices.so to fail with undefined symbol: ioGetDirList?
  2. Why does packaging work without runtime, but fail only when runtime is included?
  3. Is this likely due to:
  • mismatched MATLAB / MCR versions,
  • corrupted runtime installer reference,
  • or environment variable/library path issues on Linux cluster systems?
  1. Are there recommended checks for:
  • LD_LIBRARY_PATH
  • matlabroot
  • ldd on mcrcachedir.mexa64
  • compiler/runtime installer configuration in Preferences?
Any guidance on how to debug or resolve this for MATLAB R2024b on Linux would be very helpful.

1 Comment

Hi,
It is my understanding that you are able to package your application successfully without including MATLAB Runtime, but encounter an error when packaging with the runtime enabled on a Linux cluster environment.
This type of error typically occurs during runtime packaging when MATLAB relies on shared libraries and environment configuration, which can differ on cluster systems.
You may consider reviewing the deployment and MATLAB Runtime workflows to ensure the environment and runtime configuration are set up correctly.
You can refer to the following documentation for more information:

Sign in to comment.

Answers (1)

The error is most likely caused by a library-path conflict (especially LD_LIBRARY_PATH) that makes MATLAB R2024b load incompatible shared libraries, which only occurs when packaging with the MATLAB Runtime because additional MCR-related libraries such as mcrcachedir.mexa64 and libmwdservices.so are loaded.
I read the issue

Categories

Asked:

on 18 Jun 2026

Commented:

on 26 Jun 2026 at 10:50

Community Treasure Hunt

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

Start Hunting!