Compile SIPp failed due to ncurses library missing

I’d like to compile SIPp in my laptop. I have installed all the packets that they required including ncurses and ncurses-devel.SIPp. But when I execute ./configure --with-sctp --with-pcap --with-openssl, it mentioned that “configure: error: ncurses library missing”. what should I do to solve this problem. I need SIPp to do some tests in a server. Thank you in advance!

configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking build system type… x86_64-suse-linux-gnu
checking host system type… x86_64-suse-linux-gnu
checking target system type… x86_64-suse-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /usr/bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for style of include used by make… GNU
checking dependency style of gcc… gcc3
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking dependency style of g++… gcc3
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /usr/bin/grep
checking for egrep… /usr/bin/grep -E
checking for ANSI C header files… yes
checking for initscr in -lcurses… no
configure: error: ncurses library missing

Which openSUSE version is this about?
You may find already compiled sipp packages here:
software.opensuse.org:
Click on “Show unstable packages”, unstable in this case only refers to the fact that they are not part of the official distribution.

According to that package, sipp’s build requirements are:

BuildRequires:  gcc-c++
BuildRequires:  gsl-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libpcap-devel
BuildRequires:  ncurses-devel

Do you have all those installed?

You can take a look into config.log to see exactly why the test for ncurses is failing.

It’s checking for the “libcurses” library, without ‘n’.

You need https://build.opensuse.org/package/view_file?project=home:RedDwarf&package=sipp&file=sipp-3.3-ncurses.patch

I managed to get this Sipp program working with Opensuse 13.2

su -

cd /root

wget ftp://fr2.rpmfind.net/linux/opensuse/distribution/13.2/repo/oss/suse/x86_64/ncurses-devel-5.9-52.2.3.x86_64.rpm
wget ftp://rpmfind.net/linux/sourceforge/s/sl/sl7-i686-project/yum/r7a10/MISSING/Packages/ncurses-5.9-10013.20130511.el7.i686.rpm
wget ftp://rpmfind.net/linux/sourceforge/m/ma/magicspecs/apt/3.0/x86_64/RPMS.n/ncurses-6.0-2.20150810mgc30.x86_64.rpm

rpm -i ncurses-devel-5.9-52.2.3.x86_64.rpm
rpm -i ncurses-5.9-10013.20130511.el7.i686.rpm
rpm -i ncurses-6.0-2.20150810mgc30.x86_64.rpm

wget ftp://invisible-island.net/ncurses/ncurses.tar.gz
tar xvf ncurses.tar.gz
cd ncurses-5.9
./configure
make
make install
./install-sh

tar xvf sipp-3.5.1.tar.gz
cd sipp-3.5.1.tar.gz
./configure
make
make install
./install-sh

Try the install again and it should work now.g eventually with the following process on Opensuse 13.2

This thread is three years old. Do you realy think people discussig this three years ago are still wating for a solution?

Not to mention that installing such a mixture of packages is probably not a good idea either:

The first one, ncurses-devel-5.9-52.2.3 is the package from 13.2 so you can just install it with YaST or “zypper in ncurses-devel”.

But the 2nd one is a RedHat package, and it is 32bit, the third one is a completely different version and seems to come from Mageia.
Both should not be needed anyway.

And afterwards, you even download the source code and build/install your own?
Where’s the point in that?

Please don’t do something like that if you are completely sure what you are doing, and please don’t advise it to others, especially if it’s about such a low-level package…

Talking about “what is the point in that?”:


make install
./install-sh

WTF?

(Not even mentioning that running configure and make as root is also “bad style” and completely unnecessary. But hey, as we say in german “Wenn schon Scheisse, dann mit Schwung”, no I won’t translate that now.)

The best way to deal with this type of “advise” would be to delete that total bunch of junk before other users might take it seriously and mess up their systems.

Fun fact, here’s why configure fails:


rpm -q ncurses-devel
ncurses-devel-5.9-33.1.2.i586

So the headers are there, but:


./configure
------- snip -----
checking for initscr in -lcurses... no

Well, check for “-lcurses” fails, that is expected, but it should also check for “-lncurses”, because


ncurses5-config --cflags --libs
-I/usr/include/ncurses
-**lncurses** -ltinfo

that is what ncurses-devel exports.

However, configure doesn’t check for “-lncurses”:

grep lncurses configure

Nada …

But with this


**sed -i 's|lcurses|lncurses|g' configure***

and then


./configure 
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu

---- snip -----
checking whether g++ supports is_default_constructible (used by gmock)... yes
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

make 
g++ -DHAVE_CONFIG_H   -DRTP_STREAM   -DHAVE_EPOLL -I. -I./include   -D__LINUX -I./include -Wall -pedantic  -g -O2 -std=gnu++11 -MT src/sipp-actions.o -MD -MP -MF src/.deps/sipp-actions.Tpo -c -o src/sipp-actions.o `test -f 'src/actions.cpp' || echo './'`src/actions.cpp

---- snip -----

g++ -DHAVE_CONFIG_H   -DRTP_STREAM   -DHAVE_EPOLL -I. -I./include   -D__LINUX -I./include -Wall -pedantic  -g -O2 -std=gnu++11 -MT src/sipp-sipp.o -MD -MP -MF src/.deps/sipp-sipp.Tpo -c -o src/sipp-sipp.o `test -f 'src/sipp.cpp' || echo './'`src/sipp.cpp
mv -f src/.deps/sipp-sipp.Tpo src/.deps/sipp-sipp.Po
g++ -I./include -Wall -pedantic  -g -O2 -std=gnu++11   -o sipp src/sipp-actions.o src/sipp-auth.o src/sipp-comp.o src/sipp-call.o src/sipp-deadcall.o src/sipp-infile.o src/sipp-listener.o src/sipp-logger.o src/sipp-md5.o src/sipp-message.o src/sipp-milenage.o src/sipp-call_generation_task.o src/sipp-ratetask.o src/sipp-reporttask.o src/sipp-rijndael.o src/sipp-scenario.o src/sipp-sip_parser.o src/sipp-screen.o src/sipp-socket.o src/sipp-socketowner.o src/sipp-stat.o src/sipp-strings.o src/sipp-task.o src/sipp-time.o src/sipp-variables.o src/sipp-watchdog.o src/sipp-xp_parser.o    src/sipp-rtpstream.o src/sipp-sipp.o  -lm -lpthread -ldl -lncurses 
/usr/bin/help2man --output=sipp.1 -v "-v" --no-info \
        --name='SIP testing tool and traffic generator' \
        ./sipp


Works for me™.

Maybe I should, just to avoid some overly sensitive Moderators/Admins thinking I personally insulted (ZOMG!!!1111 We’re all going to DIE!11) somebody …

This little sentence means something like

“If you are really about doing something sh*tty, then do it with momentum/impetus”

and -as I was told- is/was a standard saying for people in our army (well, there you get some impression about that service, but that’s another story).

Simple spec file for sipp 3.5.1 (local build, for OBS %debug_package must be omitted if debuginfo flag is set).


# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           sipp
Version:        3.5.1
Release:        1.1
License:        GPL-2.0+
Summary:        A test tool/traffic generator for the SIP protocol
Url:            http://sipp.sourceforge.net/
Group:          Productivity/Telephony/SIP/Utilities
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  ncurses-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
SIPp is a free Open Source test tool / traffic generator for the SIP protocol. 
It includes a few basic SipStone user agent scenarios (UAC and UAS) and 
establishes and releases multiple calls with the INVITE and BYE methods.
It can also reads custom XML scenario files describing from very simple to
complex call flows. It features the dynamic display of statistics about
running tests (call rate, round trip delay, and message statistics), periodic
CSV statistics dumps, TCP and UDP over multiple sockets or multiplexed
with retransmission management and dynamically adjustable call rates.

Other advanced features include support of IPv6, TLS, SCTP, SIP authentication,
conditional scenarios, UDP retransmissions, error robustness (call timeout,
protocol defense), call specific variable, Posix regular expression to extract
and re-inject any protocol fields, custom actions (log, system command exec,
call stop) on message receive, field injection from external CSV file to emulate live users.

SIPp can also send media (RTP) traffic through RTP echo and RTP / pcap replay.
Media can be audio or video.
While optimized for traffic, stress and performance testing,
SIPp can be used to run one single call and exit, providing a passed/failed verdict.

Last, but not least, SIPp has a comprehensive documentation available
both in HTML and PDF format.

SIPp can be used to test various real SIP equipment like SIP proxies, B2BUAs,
SIP media servers, SIP/x gateways, SIP PBX, ...
It is also very useful to emulate thousands of user agents calling your SIP system.

%debug_package

%prep
%setup -q
## fix configure script
%__sed -i 's|lcurses|lncurses|g' configure

%build
%configure
make %{?_smp_mflags}

%install
%makeinstall

%files
%defattr(-,root,root)
%doc *.md *.txt THANKS
%{_bindir}/%{name}

%changelog