Skip to content

Instantly share code, notes, and snippets.

@jen20
Created March 10, 2014 11:19
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 jen20/9463288 to your computer and use it in GitHub Desktop.
Save jen20/9463288 to your computer and use it in GitHub Desktop.
Temporary build instructions for Event Store on OS X. Not complete or tested.
Note that this will ONLY work currently (10 March 2014) with the `dev` branch of Event Store as that has commits which fix the .csproj files to use dylibs instead of shared objects. Instructions are incomplete and untested, but there will be a working, tested script forthcoming soon!
1. Build a 64 bit mono from source (I'm on 3.8, the GC is broken in everything since 3.0.12 though (and that needs patching) but I guess if you're on OS X you're not talking production here). Assuming this is going in /opt/mono
2. Clone and build V8. Should be a simple case of:
- `make dependencies`
- `make x64.release library=shared`
- Copy the dylibs to `src/EventStore/libs/`
3. Build JS1:
- `cd EventStore/src/EventStore/EventStore.Projections.v8Integration`
- `clang-I ./src/EventStore/libs/include -L ./src/EventStore/libs *.cpp -o libjs1.so -arch x86_64 -lv8 -O2 -fPIC --shared --save-temps -std=c++0x`
- Copy the dylib to `src/EventStore/libs/`
2a and 3a. Fix all the dylib install names
- Almost certainly a better way to do this but for now this works:
- Set the IDs on all the dylibs using (e.g.) `install_name_tool -id @executable_path/libjs1.dylib libjs1.dylib`
- Change the paths for all dependencies on dylibs (you can find them using `otool -L dylibname`) using (e.g.):
- install_name_tool -change /usr/local/lib/libv8.dylib libv8.dylib libjs1.dylib
- install_name_tool -change /usr/local/lib/libicuuc.dylib libicuuc.dylib libicui18n.dylib
- install_name_tool -change /usr/local/lib/libicuuc.dylib libicuuc.dylib libv8.dylib
- install_name_tool -change /usr/local/lib/libicui18n.dylib libicui18n.dylib libv8.dylib
4. Build Event Store:
- `xbuild src/EventStore/EventStore.sln /p:Platform="Any CPU" /p:Configuration="Release"`
@peterneubauer
Copy link

@jen20
Copy link
Author

jen20 commented Mar 10, 2014

The "official" Event Store build uses the Subversion repo of it: http://v8.googlecode.com/svn/trunk, revision 18454

@jen20
Copy link
Author

jen20 commented Mar 10, 2014

Although we could have used git with --depth 1 and may do again in future to avoid a build dependency on svn.

@poohsen
Copy link

poohsen commented Mar 12, 2014

the clang command specifies libjs1.so as output but then you're supposed to copy a dylib. Am I missing sth. here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment