# Asterisk 15.1.2  &  pjproject-2.6



## Jora_Cornev (Nov 24, 2017)

Greetings! 

I try to install Asterisk 15.1.2 from packages, on the FreeBSD 11.1

```
cd /home/jora_cornev
wget  http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-15.1.2.tar.gz
tar -zxvf asterisk-15.1.2.tar.gz
cd asterisk-15.1.2
./configure
```
But, in the first step arise errors:

```
checking build system type... x86_64-unknown-freebsd11.1
checking host system type... x86_64-unknown-freebsd11.1
checking for gcc... no
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -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 sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether char is unsigned... no
checking for uname... /usr/bin/uname
checking for g++... no
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking how to run the C preprocessor... cc -E
checking how to run the C++ preprocessor... c++ -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for GNU make... gmake
checking for egrep... (cached) /usr/bin/grep -E
checking for strip... strip
checking for ar... ar
checking for bison... :
checking for cmp... /usr/bin/cmp
checking for cat... /bin/cat
checking for flex... /usr/bin/flex
checking for grep... (cached) /usr/bin/grep
checking for python... :
checking for find... /usr/bin/find
checking for compress... /usr/bin/compress
checking for basename... /usr/bin/basename
checking for dirname... /usr/bin/dirname
checking for sh... /bin/sh
checking for ln... /bin/ln
checking for doxygen... :
checking for dot... :
checking for wget... /usr/local/bin/wget
checking for curl... :
checking for rubber... :
checking for catdvi... :
checking for kpsewhich... :
checking for xmllint... :
checking for xmlstarlet... :
checking for bash... :
checking for git... :
checking for alembic... :
checking for bzip2... /usr/bin/bzip2
checking for tar... /usr/bin/tar
checking for patch... /usr/bin/patch
checking for sed... (cached) /usr/bin/sed
checking for nm... /usr/bin/nm
checking for ldconfig... /sbin/ldconfig
checking for sha1sum... /home/jora_cornev/asterisk-15.1.2/build_tools/sha1sum-sh
checking for openssl... /usr/bin/openssl
checking for bison that supports parse-param...
checking for soxmix... no
checking for md5... md5
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking whether cc is Clang... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for RAII support... checking for clang -fblocks... yes
checking for clang strsep/strcmp optimization... prevent use of __string2_1bptr_p / strsep / strcmp from bits/string2.h
checking for embedded pjproject (may have to download)... configuring
[pjproject]  Verifying /tmp/pjproject-2.6.tar.bz2
[pjproject]  Verify successful
[pjproject]  Unpacking /tmp/pjproject-2.6.tar.bz2
[pjproject]  Applying patches
1 out of 1 hunks failed--saving rejects to pjsip/src/pjsip/sip_transaction.c.rej
gmake: *** [Makefile:130: source/.unpacked] Error 1
failed
configure: Unable to configure third-party/pjproject
configure: error: Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details.
```

In the next step, I run ./configure with NOISY_BUILD=yes
If correctly understand, the LOG installation information locate in the config.log:
https://pastebin.com/fj9kTb4Z
https://pastebin.com/raw/fj9kTb4Z


Does anyone know how to fix this ?
Thanks in advance!


----------



## SirDice (Nov 24, 2017)

Your not installing from packages. In fact your not installing anything. You're downloading the original source and are trying to build that. Use the ports/packages we have.

Handbook: Chapter 4. Installing Applications: Packages and Ports

net/asterisk13


----------



## Jora_Cornev (Nov 24, 2017)

SirDice said:


> You're downloading the original source and are trying to build that.



Ok! But, it not solve the problem...
Any ideas how to fix patch and build this "original source" ?


----------



## tobik@ (Nov 24, 2017)

I think you should ask the Asterisk developers why their bundled pjproject patches fail to apply.

Their support forums are here: https://community.asterisk.org/


----------



## SirDice (Nov 24, 2017)

I do see we only have an "old" LTS version in the ports tree (net/asterisk13). It's still a supported version though. This 15.1.2 version seems to be the latest stable version. You could ask the port's maintainer if he's working on it. Or, judging by the version in the port's name, if he's working on adding asterisk15 to the ports tree.


----------



## Jora_Cornev (Nov 26, 2017)

SirDice said:


> You could ask the port's maintainer if he's working on it.



Tell me please, how i cant to contact with him?


----------



## Phishfry (Nov 26, 2017)

SirDice provided the direct link to freshports.org for the port you are asking about.
It's right there under 'Maintainer' . It is on the third line of text.
net/asterisk13


----------



## Jora_Cornev (Nov 26, 2017)

Thanks for answers!


----------



## zapata (Dec 10, 2017)

Any progress? Have you tried to build with pjsip from ports? Both asterisk 14 and 15 are missing in FreeBSD ports. :-(

To resolve issue with bundled pjsip:

- Install sysutils/coreutils, textproc/gsed and devel/patch
- Modify line 8275 of configure and either remove md5 or put it behind gmd5sum
- Run `PATCH=/usr/local/bin/gpatch ./configure`

Enjoy new error! 

```
checking resolv.h usability... no
checking resolv.h presence... yes
configure: WARNING: resolv.h: present but cannot be compiled
configure: WARNING: resolv.h:     check for missing prerequisite headers?
configure: WARNING: resolv.h: see the Autoconf documentation
configure: WARNING: resolv.h:     section "Present But Cannot Be Compiled"
configure: WARNING: resolv.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to [URL]https://issues.asterisk.org[/URL] ##
configure: WARNING:     ## ------------------------------------------ ##
checking for resolv.h... no
```


----------



## zapata (Jan 11, 2018)

Asterisk 15.2 was released today. The issue with downloading, verifying md5 checksum and patching is fixed.

Patching for resolv.h is still required. There is PR 182466. Does anybody know why this PR is still in progress after more than 4 years?


----------



## SirDice (Jan 12, 2018)

zapata said:


> There is PR 182466. Does anybody know why this PR is still in progress after more than 4 years?


Not sure why, but it's possible it's because it's marked as a bug for 10.0-CURRENT, which doesn't exist anymore. Perhaps that's causing the PR to fall through the cracks.


----------



## nebuchadnezzar (Aug 7, 2019)

I was facing the same errors at openSUSE, so I came to a fresh installation and at find this error below then I try to compile the source code of pjproject, and reported that is require a c++ compiler instead of c compiler. I did install g++ compiler and follow the configure process to compile. Therefore, many issues didn't happen again, just simple dependencies, as libedit-devel, libuuid-devel, sqlite3-devel.


```
failed
configure: Unable to configure third-party/pjproject
configure: error: Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details.
```

Can someone wants check to see if works to FreeBSD also?


----------

