Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Build Instructions

Michael Schwartz edited this page · 34 revisions

Building SilkJS

NOTE: These instructions are somewhat obsolete, but may contain information you might find useful anyway.

See the installation instructions at http://silkjs.net

Currently SilkJS builds on Ubuntu/Linux and Mac OSX. Building for Ubuntu is rather straightforward, thanks to the apt package management system. Building for OSX is a bit more complicated as certain libraries SilkJS links against must also be built.

NOTE: Some systems are configured for IPv6 in their /etc/hosts files (Mac OSX for one). To run the ab tests, you will need to use http://127.0.0.1:9090/(whatever) instead of http://localhost:9090/(whatever)

If you have feedback on the build process or these instructions, please email me at mykesx@gmail.com or post to the SilkJS google group.

Building for Ubuntu

These instructions are for Ubuntu Oneiric, though they will work for other versions of Ubuntu as well. I like to build my C/C++ projects in my ~mschwartz/src directory. Feel free to adapt these instructions to suit your preferences.

The following prerequisites must be installed before building SilkJS:

  1. sudo apt-get install build-essential subversion git libmm-dev libmysqlclient-dev libgd2-xpm-dev libncurses5-dev libssl-dev libsqlite3-dev libcurl4-openssl-dev libssh2-1-dev libdb4.7-dev libglib2.0-dev libmemcached-dev libedit-dev ftplib-dev libcairo2-dev
  2. sudo apt-get install apache2-utils

The apache2-util package installs the ab program, which can be used to benchmark SilkJS and other HTTP servers.

  1. mkdir src
  2. cd src
  3. git clone https://github.com/mschwartz/SilkJS.git SilkJS

SilkJS should now build:

  1. make

To see it works:

  1. ./silkjs httpd/main.js
  2. ab -t 30 -c 50 -k http://localhost:9090/anchor.png

Building for OSX

Building for OSX is much more complicated, and there may be some issues with the new gyp build system that prevent SilkJS from being built for OSX using gyp.

According to the gyp build instructions page (for v8): "trying to build x64 targets on Mac currently fails."

That said...

Prerequisites

  1. Install Xcode from the App Store. It's free.
  2. Install the command line binary version of SubVersion from this page: http://www.wandisco.com/subversion/download#osx
  3. Make sure to edit your ~/.profile to include this line at the end: export PATH=/opt/subversion/bin:$PATH
  4. Close and open your shell window again.

In the new shell window:

  1. mkdir src
  2. cd src
  3. download scons-2.1.0.tar.gz from http://scons.org to your ~/src directory
  4. tar xzvfp scons-2.1.0.tar.gz
  5. cd scons-2.1.0
  6. sudo python setup.py install
  7. git clone https://github.com/mschwartz/SilkJS.git SilkJS

SilkJS should now build:

  1. make

To see it works:

  1. ./silkjs httpd/main.js
  2. point your browser at http://localhost:9090/
Something went wrong with that request. Please try again.