Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#25723 closed defect (invalid)

xfig-3.2.5 builds but run fails: Incompatible library version: libXpm.4.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0

Reported by: boris.blankleider@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), jeremyhu (Jeremy Huddleston Sequoia)
Port: xpm libiconv

Description (last modified by ryandesign (Ryan Carsten Schmidt))

On a freshly installed OSX 10.6.4, macports built xfig with no errors. However running xfig gives:

$ xfig
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/lib/libXpm.4.dylib
  Reason: Incompatible library version: libXpm.4.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap

Change History (7)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: ryandesign@… jeremyhu@… added
Port: xpm libiconv added

Please show the output of the following commands:

lipo -info /opt/local/lib/libXpm.4.dylib /opt/local/lib/libiconv.2.dylib
otool -L /opt/local/lib/libXpm.4.dylib /opt/local/lib/libiconv.2.dylib

Do you have any environment variables set whose names start with DYLD?

comment:2 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: invalid
Status: newclosed

Yeah, this sounds like a user setting DYLD_LIBRARY_PATH without understanding what that does because:

/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)

which is probably what it is finding... also MP's and OS X's libiconv are ABI incompatible.

Don't set DYLD_* environment variables. If you feel the need to, report the bug which is making you think you need to set it or you will run into additional problems like this.

comment:3 Changed 14 years ago by jmroot (Joshua Root)

This sort of thing can also happen when the referenced lib is the wrong arch, as dyld falls back to the one in /usr/lib which is then the wrong version (and the error message doesn't make it clear that that's what happened).

comment:4 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

While your statement about dyld's behavior is correct, the facts don't support that case. If iconv were installed -universal, xfig wouldn't've been able to link during build.

comment:5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:6 in reply to:  5 Changed 14 years ago by boris.blankleider@…

Based on your comments, I had a look inside .bashrc where I set environmental variables. I found this:

export DYLD_LIBRARY_PATH=/usr/lib:/usr/local/lib

I then changed this to

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib

and this fixed the problem and now xfig runs fine! Thank you very much for your help!

comment:7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, but you should rather remove the line entirely. Also, you should remove any software in /usr/local, as it will interfere with MacPorts-installed software sooner or later.

Note: See TracTickets for help on using tickets.