Why do I see an error in ModelSim when using the VSIM command in Link For ModelSim?

13 views (last 30 days)
When I use the VSIM command in ModelSim GUI, I see the following errors:
# Loading /mathworks/devel/sandbox/merickso/adsp.test/matlab/toolbox/modelsim/linux32/simulinklink.so
# Error: (vsim-3197) Load of "/mathworks/devel/sandbox/merickso/adsp.test/matlab/toolbox/modelsim/linux32/simulinklink.so" failed: /mathworks/hub/share/apps/HDLTools/ModelSim/questasim-6.2c-tmw-000/questasim/gcc-3.2.3-rhe21/lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /mathworks/devel/sandbox/merickso/adsp.test/matlab/sys/os/glnx86/libstdc++.so.6).
# Error: (vsim-FLI-3160) Failed to load FLI object file "/mathworks/devel/sandbox/merickso/adsp.test/matlab/toolbox/modelsim/linux32/simulinklink.so".

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Nov 2016
This enhancement has been incorporated in Release 2007b (R2007b). For previous product releases, read below for any possible workarounds:
If you have installed a Mentor Graphics distributed GCC in the ModelSim/QuestaSim installation, the Mentor Graphics VSIM application will prepend potentially incompatible paths to the LD_LIBRARY_PATH variable. The error message in the VSIM application will be similar to the following:
  1. Loading /mathworks/devel/sandbox/merickso/adsp.test/matlab/toolbox/modelsim/linux32/simulinklink.so
  2. Error: (vsim-3197) Load of "/mathworks/devel/sandbox/merickso/adsp.test/matlab/toolbox/modelsim/linux32/simulinklink.so" failed: /mathworks/hub/share/apps/HDLTools/ModelSim/questasim-6.2c-tmw-000/questasim/gcc-3.2.3-rhe21/lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /mathworks/devel/sandbox/merickso/adsp.test/matlab/sys/os/glnx86/libstdc++.so.6).
  3. Error: (vsim-FLI-3160) Failed to load FLI object file "/mathworks/devel/sandbox/merickso/adsp.test/matlab/toolbox/modelsim/linux32/simulinklink.so".
You can determine if this is the case on Unix by examining LD_LIBRARY_PATH in the VSIM Tcl shell:
vsim> array get env LD_LIBRARY_PATH
Several MATLAB installation directories, including MATLABROOT/sys/os/<OS>, should be listed before any Mentor installation directories.
These are the workaround options for R2006b and earlier versions:
1. If you do not have a Mentor Graphics bundled GCC installed and the MATLAB installation directories are not first in the LD_LIBRARY_PATH, you likely have a non-default MATLAB_SHELL or incorrect setup in your login files.
2. If you have a Mentor Graphics bundled GCC installed and it is not really being used, removing that installation will prevent VSIM from pre-pending ModelSim/QuestaSim installation paths. You can remove the installation in one of two ways:
1. Rename the Mentor Graphics GCC installation to something else.
For example:
mv gcc-3.3-sunos58 bak.gcc-3.3-sunos58
2. Set the modelsim.ini variable CppPath to point to anywhere but the Mentor Graphics bundled GCC executables, for example:
CppPath = /foobar
3. If you have a Mentor Graphics bundled GCC installed and it is being used (e.g., you are developing your own C++ libraries or SystemC libraries that are linked into the ModelSim/QuestaSim simulator), then there is potentially a GCC compatibility issue between our library and your libraries.
1. If you are on a 32-bit Linux platform using the Mentor Graphics bundled gcc-3.2.3-rhe21, moving to the Mentor Graphics bundled gcc-4.0.2-rhe2.1 should fix the issue.
In this case you should do the following:
1. Use the command:
mv gcc-3.2.3-rhe21 bak.gcc-3.2.3-rhe21
2. Install the gcc-4.0.2-rhe21.tar.gz file from Mentor Graphics web site.
2. If you are not on a 32-bit Linux platform using the Mentor Graphics bundled gcc-3.2.3-rhe21 and our library is not loading, then there may be other incompatibilities present and you should contact MathWorks Technical Support.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!