Re: setting dyld_library_path causes x11 to fail
Re: setting dyld_library_path causes x11 to fail
- Subject: Re: setting dyld_library_path causes x11 to fail
- From: Jeremy Huddleston <email@hidden>
- Date: Wed, 25 Apr 2012 11:07:23 -0700
On Apr 25, 2012, at 3:04 AM, Martin Costabel <email@hidden> wrote:
> On 25/04/12 10:28, Jeremy Huddleston wrote:
> []
>> The only reason I can think of for that happening is if *MATLAB* is doing something wrong with DYLD_ environment variables or if ncdump is not linked correctly. The output from otool -L above should help me figure that out if it's an issue in ncdump (which can then be fixed in MacPorts).
>
> MATLAB is indeed setting the DYLD_LIBRARY_PATH environment variable in the wrapper script that launches matlab. They need it because of sloppy linking of their dynamic libraries. Many of them have decent install_names, but many others don't (this is based on observation of Matlab-2008; perhaps newer versions are better behaved in this respect, but I doubt it.)
Yeah, netcdf from MacPorts looks fine. File a bug against Matlab to fix their linking.
You can fix it on your own machine. Just remove the DYLD_LIBRARY_PATH from their launch script and try launching. That should reveal what is broken in their linking. I don't know how many things need to be cleaned up, so it may be quite tedious.
As a local solution, you can try using a shell script to unset DYLD_LIBRARY_PATH and then call the real ncdump. I'd suggest placing them in ~/bin and make sure that this appears before /opt/local/bin in $PATH:
mkdir ${HOME}/bin
for f in nccopy ncdump ncgen ncgen3 ; do
cat > ${HOME}/bin/${f} <<EOF
#!/bin/sh
unset DYLD_LIBRARY_PATH
exec /opt/local/bin/${f} "\${@}"
EOF
chmod 755 ${HOME}/bin/${f}
done
Then try launching matlab:
PATH=${HOME}/bin:${PATH} matlab
> A better advice of how to fix this in your ~/.tcshrc would be to write
>
> unsetenv DYLD_LIBRARY_PATH
That won't solve the problem if netcdf is exec'd from MatLab directly as opposed to a tcsh script.
--Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden