2014-01-08

Seagull(Open source Multi-protocol traffic generator) 일반 설치

Seagull  일반 설치

1. Seagull program을 download합니다. (http://sourceforge.net/projects/gull/files/seagull/) 적당한 위치에 tar.gz을 풀어줍니다.

tar -xvf seagull.svn.LINUX.tar.gz
seagull.svn.LINUX

2. 압축을 풀었으면 해당 directory로 이동해서 compile하기 위한 준비를 합니다.

cd ./seagull.svn.LINUX

compile 및 install script가 ksh로 되어 있어 ksh이 있는지 확인합니다. 만약 없다면 설치해 주세요.
확인: which ksh 또는 ksh
설치: yum installl ksh

compile을 하기 전에 clear를 해 줍니다.
./build.ksh -target clean

3.  seagull 및 lib를 compile을 합니다.
./build.ksh -target all

[System  : LINUX]
[Archi   : X86_64]
[Mode    : RELEASE]
[Name    : seagull]
[Version : 1.8.2]

[Begin Makefile generation phase]
[Generating file seagull]
......

4. 참고로 compile시에 발생하는 Error에 대한 대처방안입니다.

4.1. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./common/C_RegExp.hpp
#include <string.h>  // 추가해 줍니다.

(에러)
[Compiling common/C_RegExp.cpp]
common/C_RegExp.cpp:51: error: ‘memcpy’ was not declared in this scope
common/C_RegExp.cpp:69: error: ‘memset’ was not declared in this scope
common/C_RegExp.cpp:79: error: ‘strstr’ was not declared in this scope
common/C_RegExp.cpp:131: error: ‘memset’ was not declared in this scope
common/C_RegExp.cpp:141: error: ‘strstr’ was not declared in this scope
common/C_RegExp.cpp:189: error: ‘memset’ was not declared in this scope
common/C_RegExp.cpp:199: error: ‘strstr’ was not declared in this scope

4.2. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./generator-common/TextUtils.hpp
#include <string.h>  // 추가해 줍니다.

(에러)
[Compiling generator-common/TextUtils.cpp]
generator-common/TextUtils.cpp:60: error: ‘memcpy’ was not declared in this scope

4.3. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./generator-core/cmd_line_t.hpp
#include <string.h>   // 추가해 줍니다.

(에러)
[Compiling generator-core/cmd_line_t.cpp]
generator-core/cmd_line_t.cpp:54: error: ‘strlen’ was not declared in this scope
generator-core/cmd_line_t.cpp:61: error: ‘memcpy’ was not declared in this scope

4.4. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./protocol-binary/C_MessageBinary.cpp
line 493:
// if(L_found = (L_occurence == 0))  // 주석처리
if(L_found == (L_occurence == 0))  // 추가해 줍니다.
line 531:
// if(L_found = (L_occurence == 0))  // 주석처리
if(L_found == (L_occurence == 0))  // 추가해 줍니다.
line 800:
// if(L_found = (L_occurence == 0))  // 주석처리
if(L_found == (L_occurence == 0))  // 추가해 줍니다.

(에러)
Compiling protocol-binary/C_MessageBinary.cpp]
cc1plus: warnings being treated as errors
protocol-binary/C_MessageBinary.cpp:493: error: suggest parentheses around assignment used as truth value
protocol-binary/C_MessageBinary.cpp:531: error: suggest parentheses around assignment used as truth value
protocol-binary/C_MessageBinary.cpp:800: error: suggest parentheses around assignment used as truth value

4.5. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./protocol-tlv/C_MessageTlv.cpp
line 462:
// if(L_found = (L_occurence == 0))  // 주석처리
if(L_found == (L_occurence == 0))   // 추가해 줍니다.
line 502:
// if(L_found = (L_occurence == 0))  // 주석처리
if(L_found == (L_occurence == 0))   // 추가해 줍니다.
line 773:
// if(L_found = (L_occurence == 0))  // 주석처리
if(L_found == (L_occurence == 0))   // 추가해 줍니다.

(에러)
[Compiling protocol-tlv/C_MessageTlv.cpp]
cc1plus: warnings being treated as errors
protocol-tlv/C_MessageTlv.cpp:462: error: suggest parentheses around assignment used as truth value
protocol-tlv/C_MessageTlv.cpp:502: error: suggest parentheses around assignment used as truth value
protocol-tlv/C_MessageTlv.cpp:773: error: suggest parentheses around assignment used as truth value

4.6. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./data-log/C_LogValue.hpp
#include <string.h>   // 추가해 줍니다.

(에러)
[Compiling data-log/C_LogValue.cpp]
data-log/C_LogValue.cpp:30: error: ‘strncpy’ was not declared in this scope
data-log/C_LogValue.cpp:46: error: ‘strncpy’ was not declared in this scope
data-log/C_LogValue.cpp:56: error: ‘strncpy’ was not declared in this scope

4.7. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./library-trans-ip/S_IpAddr.hpp
#include <string.h>   // 추가해 줍니다.

(에러)
[Compiling library-trans-ip/S_IpAddr.cpp]
library-trans-ip/S_IpAddr.cpp:41: error: ‘memset’ was not declared in this scope

4.8. 만약에 Compile시에 아래와 같은 Error가 발생을 하면 아래와 같이 조치해 주십시오.
vi ./build.conf
// 아래에 있는 parameter name에 해당하는 줄에 -fPIC를 추가해 줍니다.
BUILD_EXE_CC_FLAGS_LINUX="-DVERSION=\\\"${PROJECT_VERSION}\\\" -D_GNU_SOURCE -D_REENTRANT -Wall -Werror -DINIT_CALL_FILTER -fPIC"
BUILD_EXE_LD_FLAGS_LINUX="-rdynamic -fPIC"
BUILD_LIB_CC_FLAGS_LINUX="-D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -fPIC"
BUILD_LIB_LD_FLAGS_LINUX="-shared -fPIC"
BUILD_LIBIPTLS_CC_FLAGS_LINUX="$OPENSSL_DIR_INC -DOPENSSL_NO_KRB5 -D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -fPIC"
BUILD_LIBIPTLS_LD_FLAGS_LINUX="-fPIC -shared"
BUILD_LIBCRYPTO_CC_FLAGS_LINUX="$OPENSSL_DIR_INC -DOPENSSL_NO_KRB5 -D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -fPIC"
BUILD_LIBCRYPTO_LD_FLAGS_LINUX="-fPIC -shared"
BUILD_LIBEXTSCTP_CC_FLAGS_LINUX="-I`check_sctp_external_lib`/include -D_GNU_SOURCE -D_REENTRANT -DSCTP_SOCKET_API -shared -Wall -Werror -fPIC"
BUILD_LIBEXTSCTP_LD_FLAGS_LINUX="-fPIC -shared"
BUILD_TCAP_LIB_CC_FLAGS_LINUX="-D_GNU_SOURCE -DTCAP_API100 -D_REENTRANT -shared -Wall -Werror -I/opt/OC/include -I./octcap_include -fPIC"
BUILD_TCAP_LIB_LD_FLAGS_LINUX="-shared -fPIC"
BUILD_LIB_CC_FLAGS_CYGWIN_NT_5_1="-D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -fPIC"
BUILD_LIB_LD_FLAGS_CYGWIN_NT_5_1="-shared -fPIC"

(에러)
/usr/bin/ld: C_RegExp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: C_Socket.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

5. compile이 완료되었으면 install script를 실행해 줍니다. 만약 설치할 directory를 변경하고 싶으시면 script에 적혀있는 directory를 변경해 주십니다.
./install.ksh