bbopt / nomad

NOMAD - A blackbox optimization software
https://nomad-4-user-guide.readthedocs.io/
GNU Lesser General Public License v3.0
117 stars 24 forks source link

Conflict with MATLAB libstdc++.so.6 #149

Closed Lht97 closed 1 year ago

Lht97 commented 1 year ago

Hi,

I am trying to install NOMAD for MATLAB. I have g++ and the required libraries on my system. I first set up in MATLAB mex -setup C++ and ran:

cmake -DTEST_OPENMP=OFF -DBUILD_INTERFACE_MATLAB=ON -S . -B build/release
cmake --build build/release --parallel
cmake --install build/release

All these commands ran successfully. I then added $NOMAD_HOME/build/release/interfaces/Matlab_MEX to my MATLAB path.

However, when running NOMAD in MATLAB, I get the following error:

Invalid MEX-file '/home/.../Documents/nomad/build/release/interfaces/Matlab_MEX/nomadOpt.mexa64':
/usr/local/MATLAB/R2023a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by
/home/.../Documents/nomad/build/release/interfaces/Matlab_MEX/nomadOpt.mexa64)

I understand this error comes from a conflict between my system's and MATLAB's libstdc++.so.6, but do you know how to solve this issue?

Cheers, Haitian.