Skip to content

Instantly share code, notes, and snippets.

@encounter
Created March 4, 2018 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save encounter/b0c028ca907a170ec45590183993846a to your computer and use it in GitHub Desktop.
Save encounter/b0c028ca907a170ec45590183993846a to your computer and use it in GitHub Desktop.
macOS futurerestore build
brew install openssl
export PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig
git clone https://github.com/encounter/libplist.git
cd libplist
./autogen.sh
make install
cd ..
git clone https://github.com/libimobiledevice/libusbmuxd.git
cd libusbmuxd
./autogen.sh
make install
cd ..
git clone https://github.com/encounter/libimobiledevice.git
cd libimobiledevice
./autogen.sh --without-cython
make install
cd ..
git clone https://github.com/libimobiledevice/usbmuxd.git
cd usbmuxd
./autogen.sh
make install
cd ..
git clone https://github.com/encounter/libirecovery.git
cd libirecovery
./autogen.sh
make install
cd ..
# --recursive is important!
git clone https://github.com/encounter/futurerestore.git --recursive
cd futurerestore
# building for testing/debugging... binary is futurerestore/futurerestore
./autogen.sh
make
# building for release (static link almost all libs)
LDFLAGS=-all-static ./autogen.sh
make
# futurerestore/futurerestore is now a standalone mach-o binary,
# but libzip and openssl don't static link automatically
# see output of
# otool -L futurerestore/futurerestore
# and notice the /usr/local entries
# this can be fixed by copying the final link command and replacing
# -lzip -lssl -lcrypto
# with paths to static libs (.a) instead (eg. /usr/local/opt/openssl@1.1/lib/libssl.a)
# you can get a static libzip by compiling it manually with -DBUILD_SHARED_LIBS:BOOL=OFF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment