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

Similar Threads
thread Thread Starter Forum Replies Last Post
Need help compiling c files Paulie87 Mac Programming 27 Mar 11, 2014 08:00 PM
Compiling for Powerpc, how to? skinniezinho PowerPC Macs 12 Jun 21, 2013 04:10 AM
Cross compiling DenBeke Mac Programming 8 May 18, 2013 02:08 AM
Compiling SendMail program - Need Help papo2 OS X 10.8 Mountain Lion 0 Mar 29, 2013 02:56 PM
C++ compiling issues Marcus89 Mac Programming 2 Sep 20, 2012 08:24 AM

Forum Jump

All times are GMT -5. The time now is 05:19 AM.

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

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