[MacPorts] #36621: __cg_jpeg_resync_to_restart error on system open and edit commands
#36621: __cg_jpeg_resync_to_restart error on system open and edit commands ------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Keywords: | Port: ------------------------------+-------------------------------- I am getting this error when trying to open a Finder Application window in the current working directory from the terminal after putting {{{/opt/local/lib}}} on the library path: {{{ $ open . $ export DYLD_LIBRARY_PATH=/opt/local/lib $ open . dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /opt/local/lib/libJPEG.dylib in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO Trace/BPT trap: 5 }}} I have an astronomy library and command line tools that add {{{/opt/local/lib}}} to {{{DYLD_LIBRARY_PATH}}} in a setup script because it uses {{{/opt/local/lib/libcfitsio.dylib}}} . The problem (if I understand correctly) is that now {{{/opt/local/lib/libJPEG.dylib}}} shadows {{{/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib}}} and some system commands like {{{open DIR}}} or {{{edit FILE}}} give the error shown. Is this a Macports bug? If not, what is the correct alternative to setting {{{DYLD_LIBRARY_PATH=/opt/local/lib}}} for (non-Macports) libraries and command line tools that require Macports libraries to load? Thanks for your help! -- Ticket URL: <https://trac.macports.org/ticket/36621> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36621: __cg_jpeg_resync_to_restart error on system open and edit commands -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: invalid | Keywords: Port: | -------------------------------+-------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => invalid Comment: It's an error to set the DYLD_LIBRARY_PATH environment variable because it will cause problems like this. Any program that recommends you set this, or sets it itself, is built incorrectly and should be fixed. If that's not an option, usually the DYLD_FALLBACK_LIBRARY_PATH environment variable is a safer one to set. In this specific case the fact that OS X's default filesystem is case- insensitive contributed to the problem. (The library the jpeg MacPorts port installs is libjpeg.dylib; the system library is libJPEG.dylib.) However, installing OS X on a case-sensitive filesystem usually comes with its own set of problems and I don't recommend it. -- Ticket URL: <https://trac.macports.org/ticket/36621#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36621: __cg_jpeg_resync_to_restart error on system open and edit commands -------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.1.2 Resolution: invalid | Keywords: Port: | -------------------------------+-------------------------------- Comment (by Deil.Christoph@…): Thanks for explaining! I have a follow-up question, if you have a short suggestion or link with further info to share, that would be very much appreciated. The library in question is [http://gammalib.sourceforge.net gammalib] and there is a set of command line tools [http://cta.irap.omp.eu/ctools/ ctools] built using gammalib. Both are C++ autotools projects with swig python bindings. I am a co-author and want to fix this issue and then add gammalib and ctools to Macports soon. Can you give a suggestion what to do instead of setting DYLD_LIBRARY_PATH in a gammalib-init.sh the user executes before using the library / tools? Should all references to libraries in /opt/local/lib like cfitsio and readline be set as absolute references when building or installing gammalib and ctools? How do we do and check this? -- Ticket URL: <https://trac.macports.org/ticket/36621#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts