Thursday, December 22, 2011

compiling seagull on ubuntu 10.10

Seagull is a free, Open Source (GPL) multi-protocol traffic generator test tool. I will be using Seagull to generate some Diameter traffic for testing. After trying for hours to get this software to compile under Ubuntu, I finally gave up and used the windows cygwin binarys, which worked like a charm.


Seagull is a handy tool for generating very specific traffic types, and provides many scenarios already configured. To get going on Windows, all that I had to do was edit the IP addresses in some XML config files and I was up and running. Nice. 


---


I'll document some of the pains that I went through here during compilation under Ubuntu 10.10 for Seagull in case someone else happens to try this out. There has been some time since Seagull was updated, and compilers have changed a bit since then. Fortunately I ran into this blog post that helped me to understand some of the problems that I was running into. 


At first, KSH and GCC are missing from Ubuntu, so you have to install them.
# apt-get install ksh build-essential bison flex libntl-dev libsctp-dev


Source files that generate the error "error: memset was not declared in this scope" need to have this include line added. 
#include <cstring>


Source files that generate the error "X" need to have this include line added.
#include <cstdlib>


Source files that generate the error "Y" need to have = changed to == in some if statements. 


Source files that generate the error "fatal error: asm/page.h: No such file or directory" need to have a specific include line to point at the actual page.h file. From http://forums.fedoraforum.org/showthread.php?t=190186.
#include "/usr/src/linux-headers-2.6.35-22/arch/x86/include/asm/page.h"

Source files that generate the error "/usr/bin/ld: cannot find -lTTL" can be fixed by commenting a line and uncommenting a line in TCAP section of build.conf.

And lastly, I have not yet solved this one. Error message is "library-trans-extsctp/socketSCTP_t.hpp:23: fatal error: ext_socket.h: No such file or directory". I cant seem to find a library that provides sctp_initLibrary() as  ext_socket.h used to, also cant find ext_socket.h on my system or in an available package.

So, use the windows version, because it works. 


11 comments:

  1. Thanks for this information.

    I went ahead and made this work.

    Copy the contents of ext_socket.h from this location. http://www.koders.com/cpp/fid5B6E3C85F7803ADC2F5BDD409A76DDE3FBFCFE08.aspx?s=%22John+Miller%22

    Copy over to /usr/include/netinet/

    Also
    "Source files that generate the error "Y" need to have = changed to == in some if statements"

    THis is wrong. when I did this, Packets where not getting parsed.

    U need to put extra braces ("(") around the statement.

    There might be some more issues, I don't remember.

    Please try this. It is working like a charm to me now.

    ReplyDelete
    Replies
    1. Thanks Sudhindra!

      I have not had time lately to re-try compiling Seagull in Ubuntu, but I appreciate your corrections and updates. If I have a chance to verify them, I'll update the article.

      Delete
    2. Hi Sudhindra, I have tried compiling this on Ubuntu following your steps and not been successful. Just wondering if you can help me on this. Any ubuntu iso with seagull installed will help. I am not a programmer hence I find it difficult to understand what is going on. I am a tester and need to validate some sections of my IMS stack. I am reachable on kishoreambekar@gmail.com. I am in Bangalore too...

      Delete
  2. I tried to compile seagull in Ubuntu 10.04, and succeeded.

    If you don't use SCTP and TLS in diameter, how about commenting out the following lines in build.conf.

    # sctp transport library
    #BUILD_9_NAME="libtrans_extsctp.so"
    #BUILD_9_TYPE=libextsctp
    #BUILD_9_MODULES="common transport-frame protocol-frame library-trans-ip library-trans-extsctp"

    # tls transport library
    #BUILD_10_NAME="libtrans_iptls.so"
    #BUILD_10_TYPE=libiptls
    #BUILD_10_MODULES="common protocol-frame transport-frame library-trans-ip library-trans-tls"

    INSTALL.txt says "Modify build.conf to add SCTP support (uncomment BUILD_9_ lines)", so I think it's OK to comment out them.

    After that, I can use seagull for testing diameter now.

    ReplyDelete
  3. Which release/version went successful? I am trying version 1.7 but I think I almost need to re-write the code, too much errors

    /Rajabu

    ReplyDelete
  4. Too much errors are coming

    protocol-binary/C_ProtocolBinary.cpp: In member function ‘virtual int C_ProtocolBinary::decode_body(unsigned char*, size_t, C_ProtocolBinary::T_pBodyValue, int*, int*)’:
    protocol-binary/C_ProtocolBinary.cpp:3066:52: error: variable ‘L_data_type’ set but not used [-Werror=unused-but-set-variable]
    protocol-binary/C_ProtocolBinary.cpp: In member function ‘virtual C_ProtocolFrame::T_MsgError C_ProtocolBinary::encode_body(int, C_ProtocolBinary::T_pBodyValue, unsigned char*, size_t*)’:
    protocol-binary/C_ProtocolBinary.cpp:3646:22: error: variable ‘L_body_fieldDescr’ set but not used [-Werror=unused-but-set-variable]
    protocol-binary/C_ProtocolBinary.cpp: In member function ‘virtual C_ProtocolFrame::T_MsgError C_ProtocolBinary::encode_body_without_stat(int, C_ProtocolBinary::T_pBodyValue, unsigned char*, size_t*)’:
    protocol-binary/C_ProtocolBinary.cpp:6147:22: error: variable ‘L_body_fieldDescr’ set but not used [-Werror=unused-but-set-variable]
    cc1plus: all warnings being treated as errors
    make[1]: *** [/usr/src/seagull.svn/work-1.6.0/C_ProtocolBinary.o] Error 1
    make[1]: Leaving directory `/usr/src/seagull.svn'
    make: *** [all_seagull] Error 2

    ReplyDelete
  5. Hi, I am getting the following error can anyone please help.

    In file included from ./octcap_include/ainCommon.h:36,
    from ./octcap_include/ss7_if.h:27,
    from ./octcap_include/TCAP_ext.h:50,
    from library-trans-octcap32/tcap_stack_t.hpp:23,
    from library-trans-octcap32/C_TcapStackNoFlavour.header:20,
    from library-trans-octcap32/C_TcapStackANSI.hpp:44,
    from library-trans-octcap32/C_TcapStackANSI.cpp:20:
    ./octcap_include/OC/oc_limits.h:33:40: error: asm/page.h: No such file or directory
    make[1]: *** [/home/neeve/kart/seagull.svn.LINUX/work-1.8.2/C_TcapStackANSI.o] Error 1
    make[1]: Leaving directory `/home/neeve/kart/seagull.svn.LINUX'
    make: *** [all_libtrans_octcap.so] Error 2

    ReplyDelete
    Replies
    1. Hi Karthik, it looks like your Linux Kernel headers are missing.

      http://forums.bodhilinux.com/index.php?/topic/3723-solved-kernel-header-files-missing/

      sudo apt-get install linux-headers-$(uname -r)

      Hope this helps.
      --Danny

      Delete
  6. Can anyone tell here how much memory and CPU it takes to run a 20k CPS Diameter on a Linux machine?

    Thanks!

    ReplyDelete
  7. You can install it on ubuntu with sctp and tls but it's a laborious task ---___-----

    you have to install the last version of sctp library and socket api.

    You can download it here http://www.sctp.de/sctp-download.html




    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete