Delivery-focussed Elixir, Python, XSL/XQuery, (No)SQL, and Agile consultancy, specialising in content migration, API design, and (micro)services.

LinkedIn Octocat RSS

Installing Thrift on OpenSolaris

Installing Thrift on OpenSolaris is a bit of a nightmare. Following the standard install instructions, albeit with some tweaks, will get you nowhere on the OpenSolaris platform. There are many, many obstacles to overcome, and if you’re coming from a unix background it can be a struggle.

Thankfully, others have happened across the same problems. The HyperTable project, a very admirable NoSQL database, have made available a version of thrift which has been tweaked to run on OpenSolaris. Using this, and a take on their installation script, we can get a working version of thrift.

Here’s a script with all the commands to get you started:


# Common Packages
pkg install SUNWgcc
pkg install SUNWgmake
pkg install SUNWcmake
pkg install SUNWlibevent
pkg install java-dev

cd /usr/src
wget -O- | tar zx
mv slf4j-1.5.11 /usr/share/lib/slf4j

# Apache Commons
cd /usr/src
mkdir /usr/share/lib/apache-commons
wget -O- | tar zx
mv commons-lang-2.5/ /usr/share/lib/apache-commons/lang

# Boost
cd /usr/src
wget -O- | tar jx
cd boost_1_40_0
./ --with-libraries=filesystem,iostreams,program_options,system,thread,graph
./bjam install

# Thrift
cd /usr/src
wget wget -O- | tar zx
cd thrift
export CLASSPATH=.:/usr/share/lib/slf4j/slf4j-api-1.5.11.jar:/usr/share/lib/slf4j/slf4j-simple-1.5.11.jar:/usr/share/lib/slf4j/log4j-over-slf4j-1.5.11.jar:/usr/share/lib/slf4j/slf4j-ext-1.5.11.jar:/usr/share/lib/slf4j/slf4j-migrator-1.5.11.jar:/usr/share/lib/apache-commons/lang/commons-lang-2.5.jar
./configure --prefix=/usr CPPFLAGS='-D__BYTE_ORDER=__BIG_ENDIAN -DAF_LOCAL=AF_UNIX' LIBS='-lsocket'

Originally posted: Mar 25 2013