Asterisk 13.1.0 is available in the repos for Xenial.
But I'm supporting an application that needs Asterisk 1.8 LTS, because we use a custom plugin. We need to keep using Asterisk 1.8 and building it from source until we can port our plugin forward to the newer version of Asterisk.
However, it seems like Asterisk 1.8 cannot be built with the version of g++ available on Xenial, which is 5.3.1. I get a ton of warnings, which can be silenced, but also a lot of fatal errors about duplicate-defined symbols, and possibly other fatal errors even if I could resolve these.
Example:
iax2-parser.o: In function `ast_atomic_fetchadd_int':
asterisk-1.8/include/asterisk/lock.h:600: multiple definition of `ast_atomic_fetchadd_int'
chan_iax2.o:asterisk-1.8/include/asterisk/lock.h:600: first defined here
iax2-parser.o: In function `ast_atomic_dec_and_test':
asterisk-1.8/include/asterisk/lock.h:646: multiple definition of `ast_atomic_dec_and_test'
chan_iax2.o:asterisk-1.8/include/asterisk/lock.h:646: first defined here
...etc...
I've been reading other posts from people struggling with this, and I've been trying to use compiler options to work around it with no success.
My question is whether there is any solution to do one of the following:
- Build Asterisk 1.8 using g++ 5.3.1 and resolve the compile errors.
- Install an old version of g++ on Xenial (for example I know g++ 4.4.7 works to compile Asterisk 1.8 on our old OS).
- Some other solution to build a version of Asterisk that will run on Xenial. Perhaps build on Ubuntu 14.04 and tar up the binaries? I'd expect to get library version conflicts.
Some people will be glib and say, "you should really just upgrade to Asterisk 13.1.0." Yes, I know of course that would be a better plan. I know Asterisk 1.8 has passed its EOL. Getting a resource to port our plugin forward to Asterisk 13.1.0 is what is holding us back.