Closed kadabusha closed 4 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)
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?
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
If you try again with https://github.com/SIPp/sipp/commit/76aedcf61a930bec56b81487cce8b5e227f9b066 I've just added a 'make install' target :)
@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".
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.
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.
That's about what I'd expect:
make install
to show up in pkg info
, only things installed with pkg add
. (Unless that happens for other things you make install
? I only have a passing familiarity with FreeBSD.)make install
target to install the sipp executable - what were you expecting to see in /usr/local/share/sipp? If it's the PCAP files, that's fairly easy to add to the install target, but I don't think there's any code that looks for them in /usr/local/share
...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"/>
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?
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
[sipp@freebsd /var/tmp/sipp]$ sudo ./sipp -sn uas -i 127.0.0.1 -p 5060
[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)
(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.)
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.
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.
STR:
Case of option=--full or --with-pcap for ./build.sh error is returned (see attached log)
Upon adding disable-dependency-tracking option for ./build.sh error is returned (see attached log)
Running ./configure with --disable-dependency-tracking shows no error, though make/gmake fails after that (see attached log)
=============================================================== In case of git clone the repository, another error is returned:
config.log build.log