Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.97k stars 11.35k forks source link

encfs compiles and links, but will not run; can't find boost libraries. #934

Closed jyurek closed 14 years ago

jyurek commented 14 years ago

I'm trying to make a formula for installing encfs. I've gotten as far as getting it to compile, but it fails to run because it can't find the boost libraries.

0 Birdhouse:~ jyurek$ brew info boost
boost 1.41.0
http://www.boost.org
/Users/jyurek/.homebrew/Cellar/boost/1.41.0 (7095 files, 176M)
http://github.com/mxcl/homebrew/commits//Library/Formula/boost.rb
0 Birdhouse:~ jyurek$ brew list boost
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/include/boost/ (7051 files)
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_date_time-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_filesystem-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_graph-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_iostreams-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_math_c99-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_math_c99f-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_math_c99l-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_math_tr1-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_math_tr1f-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_math_tr1l-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_prg_exec_monitor-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_program_options-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_python-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_regex-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_serialization-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_signals-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_system-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_thread-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_unit_test_framework-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_wave-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/libboost_wserialization-mt.dylib
/Users/jyurek/.homebrew/Cellar/boost/1.41.0/lib/ (22 other files)
0 Birdhouse:~ jyurek$ brew install encfs
==> Downloading http://encfs.googlecode.com/files/encfs-1.5-2.tgz
File already downloaded and cached to /Users/jyurek/Library/Caches/Homebrew
==> ./configure --prefix=/Users/jyurek/.homebrew/Cellar/encfs/1.5-2 --with-boost=/Users/jyurek/.homebrew --disable-debug --disable-dependency-tracking
==> make install
/Users/jyurek/.homebrew/Cellar/encfs/1.5-2: 64 files, 1.5M, built in 34 seconds
0 Birdhouse:~ jyurek$ encfs
dyld: Library not loaded: libboost_serialization-mt.dylib
  Referenced from: /Users/jyurek/.homebrew/bin/encfs
  Reason: image not found
Trace/BPT trap
133 Birdhouse:~ jyurek$ 

I really don't know why it wouldn't find boost when everything else is found:

0 Birdhouse:~/.homebrew/Library/Homebrew jyurek (master)$ otool -L `which encfs`
/Users/jyurek/.homebrew/bin/encfs:
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.13.0)
    /Users/jyurek/.homebrew/Cellar/encfs/1.5-2/lib/libencfs.4.dylib (compatibility version 6.0.0, current version 6.0.0)
    /Users/jyurek/.homebrew/Cellar/rlog/1.4/lib/librlog.5.dylib (compatibility version 6.0.0, current version 6.0.0)
    /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
    /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/local/lib/libfuse.2.dylib (compatibility version 10.0.0, current version 10.7.3)
    libboost_serialization-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
    libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
    /Users/jyurek/.homebrew/Cellar/gettext/0.17/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.2.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)

Any ideas what I can do to get it to be found?

cehoffman commented 14 years ago

It has to do with how the lib is installed and the fact you have homebrew in a nonstandard location, e.g. not /usr/local.

Look at issue 640 and my first comment. My formula for boost corrects that problem.

jyurek commented 14 years ago

Oh nice, I'll give that a try. Thanks.

jyurek commented 14 years ago

Thanks for linking that! My encfs now runs properly. Though, I'm not sure if this ticket should be closed until that boost formula is in master, since my formula won't work for nonstandard installs until it is.

adamv commented 14 years ago

The boost change was pulled; can we get a link to the commit for encfs?

jyurek commented 14 years ago

I never sent a request because, while it compiled and linked, it never actually ran correctly (sorry, that was premature in my previous comment). I suspected this was because of MacFuse, but I was unable to get that to compile manually for its own formula. I've since been unable to continue work on it.

adamv commented 14 years ago

Ok, fair enough. I'm going to close this since the boost issue was resolved; if you do get time to get a brew working, open an new issue and we'll merge it. Thanks.

mathiasson commented 13 years ago

Since this issue is still not resolved, at least not when using the boost "bottle" (which seems to be default), a quick fix:

$ for x in /opt/homebrew/lib/libboost_*.dylib; do sudo ln -s $x /usr/local/lib; done

assuming homebrew is installed in /opt/homebrew.