From 6de57aa59adde2eb1bdb969c0be8e169b1cf2d87 Mon Sep 17 00:00:00 2001 From: Hans Fugal Date: Mon, 5 Jan 2015 16:21:50 -0800 Subject: [PATCH] (folly) osx bootstrap script MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Summary: This is a bootstrap script for building folly on osx. I attempted to make it Just Work™ for anyone who uses Homebrew (http://brew.sh/) but even if it doesn't work out of the box it should be instructive for the motivated developer on OSX. Facebook: In #5134151 Wangle used to not build, because something was using a futex. But that seems to have been rectified (or the build problems are hiding in headers that aren't used in the libfolly build). I'll also update https://our.intern.facebook.com/intern/wiki/Folly/BuildingOnMac to point people to this script instead. Test Plan: Tested on my laptop which is running Yosemite (10.10.1) Build, then inspect `otool -L .libs/*dylib` Reviewed By: davejwatson@fb.com Subscribers: folly-diffs@, exa FB internal diff: D1765248 Tasks: 5134151 Signature: t1:1765248:1420500905:bc5da97a0446f502cb2badc85c9004ff0a62027a --- README | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README b/README index 496f2af6..9fdbd32d 100644 --- a/README +++ b/README @@ -62,24 +62,28 @@ In the folly directory, run make check sudo make install +OS X +---- +There is a bootstrap script if you use Homebrew (http://brew.sh/). At the time +of writing (OS X Yosemite 10.10.1) the default compiler (clang) has some +issues building, but gcc 4.9.2 from Homebrew works fine. (This is taken care +of by the bootstrap script.) + + cd folly + ./bootstrap-osx-homebrew.sh + make + make check Other Linux distributions ------------------------- - double-conversion (http://code.google.com/p/double-conversion/) - By default, the build tooling for double-conversion does not build - any libraries, which folly requires. To build the necessary libraries - copy folly/SConstruct.double-conversion to your double-conversion - source directory before building: - - [double-conversion/] scons -f SConstruct.double-conversion + Download and build double-conversion. + You may need to tell configure where to find it. - Then set CPPFLAGS/LDFLAGS so that folly can find your double-conversion - build: + ./configure LDFLAGS=-L$DOUBLE_CONVERISON_HOME/ CPPFLAGS=-I$DOUBLE_CONVERISON_HOME/src/ - [folly/] LDFLAGS=-L/ CPPFLAGS=-I/src/ - configure ... - additional platform specific dependencies: -- 2.34.1