2014-10-27

CentOS 7에서 seagull 1.8.2 설치하기

Download: http://gull.sourceforge.net/download/index.html

cd /opt
tar -xvf seagull.svn.LINUX.tar.gz
cd /opt/seagull.svn.LINUX

yum install ksh

./build.ksh -target clean
./build.ksh -target all

common/C_RegExp.cpp:51:62: error: 'memcpy' was not declared in this scope 에러가 발생하면, 아래와 같이 수정해 줍니다.
vi ./common/C_RegExp.hpp
#include <string.h>

generator-common/TextUtils.cpp:60:58: error: 'memcpy' was not declared in this scope에러가 발생을 하면, 아래와 같이 추가해 줍니다.
vi ./generator-common/TextUtils.hpp 
#include <string.h>

protocol-binary/C_ProtocolBinary.cpp:3068:52: error: variable 'L_data_type' set but not used [-Werror=unused-but-set-variable]
vi ./build.conf //아래에 같이 변경해 줍니다.
BUILD_EXE_CC_FLAGS_LINUX="-DVERSION=\\\"${PROJECT_VERSION}\\\" -D_GNU_SOURCE -D_REENTRANT -Wall -Werror -DINIT_CALL_FILTER -Wno-unused-but-set-variable -fPIC"
BUILD_EXE_CC_FLAGS_LINUX_DBG="-DDEBUG_MODE -g -D_GNU_SOURCE -D_REENTRANT -Wall -Werror -DINIT_CALL_FILTER -DLOG_DEBUG_NEW -Wno-unused-but-set-variable -fPIC"
BUILD_LIB_CC_FLAGS_LINUX_DBG="-g -DDEBUG_MODE -g -D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -DLOG_DEBUG_NEW -Wno-unused-but-set-variable -fPIC"
BUILD_LIBIPTLS_CC_FLAGS_LINUX="$OPENSSL_DIR_INC -DOPENSSL_NO_KRB5 -D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -Wno-unused-but-set-variable -fPIC"
BUILD_LIBCRYPTO_CC_FLAGS_LINUX="$OPENSSL_DIR_INC -DOPENSSL_NO_KRB5 -D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -Wno-unused-but-set-variable -fPIC"
BUILD_LIBEXTSCTP_CC_FLAGS_LINUX="-I`check_sctp_external_lib`/include -D_GNU_SOURCE -D_REENTRANT -DSCTP_SOCKET_API -shared -Wall -Werror -Wno-unused-but-set-variable -fPIC"
BUILD_TCAP_LIB_CC_FLAGS_LINUX="-D_GNU_SOURCE -DTCAP_API100 -D_REENTRANT -shared -Wall -Werror -I/opt/OC/include -I./octcap_include -Wno-unused-but-set-variable -fPIC"
BUILD_SIMPLE_EXE_CC_FLAGS_LINUX="-Wall -Werror -Wno-unused-but-set-variable -fPIC"
BUILD_TEST_CC_FLAGS_LINUX="-D_GNU_SOURCE -D_REENTRANT -I/usr/local/include -Wall -Wno-unused-but-set-variable -fPIC"

protocol-binary/C_MessageBinary.cpp:493:38: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
       if(L_found = (L_occurence == 0)) 에러가 발생하면 아래와 같이 수정해 줍니다.
vi ./protocol-binary/C_MessageBinary.cpp
if((L_found = (L_occurence == 0)))

protocol-tlv/C_MessageTlv.cpp:462:38: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
       if(L_found = (L_occurence == 0)) 에러가 발생하면 아래와 같이 수정해 줍니다.
vi ./protocol-tlv/C_MessageTlv.cpp
if((L_found = (L_occurence == 0)))

data-log/C_LogValue.cpp:30:34: error: 'strncpy' was not declared in this scope
   strncpy(m_string, P_string, 100); 에러가 발생하면 아래와 같이 수정해 줍니다.
vi ./data-log/C_LogValue.cpp
#include <string.h>

library-trans-ip/C_DataDecode.hpp:28:23: error: expected ')' before 'P_buf_size' 에러가 발생하면 아래와 같이 수정해 줍니다.
vi ./library-trans-ip/C_DataDecode.hpp
#inclue <string.h>

library-trans-ip/S_DataDecode.hpp:28:23: error: expected ')' before 'P_buf_size' 에러가 발생하면 아래와 같이 수정해 줍니다.
vi library-trans-ip/S_IpAddr.hpp
#include <string.h>

/usr/bin/ld: /opt/seagull.svn.LINUX/work-1.8.2/C_RegExp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC 에러가 발생하면 아래와 같이 수정해 줍니다.
vi ./build.conf
BUILD_EXE_CC_FLAGS_LINUX="-DVERSION=\\\"${PROJECT_VERSION}\\\" -D_GNU_SOURCE -D_REENTRANT -Wall -Werror -DINIT_CALL_FILTER -Wno-unused-but-set-variable -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 -Wno-unused-but-set-variable -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 -Wno-unused-but-set-variable -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 -Wno-unused-but-set-variable -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 -Wno-unused-but-set-variable -fPIC"
BUILD_TCAP_LIB_LD_FLAGS_LINUX="-shared -fPIC"
BUILD_SIMPLE_EXE_CC_FLAGS_LINUX="-Wall -Werror -Wno-unused-but-set-variable -fPIC"
BUILD_TEST_CC_FLAGS_LINUX="-D_GNU_SOURCE -D_REENTRANT -I/usr/local/include -Wall -Wno-unused-but-set-variable -fPIC"
BUILD_LIB_LD_FLAGS_CYGWIN_NT_5_1="-shared -fPIC"

./octcap_include/OC/oc_limits.h:33:40: fatal error: asm/page.h: No such file or directory 에러가 발생하면 아래와 같이 수정해 줍니다.
vi .//octcap_include/OC/oc_limits.h
// #include <asm/page.h>
#include "/usr/src/kernels/3.10.0-123.8.1.el7.x86_64/arch/x86/include/asm/page.h"


/usr/bin/ld: cannot find -lntl 에러가 발생하면 아래와 같이ntl을 설치해 줍니다.
Download: http://www.shoup.net/ntl/download.html  // A Library for doing Number Theory
tar -xvf ntl-6.2.1.tar.gz
cd /opt/ntl-6.2.1
cd ./src
./configure
make
make install

/usr/bin/ld: cannot find -lTTL
/usr/bin/ld: cannot find -lTTLBase