codegen can't build the simplest demo

11 views (last 30 days)
Xingwang Yong
Xingwang Yong on 22 Mar 2021
Commented: Xingwang Yong on 19 Jun 2021
I am using codegen to build the 1st example in its doc, i.e. mcadd.m, it did not work.
I am running Maltab2020a on CentOs 8.3. When I first install matlab, I ran into an error as described in here. I followed the advice there and managed to install matlab. But after installing, when I open coder, it says 'Bundle#290 start failed: /lib64/ undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b' in the command window. When I try to build something, it keeps saying the error message. So I can not use coder.
I tried to delete the two aforementioned .so files, and, from the bin path (/usr/local/......./bin/glnxa64), surprisingly I can open coder. But when I try to build mcadd.m, it errored and says 'FAILED: mcadd_mex.mexa64 , ............. /usr/bin/ld: cannot find -lstdc++'.
It is probably due to corrupted installtion. I reached out to Mathworks support, they suggest me to switch to other operating systems beacause CentOs is not offically supported by matlab or switch to a newer version of matlab.
Is there any way to fix this without switching OS or matlab version?

Answers (1)

AnnQ on 18 Jun 2021
I understand that you are having trouble usding MATLAB Coder in R2020a release on CentOS 8.3
This is a known issue on Red Hat based distributions including CentOS 8.2 and later. This is a link to the External Bug Report:
This issue has been fixed in R2021a Update 1. If upgrading is not an option, you can try this workaround in a terminal:
LD_PRELOAD="/usr/lib64/ /usr/lib64/"
  1 Comment
Xingwang Yong
Xingwang Yong on 19 Jun 2021
Thank you, Ann. I switched my OS to Debian, and it worked.
As for the LD_PRELOAD method, the Mathworks Support Team also suggest that, but it did not help. For me, switching to R2021a is not a good idea, since the new graphics system is considerably slow and buggy.

Sign in to comment.


Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!