voicesauce / opensauce-python

Voice analysis software (Python port of VoiceSauce)
Apache License 2.0
55 stars 16 forks source link

Matlab can't call external programs like Praat in Linux #35

Open terriyu opened 5 years ago

terriyu commented 5 years ago

Note this is an issue for VoiceSauce in MATLAB, not for OpenSauce. There isn't a good place to document this error, so I decided to put it here.

When I try to run VoiceSauce in Matlab to obtain test data for OpenSauce, I get an error for the Praat calculations:

/usr/bin/praat: /usr/local/MATLAB/R2016b/sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/bin/praat)

Apparently, this error occurs when MATLAB tries to call an external program on newer versions of Linux. The version of libstdc++ that MATLAB uses is too old, so you need to tell MATLAB to use a newer version in your Linux operating system. See more details in this discussion.

I was able to get the error to go away by running the command

$ alias matlab='LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 /usr/local/MATLAB/R2016b/bin/matlab -desktop'

before running MATLAB via $ matlab &.

You can make the solution permanent by adding that above alias command to your .bashrc or .profile.