Skip to content

Instantly share code, notes, and snippets.

@dalssoft
Last active November 2, 2016 06:11
Show Gist options
  • Save dalssoft/5595688 to your computer and use it in GitHub Desktop.
Save dalssoft/5595688 to your computer and use it in GitHub Desktop.
Build and Install Node.js on a OmniOS Vagrant box

Pre-install info:

Vagrant Boxes:

http://omnios.omniti.com/media/omnios-latest.box

Install

pkg install \
developer/gcc46 \
developer/object-file \
developer/linker \
developer/library/lint \
developer/build/gnu-make \
system/header \
system/library/math/header-math   
  • Fix gcc / gnu binutils paths
ln -s /opt/gcc-4.6.3/bin/gcc /bin/cc
ln -s /opt/gcc-4.6.3/bin/g++ /bin/g++
ln -s /usr/gnu/i386-pc-solaris2.11/bin/objdump /bin/objdump 
  • Install Git
sudo pkg install pkg://omnios/developer/versioning/git
  • Clone and build Node.js

  • use gmake instead of make

git clone https://github.com/joyent/node.git
cd node
git checkout v0.10.5 #Try checking nodejs.org for what the stable version is
./configure --with-dtrace --dest-cpu=x64
gmake  CXXFLAGS+="-ffunction-sections -fdata-sections"
sudo gmake install
  • Fix node path
sudo ln -s /usr/local/bin/node /bin/node
sudo ln -s /usr/local/bin/npm /bin/npm
@bdunavant
Copy link

Thanks for putting this up here. It was useful to me. However, on newer versions ( > 11.8 ) this will fail as described in nodejs/node-v0.x-archive#6439

As a workaround for now (and sort of described in the issue) I was able to just edit the configure script to always set node_use_mdb to false.

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