Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No PCAP installed for 3.6.1 on CentOS 7 #540

Closed
Xyders opened this issue Oct 7, 2021 · 5 comments
Closed

No PCAP installed for 3.6.1 on CentOS 7 #540

Xyders opened this issue Oct 7, 2021 · 5 comments

Comments

@Xyders
Copy link

Xyders commented Oct 7, 2021

Hello,

I installed 3.6.1 on CentOS7 using following commands:

CMAKE_OPT="-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++"
cmake . $CMAKE_OPT -DUSE_GSL=1 -DUSE_PCAP=1 -DUSE_SSL=1 -DUSE_SCTP=1
make -j4

The same problem in #485 happened so I reused the commands in this issue.

But my problem was that PCAP was not build into it as the output of "sipp -v" was like:
SIPp v3.6.1-RTPSTREAM.

There was no error msg during my building so I don't know what was wrong.

BTW I tried 3.6.0 with ./configure --with-pcap --with-openssl and "sipp -v" showed SIPp v3.6.0-TLS-PCAP-RTPSTREAM.

Any comments would be appreciated.

@wdoekes
Copy link
Member

wdoekes commented Oct 25, 2021

I'm sorry. This is not sufficient info for me to solve. Please reopen when you have something that doesn't require me to install CentOS7 to test.

@wdoekes wdoekes closed this as completed Oct 25, 2021
@Xyders
Copy link
Author

Xyders commented Oct 28, 2021

Here's some observation from my test. I installed both 7 and 8, and I found 3.6.0 on 7, and 3.6.1 on 8 both worked normally. The reason might be the version of libpcap, which is 1.5.3 on 7 and 1.9.1 on 8 by default yum install. Anyway at least I got the workaround in my environment.

@wdoekes
Copy link
Member

wdoekes commented Oct 28, 2021

👍

Glad you got it sorted.

@wdoekes
Copy link
Member

wdoekes commented Oct 28, 2021

... this is probably related to the CMake conversion though.

Possibly things start to work if one adds:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,18 +107,30 @@ if(USE_SSL)
 endif()
 
 if(USE_PCAP)
-  add_definitions("-DPCAPPLAY")
+  find_library(PCAP_LIBRARY pcap)
+  if(PCAP_LIBRARY)
+    add_definitions("-DPCAPPLAY")
+  else()
+    message(FATAL_ERROR "libpcap not found")
+  endif()
 endif(USE_PCAP)
 
 if(USE_GSL)
   find_library(GSL_LIBRARY gsl)
   if(GSL_LIBRARY)
     add_definitions("-DHAVE_GSL")
-  endif(GSL_LIBRARY)
+  else()
+    message(FATAL_ERROR "libgsl not found")
+  endif()
 endif(USE_GSL)
 
 if(USE_SCTP)
-  add_definitions("-DUSE_SCTP")
+  find_library(SCTP_LIBRARY sctp)
+  if(SCTP_LIBRARY)
+    add_definitions("-DUSE_SCTP")
+  else()
+    message(FATAL_ERROR "libsctp not found")
+  endif()
 endif(USE_SCTP)
 
 # add the executable

I'm not that intimate with cmake yet. (Make sure you make clean; rm -rf CMakeCache.txt CMakeFiles just in case).

@Xyders
Copy link
Author

Xyders commented Nov 30, 2021

@wdoekes I tried in your way and make again. It worked without problem. Now sipp -v showed SIPp v3.6.1-TLS-SCTP-PCAP-RTPSTREAM. Thank you for your solution!

wdoekes added a commit that referenced this issue Nov 30, 2021
Fixes build on CentOS7. Closes #540 reported by @Xyders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants