[MacPorts] #25842: ddd DYLD_LIBRARY_PATH conflict

MacPorts noreply at macports.org
Wed Jul 28 04:14:47 PDT 2010


#25842: ddd DYLD_LIBRARY_PATH conflict
--------------------------------+-------------------------------------------
 Reporter:  s.t.smith@…         |       Owner:  macports-tickets@…                   
     Type:  defect              |      Status:  new                                  
 Priority:  Normal              |   Milestone:                                       
Component:  ports               |     Version:  1.9.1                                
 Keywords:                      |        Port:  ddd                                  
--------------------------------+-------------------------------------------
 The latest version of ddd [GNU DDD 3.3.12 (i386-apple-darwin10.3.0)]
 appears to have a conflict with other applications that use the
 DYLD_LIBRARY_PATH environment variable, especially Matlab.  This results
 in a conflict over finding the correct libpng12.0.dylib dynamic library.

 Here's a few commands that illustrate the issue:

 '''This works:'''


 {{{
 % unsetenv DYLD_LIBRARY_PATH
 % ddd
 /Applications/MATLAB_R2010a.app/bin/maci64/MATLAB.app/Contents/MacOS/MATLAB
 }}}

 '''This doesn't work:'''


 {{{
 % setenv DYLD_LIBRARY_PATH
 /Applications/MATLAB_R2010a.app/sys/os/maci64:/Applications/MATLAB_R2010a.app/bin/maci64/MATLAB.app/Contents/MacOS:/opt/local/lib
 % ddd
 /Applications/MATLAB_R2010a.app/bin/maci64/MATLAB.app/Contents/MacOS/MATLAB
 dyld: Library not loaded: /opt/local/lib/libpng12.0.dylib
   Referenced from: /opt/local/bin/ddd
   Reason: Incompatible library version: ddd requires version 44.0.0 or
 later, but libpng12.0.dylib provides version 40.0.0
 Trace/BPT trap
 }}}

 (This an abbreviated DYLD_LIBRARY_PATH set by Matlab before it starts,
 with /opt/local/lib appended to the end.)

 Also FYI, Matlab's libpng12.0 has an old version (40.0.0):

 {{{
 % otool -L /Applications/MATLAB_R2010a.app/bin/maci64/libpng12.0.dylib
 /Applications/MATLAB_R2010a.app/bin/maci64/libpng12.0.dylib:
     @loader_path/libpng12.0.dylib (compatibility version 40.0.0, current
 version 40.0.0)
     /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
 1.2.3)
     /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 111.0.0)
 }}}


 Macport's libpng12.0.dylib has the latest version (45.0.0):

 {{{
 % otool -L /opt/local/lib/libpng12.0.dylib
 /opt/local/lib/libpng12.0.dylib:
     /opt/local/lib/libpng12.0.dylib (compatibility version 45.0.0, current
 version 45.0.0)
     /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current
 version 1.2.5)
     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 125.2.0)
 }}}

 I looked in the ddd executable and it points to the dynamic library
 /opt/local/lib/libpng12.0.dylib explicitly.

 Why should setting DYLD_LIBRARY_PATH cause ddd to fail?  How does one
 deconflict ddd so that it works with applications like Matlab that use
 DYLD_LIBRARY_PATH?

-- 
Ticket URL: <http://trac.macports.org/ticket/25842>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list