timdoug's interesting tidbits

Little bits of technical documentation and such. Hopefully helpful.

2019-06-10

Compiling EncFS on macOS Mojave 10.14 with static OpenSSL

Probably works on older versions, too.

  1. Install FUSE for macOS.
  2. brew install cmake
  3. curl -LO 'https://www.openssl.org/source/openssl-1.1.1c.tar.gz'
  4. tar xf openssl-1.1.1c.tar.gz && cd openssl-1.1.1c && ./config no-shared --prefix=/Users/$(whoami)/openssl && make install && cd ..
  5. git clone https://github.com/vgough/encfs.git && cd encfs && mkdir build && cd build
  6. cmake .. -DFUSE_INCLUDE_DIR=/usr/local/include/osxfuse/ -DFUSE_LIBRARIES=/usr/local/lib/libosxfuse.dylib -DOPENSSL_ROOT_DIR=/Users/$(whoami)/openssl/ -OPENSSL_USE_STATIC_LIBS=TRUE -DENABLE_NLS=OFF
  7. make -j4
The binary will be in the build directory:
$ otool -L encfs
encfs:
	/usr/local/lib/libosxfuse.2.dylib (compatibility version 12.0.0, current version 12.7.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
$

[/osx] permanent link


© 2006-18 timdoug | email: "me" at this domain
So necessary