Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 7, 2013, 02:25 AM   #1
Crazy
macrumors newbie
 
Join Date: Dec 2008
Compiling encfs with static libs

Hi,

I need some help with getting encfs compiled from source.

I'm currently on MacOS 10.8, I was able to install all prerequisites and encfs compiles.

The thing is, I'd like to have it more portable by having the encfs and the libs it depends on in a directory inside my app.

What I currently do to build it is just run:

Code:
svn checkout http://encfs.googlecode.com/svn/trunk/ encfs-read-only
cd encfs-read-only
 ./configure
make

mkdir /tmp/encfs
cp encfs/encfs /tmp/encfs
cp /usr/local/lib/libglog.0.dylib /tmp/encfs/
cp /opt/local/lib/libbotan-1.8.13.dylib /tmp/encfs
cp /usr/local/lib/libprotobuf.8.dylib /tmp/encfs
cp /opt/local/lib/libcrypto.1.0.0.dylib /tmp/ecfs
That's everything I need to run encfs(I install osxfuse manually), but if I compile it like this, it doesn't find the dylib's when I place them in the encfs executable directory, I need to copy them to /usr/local/lib/.

I tried running the configure command with --enable-static but then it doesn't run at all.
Quote:
encfs-read-only user$ chmod +x ./configure --enable-static --disable-shared
chmod: --enable-static: No such file or directory
chmod: --disable-shared: No such file or directory
I used to have a very old version where it worked. Any idea's on how I can get it to work like that again?


* EDIT *
I found out how it was done for the old encfs version, seems like we used 'install_name_tool' to change the location of the dylibs

Code:
encfs user$ otool -L encfs 
encfs:
	/usr/local/lib/libglog.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/lib/libosxfuse_i64.2.dylib (compatibility version 10.0.0, current version 10.3.0)
	/opt/local/lib/libbotan-1.8.13.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/lib/libprotobuf.8.dylib (compatibility version 9.0.0, current version 9.0.0)
	/opt/local/lib/libtinyxml.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

encfs user$ install_name_tool -change /usr/local/lib/libglog.0.dylib @executable_path/libglog.0.dylib encfs
encfs user$ install_name_tool -change /opt/local/lib/libbotan-1.8.13.dylib @executable_path/libbotan-1.8.13.dylib encfs
encfs user$ install_name_tool -change /usr/local/lib/libprotobuf.8.dylib @executable_path/libprotobuf.8.dylib encfs
encfs user$ install_name_tool -change /opt/local/lib/libtinyxml.dylib @executable_path/libtinyxml.dylib encfs
encfs user$ install_name_tool -change /opt/local/lib/libcrypto.1.0.0.dylib @executable_path/libcrypto.1.0.0.dylib libbotan-1.8.13.dylib

Last edited by Crazy; May 7, 2013 at 03:13 AM.
Crazy is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:05 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC