mathandboy / git-osx-installer

Automatically exported from code.google.com/p/git-osx-installer
0 stars 0 forks source link

Library not loaded: /usr/lib/libiconv.2.dylib #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the ppc leopard installer
2. Open a new Terminal
3. Type "git" and press enter

What is the expected output? What do you see instead?
  Expecting git usage instructions but getting:
dyld: Library not loaded: /usr/lib/libiconv.2.dylib
  Referenced from: /usr/local/git/bin/git
  Reason: Incompatible library version: git requires version 7.0.0 or 
later, but libiconv.2.dylib provides version 5.0.0
Trace/BPT trap

What version of the product are you using? On what operating system?
  Git-1.5.4.5-osx-leopard-ppc.mpkg on iBook G4 Leopard 10.4.11

Original issue reported on code.google.com by alevc...@gmail.com on 12 Sep 2008 at 11:45

GoogleCodeExporter commented 8 years ago
hmmm... isn't 10.4.11 Tiger, not leopard?

Original comment by timchar...@gmail.com on 13 Sep 2008 at 2:54

GoogleCodeExporter commented 8 years ago
I have the same problem "Reason: Incompatible library version: git requires 
version
7.0.0 or later", I use Tiger 10.4.11 and I tried to install
Git-1.5.4.5-osx-leopard-ppc.mpkg version package.

How can I solve this problem?

Original comment by ripcorp on 30 Mar 2009 at 6:21

GoogleCodeExporter commented 8 years ago
I have the same problem.

Some additional information that may or may not be useful.
$ otool -L /usr/lib/libiconv.2.dylib
/usr/lib/libiconv.2.dylib:
        /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.5)

So this is the library that git is having problems with.

Yet if I do this:
$ otool -L /usr/local/lib/libiconv.2.dylib
/usr/local/lib/libiconv.2.dylib:
        /usr/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version
8.0.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 93.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)

You can see libiconv is version 8.0.0, well within git requirements. 

How do I force git to use this /usr/local/lib version, not the /usr/lib version?

Thanks very much, looking forward to using git.

Alex

Original comment by awgandr...@gmail.com on 24 May 2009 at 6:00

GoogleCodeExporter commented 8 years ago
Tried to just shift the files about.

Albert-2:/usr/lib root# mv libiconv.2.dylib libiconv.2.dylib.correct
Albert-2:/usr/lib root# cp /usr/local/lib/libiconv.2.dylib .
Albert-2:/usr/lib root# exit
exit
Albert-2:/usr/lib music$ git
Bus error
Albert-2:/usr/lib music$ 

Alex

Original comment by awgandr...@gmail.com on 24 May 2009 at 6:15

GoogleCodeExporter commented 8 years ago
I get this same issue! OSX tiger. Googling reveals sweet fa...

Original comment by keithsal...@gmail.com on 3 Jun 2009 at 11:03

GoogleCodeExporter commented 8 years ago
I managed to resolve this by removing the system libiconv:

$ rm /usr/lib/libiconv*

Then install the source, using
$ cd /usr/local/src/
$ sudo curl -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz
$ sudo tar zxvf libiconv-1.13.tar.gz 
$ sudo ./configure
$ sudo make
$ sudo make install

Job done....

Original comment by keithsal...@gmail.com on 3 Jun 2009 at 11:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Found out that it wasn't a problem running git as root.

I had this in my personal .profile:
export DYLD_LIBRARY_PATH=/usr/lib
export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:/sw/lib

Hashed it out and everything was fine..
Don't remember why I put it in there in the first place.. :-/

Original comment by roger.st...@gmail.com on 25 Oct 2009 at 12:37

GoogleCodeExporter commented 8 years ago
In case anyone else comes along and finds this thread, don't rm libiconv from 
/usr/lib, it will break terminal.

Original comment by rha...@gmail.com on 21 Sep 2010 at 4:57

GoogleCodeExporter commented 8 years ago
Same problem...

Original comment by erwan.al...@gmail.com on 25 Nov 2010 at 7:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
On Snow Leopard, you've to compile libciconv with 3 architectures (not just 
x86_64):

$ mkdir /src
$ mkdir /src/libiconv && cd /src/libiconv
$ curl http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz -O
$ tar -xzvf libiconv-1.13.1.tar.gz
$ cd libiconv-1.13.1
$ MACOSX_DEPLOYMENT_TARGET=10.6 
$ CFLAGS="-arch ppc -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" 
$ CCFLAGS="-arch ppc -arch i386 -arch x86_64 -g -Os -pipe" 
$ CXXFLAGS="-arch ppc -arch i386 -arch x86_64 -g -Os -pipe" 
$ LDFLAGS="-arch ppc -arch i386 -arch x86_64 -bind_at_load" 
$ export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
$ ./configure --prefix=/usr --enable-static --enable-extra-encodings
$ make && sudo make install

hope that helped

Original comment by mik...@gmail.com on 8 Mar 2011 at 10:16

GoogleCodeExporter commented 8 years ago
worked for me, thanks!

Original comment by stow...@gmail.com on 9 May 2011 at 3:18

GoogleCodeExporter commented 8 years ago
I definitely don't know what you guys have all done to have a non universal 
libiconv... I have installed the git installer on many fresh snow leopard 
installs and it works.  My current machine was installed fresh 1 week ago.  My 
libiconv is universal.

$ file /usr/lib/libiconv.2.dylib 
/usr/lib/libiconv.2.dylib: Mach-O universal binary with 3 architectures
/usr/lib/libiconv.2.dylib (for architecture x86_64):    Mach-O 64-bit 
dynamically linked shared library x86_64
/usr/lib/libiconv.2.dylib (for architecture i386):      Mach-O dynamically 
linked shared library i386
/usr/lib/libiconv.2.dylib (for architecture ppc7400):   Mach-O dynamically 
linked shared library ppc

Anyways, thanks mikseg for the help for the rest, I'll add it to the faq.

Original comment by timchar...@gmail.com on 9 May 2011 at 3:23

GoogleCodeExporter commented 8 years ago
Since doing this...my VLC has stopped working...

Process:         VLC [3786]
Path:            /Applications/VLC.app/Contents/MacOS/VLC
Identifier:      org.videolan.vlc
Version:         1.1.9 (1.1.9)
Code Type:       X86 (Native)
Parent Process:  launchd [115]

Date/Time:       2011-05-10 20:35:08.324 -0500
OS Version:      Mac OS X 10.6.6 (10J567)
Report Version:  6

Interval Since Last Report:          489534 sec
Crashes Since Last Report:           1254
Per-App Interval Since Last Report:  186516 sec
Per-App Crashes Since Last Report:   12
Anonymous UUID:                      3EBB7961-BE19-40B5-BA79-F0B342427915

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Dyld Error Message:
  Symbol not found: _iconv_open
  Referenced from: /Applications/VLC.app/Contents/MacOS/lib/libvlccore.4.dylib
  Expected in: /usr/lib/libiconv.2.dylib

Original comment by stow...@gmail.com on 11 May 2011 at 1:34

GoogleCodeExporter commented 8 years ago
My libiconv is universal.

$ file /usr/lib/libiconv.2.dylib 
/usr/lib/libiconv.2.dylib: Mach-O universal binary with 3 architectures
/usr/lib/libiconv.2.dylib (for architecture x86_64):    Mach-O 64-bit 
dynamically linked shared library x86_64
/usr/lib/libiconv.2.dylib (for architecture i386):      Mach-O dynamically 
linked shared library i386
/usr/lib/libiconv.2.dylib (for architecture ppc7400):   Mach-O dynamically 
linked shared library ppc

yet any application, VLC, DoubleTwist, etc. that uses it now crashes.  Can 
someone please assist me w/ this?  Is there any way to undo what I did when I 
followed mik...@gmail.com's instructions?

Original comment by stow...@gmail.com on 14 May 2011 at 12:54

GoogleCodeExporter commented 8 years ago
For those who have problems updating original libiconv.2.dylib
Here is the original file from Snow Leopard installation. Copy it to /usr/lib 
Remember: Don't mess with the system files, unless you know what you are doing. 
Otherwise things can go ugly.

Original comment by mik...@gmail.com on 14 May 2011 at 6:36

Attachments:

GoogleCodeExporter commented 8 years ago
thanks, back to normal.  I'm not sure what went wrong previously however..I 
followed your steps verbatim

Original comment by stow...@gmail.com on 14 May 2011 at 3:17

GoogleCodeExporter commented 8 years ago
Well, actually it's more likely nothing went wrong... The main reason for these 
crashes is because the version of libiconv i used as an example in my previous 
comment is newer than the native one that comes with Snow Leopard. Again, as i 
said, if you dont have any reason to mess with system files then don't.

Original comment by mik...@gmail.com on 14 May 2011 at 3:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
wget
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/wget
  Reason: Incompatible library version: wget requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
 what is thae mean?

Original comment by day...@gmail.com on 4 Aug 2011 at 8:27

GoogleCodeExporter commented 8 years ago
This is what was done to fix my problem

Seths-MacBook-Pro:lib squaning$ sudo !mv
sudo mv libiconv.2.dylib libiconv.2.dylib.bak
Password:
Seths-MacBook-Pro:lib squaning$ cp 
/opt/local_2_00/in_case_i_do_something_wrong/lib/libiconv.2.dylib .
cp: ./libiconv.2.dylib: Permission denied
Seths-MacBook-Pro:lib squaning$ sudo !!
sudo cp /opt/local_2_00/in_case_i_do_something_wrong/lib/libiconv.2.dylib .

Original comment by sethquan...@gmail.com on 13 Apr 2012 at 7:04

GoogleCodeExporter commented 8 years ago
Do NOT rm or mv any file, use it:
$ vi ~/.bashrc

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

DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:/usr/lib
export DYLD_FALLBACK_LIBRARY_PATH

Original comment by hy0kle on 26 Jul 2013 at 4:18