SIPp / sipp

The SIPp testing tool
https://sipp.readthedocs.io
Other
921 stars 384 forks source link

failure upon installation from sources on FreeBSD 11.2 x64 of sipp 3.6.0 #426

Closed kadabusha closed 4 years ago

kadabusha commented 5 years ago

STR:

  1. Get the vhd image of base system from FreeBSD.org
  2. Provision virtual machine, setup network, optionally - add user
  3. Install needed programs with dependencies (autoconf, autoconf-wrapper, automake, gmake, libtool, m4, pkgconf, perl5)
  4. Fetch sipp-3.6.0.tar.gz from Releases, un-tar it and run build.sh
[sipp@freebsd /var/tmp]$ uname -a
FreeBSD freebsd 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

sudo pkg install ca_root_nss
sudo pkg install automake
sudo pkg install libtool
sudo pkg install libevent
sudo pkg install gcc
sudo pkg install openssl
sudo pkg install gmake
sudo pkg install pkgconf
sudo pkg install gettext-tools
sudo pkg install tcpdump
sudo pkg install ncurses
sudo pkg install libpcap
sudo pkg install libnet
sudo pkg install gsl
sudo pkg install git

[sipp@freebsd /var/tmp/sipp-3.6.0]$ pkg info
autoconf-2.69_3                Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
automake-1.16.1_2              GNU Standards-compliant Makefile generator
bash-5.0.11                    GNU Project's Bourne Again SHell
binutils-2.32_1,1              GNU binary tools
ca_root_nss-3.47               Root certificate bundle from the Mozilla Project
curl-7.66.0                    Command line tool and library for transferring data with URLs
cvsps-2.1_2                    Create patchset information from CVS
expat-2.2.8                    XML 1.0 parser written in C
gcc-9_4                        Meta-port for the default version of the GNU Compiler Collection
gcc9-9.2.0                     GNU Compiler Collection 9
gettext-runtime-0.20.1         GNU gettext runtime libraries and programs
gettext-tools-0.20.1_1         GNU gettext development and translation tools
git-2.23.0                     Distributed source code management tool
gmake-4.2.1_3                  GNU version of 'make' utility
gmp-6.1.2_1                    Free library for arbitrary precision arithmetic
gsl-2.5_1                      The GNU Scientific Library - mathematical libs
help2man-1.47.11               Automatically generating simple manual pages from program output
indexinfo-0.3.1                Utility to regenerate the GNU info page index
libevent-2.1.11                API for executing callback functions on events or timeouts
libffi-3.2.1_3                 Foreign Function Interface
libnet-1.1.6_5,1               C library for creating IP packets
libnghttp2-1.39.2              HTTP/2.0 C Library
libpcap-1.9.0                  Ubiquitous network traffic capture library
libsmi-0.4.8_1                 Library to access SMI MIB information
libtextstyle-0.20.1            Text styling library
libtool-2.4.6_1                Generic shared library support script
m4-1.4.18_1,1                  GNU M4
mpc-1.1.0_2                    Library of complex numbers with arbitrarily high precision
mpfr-4.0.2                     Library for multiple-precision floating-point computations
ncurses-6.1.20190525           Library for terminal-independent, full-screen output
openssl-1.0.2t,1               SSL and crypto library
p5-Authen-SASL-2.16_1          Perl5 module for SASL authentication
p5-CGI-4.44                    Handle Common Gateway Interface requests and responses
p5-Digest-HMAC-1.03_1          Perl5 interface to HMAC Message-Digest Algorithms
p5-Error-0.17028               Error/exception handling in object-oriented programming style
p5-GSSAPI-0.28_1               Perl extension providing access to the GSSAPIv2 library
p5-HTML-Parser-3.72            Perl5 module for parsing HTML documents
p5-HTML-Tagset-3.20_1          Some useful data table in parsing HTML
p5-IO-Socket-INET6-2.72_1      Perl module with object interface to AF_INET6 domain sockets
p5-IO-Socket-SSL-2.066         Perl5 interface to SSL sockets
p5-Locale-gettext-1.07         Message handling functions
p5-Mozilla-CA-20180117         Perl extension for Mozilla CA cert bundle in PEM format
p5-Net-SSLeay-1.85             Perl5 interface to SSL
p5-Socket6-0.29                IPv6 related part of the C socket.h defines and structure manipulators
pcre-8.43_2                    Perl Compatible Regular Expressions library
perl5-5.30.0                   Practical Extraction and Report Language
pkg-1.12.0                     Package manager
pkgconf-1.6.3,1                Utility to help to configure compiler and linker flags
python36-3.6.9                 Interpreted object-oriented programming language
readline-8.0.0                 Library for editing command lines as they are typed
screen-4.6.2_3                 Multi-screen window manager
sudo-1.8.28                    Allow others to run commands as root
tcpdump-4.9.2_2                Ubiquitous network traffic analysis tool
vim-console-8.1.1954           Improved version of the vi editor (console only)

[sipp@freebsd /var/tmp]$ fetch https://github.com/SIPp/sipp/releases/download/v3.6.0/sipp-3.6.0.tar.gz
sipp-3.6.0.tar.gz                             100% of 1030 kB  204 kBps 00m05s
[sipp@freebsd /var/tmp]$ tar -xf sipp-3.6.0.tar.gz
[sipp@freebsd /var/tmp]$ cd sipp-3.6.0

Case of option=--full or --with-pcap for ./build.sh error is returned (see attached log)

config.status: error: in `/var/tmp/sipp-3.6.0':
config.status: error: Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  Try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See `config.log' for more details"

Upon adding disable-dependency-tracking option for ./build.sh error is returned (see attached log)

checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
+ test -e gtest/.git
+ /usr/local/bin/gmake -j1
make clean
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3050: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3052: Need an operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3054: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3055: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3056: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3057: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3058: Need an operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3060: Need an operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3061: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3062: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3063: Need an operator
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /var/tmp/sipp-3.6.0
gmake: *** [Makefile:3071: .autoclean] Error 1

Running ./configure with --disable-dependency-tracking shows no error, though make/gmake fails after that (see attached log)

[sipp@freebsd /var/tmp/sipp-3.6.0]$ gmake
make clean
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3050: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3052: Need an operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3054: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3055: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3056: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3057: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3058: Need an operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3060: Need an operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3061: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3062: Missing dependency operator
make[1]: "/var/tmp/sipp-3.6.0/Makefile" line 3063: Need an operator
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /var/tmp/sipp-3.6.0
gmake: *** [Makefile:3071: .autoclean] Error 1

=============================================================== In case of git clone the repository, another error is returned:

-I./include -Wall -pedantic -DGTEST=1 -I./gtest/include -I./gmock/include -I./gtest -I./gmock  -g -O2 -c -o src/sipp_unittest-socket.o `test -f 'src/socket.cpp' || echo './'`src/socket.cpp
src/socket.cpp: In function 'int open_connections()':
src/socket.cpp:2400:28: error: 'EAI_ADDRFAMILY' was not declared in this scope; did you mean 'EAI_FAMILY'?
 2400 |                 if (ret == EAI_ADDRFAMILY) {
      |                            ^~~~~~~~~~~~~~
      |                            EAI_FAMILY
gmake: *** [Makefile:2013: src/sipp_unittest-socket.o] Error 1

config.log build.log

rkday commented 5 years ago

Thanks for the report! I'm looking at moving to CMake as a simpler alternative to autoconf - can you check out https://github.com/SIPp/sipp/commit/c512e7fff8ecf57b71154152c63255e5f1d75d77 and test whether cmake . -DUSE_EPOLL= -DUSE_PCAP=1 && make works for you?

(It looks like other projects are also seeing this autoconf bug, e.g. https://github.com/bitcoin/bitcoin/issues/14404)

kadabusha commented 5 years ago

Hi, @rkday - thanks for looking into this issue. I assume that cmake went well, though on make stage multiple errors appeared, see attached log with steps. In short words I did:

sudo pkg install cmake
git pull
git checkout build_improvements
cmake . -DUSE_EPOLL= -DUSE_PCAP=1 && make

P.S. I noticed that header files like endian.h are located in /usr/include rather then /usr/local/include, maybe that could be somewhat an issue here as well?

build_improvements_branch_sipp_freebsd.txt

kadabusha commented 5 years ago

I must have misunderstood checkout to commit step - in that case the make passes well, but how to proceed further? make install has no power there

[sipp@freebsd /var/tmp/sipp]$ git checkout c512e7f
Note: switching to 'c512e7f'.

You are in 'detached HEAD' state. .........
.............................
HEAD is now at c512e7f FreeBSD support
[sipp@freebsd /var/tmp/sipp]$ cmake . -DUSE_EPOLL= -DUSE_PCAP=1
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/sipp
[sipp@freebsd /var/tmp/sipp]$ make
Scanning dependencies of target sipp
[  3%] Building CXX object CMakeFiles/sipp.dir/src/actions.cpp.o
[  6%] Building CXX object CMakeFiles/sipp.dir/src/auth.cpp.o
[  9%] Building CXX object CMakeFiles/sipp.dir/src/call.cpp.o
[ 12%] Building CXX object CMakeFiles/sipp.dir/src/call_generation_task.cpp.o
[ 15%] Building C object CMakeFiles/sipp.dir/src/comp.c.o
[ 18%] Building CXX object CMakeFiles/sipp.dir/src/deadcall.cpp.o
[ 21%] Building CXX object CMakeFiles/sipp.dir/src/infile.cpp.o
[ 24%] Building CXX object CMakeFiles/sipp.dir/src/listener.cpp.o
[ 27%] Building CXX object CMakeFiles/sipp.dir/src/logger.cpp.o
[ 30%] Building C object CMakeFiles/sipp.dir/src/md5.c.o
[ 33%] Building CXX object CMakeFiles/sipp.dir/src/message.cpp.o
[ 36%] Building C object CMakeFiles/sipp.dir/src/milenage.c.o
[ 39%] Building C object CMakeFiles/sipp.dir/src/prepare_pcap.c.o
[ 42%] Building CXX object CMakeFiles/sipp.dir/src/ratetask.cpp.o
[ 45%] Building CXX object CMakeFiles/sipp.dir/src/reporttask.cpp.o
[ 48%] Building C object CMakeFiles/sipp.dir/src/rijndael.c.o
[ 51%] Building CXX object CMakeFiles/sipp.dir/src/rtpstream.cpp.o
[ 54%] Building CXX object CMakeFiles/sipp.dir/src/scenario.cpp.o
[ 57%] Building CXX object CMakeFiles/sipp.dir/src/screen.cpp.o
[ 60%] Building C object CMakeFiles/sipp.dir/src/send_packets.c.o
[ 63%] Building CXX object CMakeFiles/sipp.dir/src/sip_parser.cpp.o
[ 66%] Building CXX object CMakeFiles/sipp.dir/src/sipp.cpp.o
[ 69%] Building CXX object CMakeFiles/sipp.dir/src/socket.cpp.o
[ 72%] Building CXX object CMakeFiles/sipp.dir/src/socketowner.cpp.o
[ 75%] Building CXX object CMakeFiles/sipp.dir/src/stat.cpp.o
[ 78%] Building CXX object CMakeFiles/sipp.dir/src/strings.cpp.o
[ 81%] Building CXX object CMakeFiles/sipp.dir/src/task.cpp.o
[ 84%] Building CXX object CMakeFiles/sipp.dir/src/time.cpp.o
[ 87%] Building CXX object CMakeFiles/sipp.dir/src/variables.cpp.o
[ 90%] Building CXX object CMakeFiles/sipp.dir/src/watchdog.cpp.o
[ 93%] Building C object CMakeFiles/sipp.dir/src/xp_parser.c.o
[ 96%] Building CXX object CMakeFiles/sipp.dir/src/xp_parser_ut.cpp.o
[100%] Linking CXX executable sipp
[100%] Built target sipp
[sipp@freebsd /var/tmp/sipp]$ make install
make: don't know how to make install. Stop
make: stopped in /var/tmp/sipp
rkday commented 5 years ago

If you try again with https://github.com/SIPp/sipp/commit/76aedcf61a930bec56b81487cce8b5e227f9b066 I've just added a 'make install' target :)

kadabusha commented 5 years ago

@rkday sorry, it still can not make thing happen - you mean to checkout to 76aedcf and do all steps again, right?

[sipp@freebsd /var/tmp]$ rm -rf sipp
[sipp@freebsd /var/tmp]$ git clone https://github.com/SIPp/sipp.git
Cloning into 'sipp'...
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 6472 (delta 21), reused 39 (delta 11), pack-reused 6421
Receiving objects: 100% (6472/6472), 4.85 MiB | 2.66 MiB/s, done.
Resolving deltas: 100% (4658/4658), done.
[sipp@freebsd /var/tmp]$ cd sipp
[sipp@freebsd /var/tmp/sipp]$ git checkout 76aedcf
Note: switching to '76aedcf'.
.....................
HEAD is now at 76aedcf Add 'make install' target
[sipp@freebsd /var/tmp/sipp]$ cmake . -DUSE_EPOLL= -DUSE_PCAP=1
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:10 (add_subdirectory):
  The source directory

    /var/tmp/sipp/gmock

  does not contain a CMakeLists.txt file.

-- Looking for endian.h
-- Looking for endian.h - not found
-- Looking for sys/endian.h
-- Looking for sys/endian.h - found
-- Looking for sys/epoll.h
-- Looking for sys/epoll.h - not found
-- Performing Test HAVE_UDP_UH_PREFIX
-- Performing Test HAVE_UDP_UH_PREFIX - Success
-- Looking for le16toh
-- Looking for le16toh - not found
-- Looking for le16toh
-- Looking for le16toh - found
-- Configuring incomplete, errors occurred!
See also "/var/tmp/sipp/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/sipp/CMakeFiles/CMakeError.log".

CMakeError.log CMakeOutput.log

rkday commented 5 years ago

The problem is that it can't find anything in the gmock folder - you need to run git submodule update --init to get that. (And then just run cmake . -DUSE_EPOLL= -DUSE_PCAP=1, make and make install again.)

I'll add something to give a clearer error/make that optional before I merge it.

kadabusha commented 5 years ago

Thanks, Rob - the installation has went fine and sipp finally started, even with pcap module inside. Though for installation to FreeBSD it seems to be partially complete I think:

[sipp@freebsd /var/tmp/sipp]$ sipp -v
 SIPp v3.6.0-4-gcc24f9d-PCAP-RTPSTREAM.
...........................................................

 Author: see source files.
[sipp@freebsd /var/tmp/sipp]$ pkg info|grep sipp
[sipp@freebsd /var/tmp/sipp]$ ls /usr/local/share/sipp
ls: /usr/local/share/sipp: No such file or directory
[sipp@freebsd /var/tmp/sippycallscenarios]$ sudo sipp -sn uac_pcap 127.0.0.1
2019-10-28      00:51:14.374037 1572223874.374037: Can't open PCAP file 'pcap/g711a.pcap': pcap/g711a.pcap: No such file or directory

that, however, does not affect the pcap_play module - scenario with hardcoded paths to pcap files seems to be working fine at first glance, though.

rkday commented 5 years ago

That's about what I'd expect:

kadabusha commented 5 years ago

I must have expected the same behavior as it was for installation of sipp from ports - which is not our case, ofc. Though in that case sipp is added to pkg list and /usr/local/share/sipp has pcap folder with dtmfs and some sample that is crucial for built-in uac_pcap scenario, I assume:

===>  Staging for sipp-3.5.1_5
===>   sipp-3.5.1_5 depends on file: /usr/local/lib/libncurses.so.6 - found
===>   sipp-3.5.1_5 depends on file: /usr/local/lib/libcrypto.so.9 - found
===>   Generating temporary packing list
install  -s -m 555 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/sipp /usr/ports/benchmarks/sipp/work/stage/usr/local/bin
install  -m 444 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/include/sipp.1 /usr/ports/benchmarks/sipp/work/stage/usr/local/man/man1
/bin/mkdir -p /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_0.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pc
ap/dtmf_2833_0.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_1.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pc
ap/dtmf_2833_1.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_2.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pc
ap/dtmf_2833_2.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_3.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pc
ap/dtmf_2833_3.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_4.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pc
ap/dtmf_2833_4.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_5.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/dtmf_2833_5.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_6.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/dtmf_2833_6.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_7.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/dtmf_2833_7.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_8.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/dtmf_2833_8.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_9.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/dtmf_2833_9.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_pound.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/dtmf_2833_pound.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/dtmf_2833_star.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/dtmf_2833_star.pcap
install  -m 0644 /usr/ports/benchmarks/sipp/work/sipp-3.5.1/pcap/g711a.pcap /usr/ports/benchmarks/sipp/work/stage/usr/local/share/sipp/pcap/g711a.pcap
====> Compressing man pages (compress-man)
===>  Installing for sipp-3.5.1_5
===>  Checking if sipp is already installed
===>   Registering installation for sipp-3.5.1_5
Installing sipp-3.5.1_5...
......
[sipp@freebsd /usr/ports/benchmarks/sipp]$ pkg info|grep sipp
sipp-3.5.1_5                   SIP benchmarking and testing tool
[sipp@freebsd /usr/ports/benchmarks/sipp]$ ls -lah /usr/local/share/sipp/pcap/
total 128
drwxr-xr-x  2 root  wheel   1.0K Oct 28 01:20 .
drwxr-xr-x  3 root  wheel   512B Oct 28 00:45 ..
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_0.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_1.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_2.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_3.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_4.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_5.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_6.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_7.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_8.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_9.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_pound.pcap
-rw-r--r--  1 root  wheel   764B Oct 28 01:20 dtmf_2833_star.pcap
-rw-r--r--  1 root  wheel    71K Oct 28 01:20 g711a.pcap

The output for 3.5.1 version:

[sipp@freebsd /usr/ports/benchmarks/sipp]$ sipp -sd uac_pcap | grep pcap
<!--                 Sipp 'uac' scenario with pcap (rtp) play           -->
      <exec play_pcap_audio="/usr/local/share/sipp/pcap/g711a.pcap"/>
      <exec play_pcap_audio="/usr/local/share/sipp/pcap/dtmf_2833_1.pcap"/>

The output for 3.6 version:

[sipp@freebsd /usr/ports/benchmarks/sipp]$ sipp -sd uac_pcap | grep pcap
<!--                 Sipp 'uac' scenario with pcap (rtp) play           -->
      <exec play_pcap_audio="pcap/g711a.pcap"/>
      <exec play_pcap_audio="pcap/dtmf_2833_1.pcap"/>
kadabusha commented 5 years ago

Thanks for your patient assistance, @rkday - I'll do the proper check of sipp 3.6 today, since the main issue is fixed, and the installation went fine - may I ask when the change is expected for reviewing and merge to the master/3.5 branch if that's acceptable here?

kadabusha commented 5 years ago

The basic functionality works fine, though I'm facing issues upon trying to play *.pcap file, here did

cmake . -DUSE_EPOLL= -DUSE_PCAP=1 && make

and used sipp binary from the cloned folder.

2019-10-28 13:30:29.131448 1572269429.131448: Can't bind media raw socket

  1. Run UAS, could be at no media:
    [sipp@freebsd /var/tmp/sipp]$ sudo ./sipp -sn uas -i 127.0.0.1 -p 5060
  2. Run UAC using built-in uac_pcap scenario:
    [sipp@freebsd /var/tmp/sipp]$ sudo ./sipp 127.0.0.1:5060 -sn uac_pcap -p 5061 -m 1

That does not seem to be permissions issue, since UAC was run with sudo (running under root after sudo -s makes no difference)

rkday commented 5 years ago

(RTP streaming, as documented at https://sipp.readthedocs.io/en/v3.6.0/media.html and https://sipp.readthedocs.io/en/v3.6.0/scenarios/actions.html#media-rtp-commands, might work better than PCAP playback in this case.)

kadabusha commented 5 years ago

Thanks again for looking into that, @rkday - your deep analysis with clear explanations are of big help to me. I just checked latest master on the very same box - there is minor warning on cmake step " Manually-specified variables were not used by the project: USE_EPOLL" and fatal errors on make if cmake was done with -DBUILD_STATIC=1, please see attached log. fatal.txt I also check whether same make error happens with any other option, seems this is the only one affected. Option was taken from README.md

As for pcap_play on FreeBSD - I was using sipp 3.3 for ages on FreeBSD 10.1/10.3 at no issues, and PCAP was played properly, can not confirm it to be working well in later versions. I'll check the RTP Streaming option as well, at least this option comes when installing sipp from ports there.

Once I get the working sipp of master branch, I'll proceed with creation of a new ticket, with your kind explanations pcap_play has no relation to reported make issue on FreeBSD.

rkday commented 4 years ago

Thanks! I've updated the docs under https://github.com/SIPp/sipp/pull/437 to not mention USE_EPOLL (which is now autodetected) and to clarify BUILD_STATIC (which I only expect to work on Alpine Linux).

I think that resolves this issue so I'm going to close it - feel free to reopen if I've missed somethig.