Building libstomp client on linux

| | Comments (0)
STOMP (Streaming text oriented messaging protocol) is a wonderful protocol to use as simple messaging for real time applications and is integrated in (for example) Apache MQ and Orbited. However, all their clients are for online languages (php, perl, ruby) and the client was built using Mac.

Don't get me wrong, I love my mac, but my servers run linux. Here is how you do it (from http://www.jboss.org/community/wiki/buildingblacktie?decorator=print)

The entire next section is based from above mentioned source, albeit altered to fit Debian:

INSTALL LIBSTOMP

  1. svn co -r 85 http://svn.codehaus.org/stomp/trunk/c libstomp

ON LINUX

In order to create the library for use with our Stomp transport on Linux you need to make a couple of alterations:

  1. apt-get install libapr1
  2. apt-get install libapr1-dev
  3. Download the attached stomp.c.patch to your home directory (their src, my mirror)
  4. cd libstomp
  5. Create the following file as build.sh
  6. #!/bin/bash
    OUT_DIR=target/debug/shared
    mkdir -p $OUT_DIR
    gcc -fPIC src/stomp.c -shared -o$OUT_DIR/libstomp.so -I. -I/usr/include/apr-1.0 -lapr-1

  7. patch -p0 -i ~/stomp.c.patch
  8. ./build.sh

I've taken the liberty to mirror the patches as well.

stomp.c.patch
stompconnect.patch

Leave a comment

About this Entry

This page contains a single entry by Niklas Bivald published on November 9, 2009 11:08 AM.

Maintaing Open Source Projects was the previous entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.21-en