technomancy / grenchman

Sorry about the name
GNU General Public License v3.0
217 stars 8 forks source link

Needed libraries not found from OSX binary #21

Closed hickst closed 10 years ago

hickst commented 10 years ago

Download and run of OSX binary on 10.8.5 produces dynamic link error:

grench dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib Referenced from: /usr/local/bin/grench Reason: image not found Trace/BPT trap

Note there is no /usr/local/opt directory on my system (default installation)

uname -a Darwin twelf 12.5.0 Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-2050.48.11~1/RELEASE_X86_64 x86_64

otool -L grench grench: /usr/local/opt/libffi/lib/libffi.6.dylib (compatibility version 7.0.0, current version 7.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)

mdfind -name libffi /System/Library/Tcl/8.5/Ffidl0.6.1/libFfidl0.6.1.dylib /System/Library/Tcl/8.4/Ffidl0.6.1/libFfidl0.6.1.dylib /usr/lib/libffi.dylib # appears to be version 1.0.0

shishkin commented 10 years ago

Had same problem. Reinstalling/upgrading libffi with homebrew helped.

borkdude commented 10 years ago

Same problem here. brew install libffi also fixed it for me.

hickst commented 10 years ago

I tried installing libffi with MacPorts but this alone did not solve the issue. MacPorts installed libffi to a different (IMHO very reasonable) location: /opt/local/lib. I had to create the /usr/local/opt/libffi/lib directories which Grench expects and create a symbolic link from there to the MacPorts installation location:

mkdir -p /opt/local/libffi/lib cd /opt/local/libffi/lib ln -s /opt/local/lib/libffi.6.dylib .

This allows grench to start.

xpe commented 10 years ago

Thanks. brew install libffi solved the problem for me too. Isn't this worth mentioning on the download page?

technomancy commented 10 years ago

It does say on the site that libffi is required.

technomancy commented 10 years ago

Not sure I understand. It mentions libffi (and readline) in the "Download" section of that page.

suculent commented 9 years ago

I'm aware of total mess inside my computer, that caused this... using homebrew and macports together, I've caused this situation by uninstalling macports (I thought I won't need it anymore).

Fixed using macports:

$ sudo port install libffi
ypapax commented 5 years ago

brew reinstall libffi helped me