codeghar / Seagull

Seagull is a free, Open Source (GPL) multi-protocol traffic generator test tool. Forked from upstream on Sourceforge. Patched to build on recent versions of Ubuntu, CentOS, and openSUSE.
GNU General Public License v2.0
50 stars 48 forks source link

build failed: Ubuntu 20.04.3 LTS #31

Open siddengg opened 2 years ago

siddengg commented 2 years ago

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

Getting following error.

make[1]: Entering directory '/home/kube5/seagull_new/Seagull/seagull/trunk/src' [Compiling library-trans-ip/C_TransIP.cpp] library-trans-ip/C_TransIP.cpp: In member function ‘void C_TransIP::analyze_optional_init_string(char)’: library-trans-ip/C_TransIP.cpp:710:20: error: ‘%s’ directive output may be truncated writing up to 254 bytes into a region of size 56 [-Werror=format-truncation=] 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~ ~~ ...... 710 | LOG_ALL_P1("Unknown parameter value for close-wait-ms: [%s]", L_tmp); library-trans-ip/C_TransIP.cpp:66:31: note: in definition of macro ‘LOG_ALL_P1’ 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ^ library-trans-ip/C_TransIP.cpp:66:10: note: ‘snprintf’ output between 46 and 300 bytes into a destination of size 100 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~~^~~~~~~~ library-trans-ip/C_TransIP.cpp:710:9: note: in expansion of macro ‘LOG_ALL_P1’ 710 | LOG_ALL_P1("Unknown parameter value for close-wait-ms: [%s]", L_tmp); | ^~~~~~ library-trans-ip/C_TransIP.cpp: In member function ‘int C_TransIP::extract_ip_addr(T_pIpAddr)’: library-trans-ip/C_TransIP.cpp:889:18: error: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 84 [-Werror=format-truncation=] 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~ ~~ ...... 889 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); library-trans-ip/C_TransIP.cpp:66:31: note: in definition of macro ‘LOG_ALL_P1’ 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ^ library-trans-ip/C_TransIP.cpp:66:10: note: ‘snprintf’ output between 18 and 1041 bytes into a destination of size 100 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~~^~~~~~~~ library-trans-ip/C_TransIP.cpp:889:7: note: in expansion of macro ‘LOG_ALL_P1’ 889 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); | ^~~~~~ library-trans-ip/C_TransIP.cpp:987:20: error: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 84 [-Werror=format-truncation=] 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~ ~~ ...... 987 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); library-trans-ip/C_TransIP.cpp:66:31: note: in definition of macro ‘LOG_ALL_P1’ 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ^ library-trans-ip/C_TransIP.cpp:66:10: note: ‘snprintf’ output between 18 and 1041 bytes into a destination of size 100 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~~^~~~~~~~ library-trans-ip/C_TransIP.cpp:987:9: note: in expansion of macro ‘LOG_ALL_P1’ 987 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); | ^~~~~~ library-trans-ip/C_TransIP.cpp:970:18: error: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 84 [-Werror=format-truncation=] 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~ ~~ ...... 970 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); library-trans-ip/C_TransIP.cpp:66:31: note: in definition of macro ‘LOG_ALL_P1’ 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ^ library-trans-ip/C_TransIP.cpp:66:10: note: ‘snprintf’ output between 18 and 1041 bytes into a destination of size 100 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~~^~~~~~~~ library-trans-ip/C_TransIP.cpp:970:7: note: in expansion of macro ‘LOG_ALL_P1’ 970 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); | ^~~~~~ library-trans-ip/C_TransIP.cpp:872:16: error: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 84 [-Werror=format-truncation=] 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~ ~~ ...... 872 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); library-trans-ip/C_TransIP.cpp:66:31: note: in definition of macro ‘LOG_ALL_P1’ 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ^ library-trans-ip/C_TransIP.cpp:66:10: note: ‘snprintf’ output between 18 and 1041 bytes into a destination of size 100 66 | snprintf(L_msg, 100, (char)(m), (P1)) ; \ | ~~^~~~~~~~ library-trans-ip/C_TransIP.cpp:872:5: note: in expansion of macro ‘LOG_ALL_P1’ 872 | LOG_ALL_P1("regcomp error: [%s]", L_buffer); | ^~~~~~ cc1plus: all warnings being treated as errors make[1]: [/home/kube5/seagull_new/Seagull/seagull/trunk/src/work-1.8.3/dep-libtrans_ip.so.mk:55: /home/kube5/seagull_new/Seagull/seagull/trunk/src/work-1.8.3/C_TransIP.o] Error 1 make[1]: Leaving directory '/home/kube5/seagull_new/Seagull/seagull/trunk/src' make: [/home/kube5/seagull_new/Seagull/seagull/trunk/src/work-1.8.3/project.mk:19: all_libtrans_ip.so] Error 2

ALArvi019 commented 2 years ago

hello, I have the same problem, how did you solve it?

thanks

ALArvi019 commented 2 years ago

solution:

`diff --git a/seagull/trunk/src/build.conf b/seagull/trunk/src/build.conf index 1ff664b..b4af8f7 100644 --- a/seagull/trunk/src/build.conf +++ b/seagull/trunk/src/build.conf @@ -102,7 +102,7 @@ BUILD_EXE_YACC_FLAGS_LINUX="-y -d"

Linux library generation definition

BUILD_LIB_CC_LINUX=g++ -BUILD_LIB_CC_FLAGS_LINUX="-D_GNU_SOURCE -D_REENTRANT -shared -Wall -fPIC -Werror" +BUILD_LIB_CC_FLAGS_LINUX="-D_GNU_SOURCE -D_REENTRANT -shared -Wall -fPIC" BUILD_LIB_CC_FLAGS_LINUX_DBG="-g -DDEBUG_MODE -g -D_GNU_SOURCE -D_REENTRANT -shared -Wall -fPIC -Werror -DLOG_DEBUG_NEW" BUILD_LIB_LD_LINUX=g++ BUILD_LIB_LD_FLAGS_LINUX="-shared -fPIC" @@ -128,7 +128,7 @@ BUILD_LIBIPTLS_LD_LIBS_LINUX="-ldl -lpthread -lm $OPENSSL_DIR_LIB -lssl -lcrypto

Linux library generation definition

BUILD_LIBCRYPTO_CC_LINUX=g++ -BUILD_LIBCRYPTO_CC_FLAGS_LINUX="$OPENSSL_DIR_INC -DOPENSSL_NO_KRB5 -D_GNU_SOURCE -D_REENTRANT -shared -Wall -fPIC -Werror" +BUILD_LIBCRYPTO_CC_FLAGS_LINUX="$OPENSSL_DIR_INC -DOPENSSL_NO_KRB5 -D_GNU_SOURCE -D_REENTRANT -shared -Wall -fPIC" BUILD_LIBCRYPTO_LD_LINUX=g++ BUILD_LIBCRYPTO_LD_FLAGS_LINUX="-fPIC -shared" BUILD_LIBCRYPTO_LD_LIBS_LINUX="-ldl -lpthread -lm $OPENSSL_DIR_LIB -lssl -lcrypto" `