Can’t Comile Bundled PJSIP On CentOS 7

Home » Asterisk Users » Can’t Comile Bundled PJSIP On CentOS 7
Asterisk Users 8 Comments

Hello,

I’m setting up an Asterisk 13.13.1 cluster on two CentOS boxes.

I followed this:
cd /usr/src wget … asterisk-13.13.1.tar.gz tar zxf asterisk-13.13.1.tar.gz cd asterisk-13.13.1
ASTERISK_CONFIGURE=”–libdir=/usr/lib64 –prefix=/usr”
./configure ${ASTERISK_CONFIGURE} –with-pjproject-bundled make menuselect (shows res-srtp is available)
make

latest make command fails with (see [1]:

[GENERATE] libasteriskpj.exports
[LD] libasteriskpj.o -> libasteriskpj.so.2
/bin/ld: cannot find -lsrtp-x86_64-unknown-linux-gnu

So I also build a simple VM box in which I also install CentOS and Asterisk
13.3.1 but I could run the above instructions successfully.

Suggestions ?

Best regards

[1] Original error message was localised.

8 thoughts on - Can’t Comile Bundled PJSIP On CentOS 7

  • Maybe libsrtp package is missing on your machine?

    10 янв. 2017 г. 5:16 AM пользователь “Olivier” написал:

  • You probably need to install a package called something like “srtp-devel” or
    “libsrtp-devel”. (I’m not certain of the exact package name on a Fedora-like system, as I’m coming from Ubuntuland 😉 ) Re-run the configure script after installing it.

    Asterisk always used (pre-10!) to be distributed with a script called
    “install_prereq” which was meant to install all the necessary packages for a full install with everything, at least on a on Fedora-like or Debian-like distro; not sure if this is still included anymore, as it seemed a bit flaky.

  • 2017-01-10 5:30 GMT+01:00 Anton Teyhrib :

    libsrtp-devel was installed and I could check it was installed with menuselect (Resources Modules/res_srtp)

  • Historically, I didn’t use “install_prereq” but I also used it yesterday.

    As make fails with “[LD] libasteriskpj.o -> libasteriskpj.so.2” which is the first of its “kind”, I still wonder if issue comes from libsrtp somehow, or from a missing option in
    ./configure (such as –prefix).

    2017-01-10 10:31 GMT+01:00 A J Stiles :

  • is there libsrtp.so.* in /usr/lib64 ?
    did ./configure script show that libsrtp is present?

    2017-01-10 14:58 GMT+05:00 Olivier :

  • ***** THIS IS NOT WHERE YOUR REPLY BELONGS *****

    You said earlier that installing Asterisk and CentOS worked with a VM box that you set up. Were they the same architecture? Were you using all the same versions of everything? Have you still got the image? Fire it up and see what’s different between the two. (You can find out your kernel version, and whether you are running 32- or 64-bit, with `uname -a`. I think the command to list all installed packages on an RPM-based system is `rpm -q -a`, but it was awhile ago since I used one.)

  • Could you have had installed pjproject into the system locations previously? Specifically, are there any libpj* files in /usr/lib64 or pj*
    files or directories in /usr/include? If so, try uninstalling it before building –with-pjproject-bundled. There may be a conflict.

    The newest versions of pjproject require libsrtp 2 which doesn’t ship with most distributions so pjproject attempts to build it’s own internal version. Because we handle srtp in Asterisk itself not pjproject, we made a change to the bundled version of pjproject to not build that internal libsrtp. If you look in third-party/pjproject/patches/config_site.h you should see “#define PJMEDIA_HAS_SRTP 0”. It’s possible that when the bundled version is being built it’s picking up something from the system directories it shouldn’t and looking for the internal version of libsrtp which it didn’t build.

    If removing the system pjproject fixes your issue, let me know and I’ll open a ticket to look further at the conflict.

  • I removed my /usr/src/asterisk-13.13.1 directory and rebuilt from scratch:
    everything worked OK.

    There must be a reason why previous attempts failed with libsrtp but my knowledge of make and Asterisk building is too limited to allow me to constructive findings
    (which is very frustrating and rebuilding everything from scratch won’t help me to learn anything).

    Thank you all very much for your previous help.

    2017-01-10 14:24 GMT+01:00 George Joseph :

LEAVE A COMMENT