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 00:40:52 -0700
On Apr 25, 2012, at 12:01 AM, Andrew Friedman <email@hidden> wrote:
> Hi X11 users,
>
> I'm having a problem where X11 fails to start since I changed my DYLD_LIBRARY_PATH in my .tcshrc ffile to include macports libraries:
> setenv DYLD_LIBRARY_PATH /opt/X11/lib:/opt/local/lib
Don't do that. Respond to whatever thread suggested that you do that, and tell them that this is not an acceptable solution. Please help get the word out. For some reason, someone out there started telling people that this was a good solution, but it only makes things much worse. I've seen so many bug reports which all boil down to someone using DYLD_LIBRARY_PATH because some forum told them it was the way to fix a bug. DYLD_LIBRARY_PATH is never the solution to any problem, it is only a mask of some bugs and the cause of many more.
The only people who should ever use DYLD_LIBRARY_PATH are people who really really really know what they are doing, and nobody should ever do it in a shipping product. There is really NO excuse for it. If your libraries have broken links, fix the build system, or use install_name_tool in a post-build phase to fix things up if need-be.
> --------------------------
> Application Specific Information:
> dyld: launch, loading dependent libraries
>
> Dyld Error Message:
> Symbol not found: __cg_jpeg_resync_to_restart
> Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
> Expected in: /opt/local/lib/libJPEG.dylib
> in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
> -------------------------
> I get the error with both X11 from Mac OS and the version from XQuartz 2.7.1. I'm running Mac OS 10.7.3. From previous forum entries, I understand that it's bad practice to set DYLD_LIBRARY_PATH.
Yes. That is because DYLD_LIBRARY_PATH is working correctly. It's is forcing ImagaIO to use the libJPEG from MacPorts instead of the one that it was designed to use.
> However, I haven't been able to find away around it for the research tools I am using: accessing netcdf libraries while running Matlab..
What error do you see if you DON'T use DYLD_LIBRARY_PATH? That will reveal the real issue that you need to fix.
> I'm wondering if there's a fix that would allow X11 to work.
You need to fix the real problem rather than trying to find workarounds for bugs introduced by your workarounds. If you can provide the original error message without DYLD_LIBRARY_PATH, I can probably help you fix the problem.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden