Certified Asterisk installation failed

hi i am trying to install Certified Asterisk 16 - LTS but i have a crypt_r error

ld: error: undefined symbol: crypt_r

>>> referenced by crypt.c:124

>>>               crypt.o:(ast_crypt)

>>> referenced by crypt.c:139

>>>               crypt.o:(ast_crypt_validate)

>>> referenced by crypt.c:124

>>>               crypt.o:(ast_crypt_encrypt)

c++: error: linker command failed with exit code 1 (use -v to see invocation)

gmake[2]: *** [Makefile:320: asterisk] Error 1

gmake[1]: *** [Makefile:383: main] Error 2
You need to use the FreeBSD ports & package system for our specific patches.
The older port
or if you want more detailed:
1. I downloaded the source code from http://downloads.asterisk.org/pub/t...terisk/asterisk-certified-16.8-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/certified-asterisk/asterisk-certified-16.8-current.tar.gz
2. unzipped the tar file
tar xvf asterisk-certified-16.8-current.tar.gz
3. installed the dependencies
cd asterisk-certified-16.8-cert5
cd contrib/scripts
./install-prereq test
3.1 I built each of the dependencies from the ports tree
4. I configured Asterisk
cd ../..
5. I tried to build and there the error came up
Please look at the official Git repository for asterick
Notice how it says:



So you are trying to compile Linux based code on FreeBSD.
That requires patches.
So you need to run the FreeBSD port/package system.
It has patches applied for this to build.

Easy way to do this is pkg install asterisk18

I don't know what Certified Asterisk means. For FreeBSD you are best off using our ports and packages.
Building from ports if you want but it is a harder operation.

You may also look at the Asterisk18 patches by browsing the ports directory: /usr/ports/net/asterisk18/files
With the patches manually applied from this directory you could build from Asterisk supplied source code.

Here is a good video with instructions for installing via packages.

If you still want to build Asterisk:
Use portsnap to get the ports collection. Go to /usr/ports/net/asterisk18/, and use make commands (including make config) from there.

All are according to the instructions in that link. This is the standard way to build it on FreeBSD from source code. It bypasses the trial and error approach from building it from scratch, and includes necessary patches (as someone mentioned above).