[Solved] Can't install asterisk

Hello dear friends.
I’m having trouble installing asterisk on my Arch Linux machine.
I’ve tried using both the AUR (Arch User Repository) version of asterisk and compiling the tarball myself, either way. I get the same error while running make.
the error I get is:

iax2/parser.o: In function `ast_atomic_fetchadd_int':
/home/roberto/Downloads/asteriskLTS/certified-asterisk-13.1-cert2/include/asterisk/lock.h:685: multiple definition of `ast_atomic_fetchadd_int'

and a lot of similar “multiple definition of …” errors. Full make log can be found here http://pastebin.com/PbsYXTsH

uname -a output:

--> uname -a
Linux micro0 4.0.4-2-ARCH #1 SMP PREEMPT Fri May 22 03:05:23 UTC 2015 x86_64 GNU/Linux

Please ask if any other command output is needed.

Thanks in advance.

I solved it. The problem was that older asterisk codes had problems compiling with GCC 5+. So I had to download the asterisk version 13.4.0-rc1, which has solved this issue for me