Compile Of Smsq.c Failed On Ubuntu Xenial (16.04LTS)

Home » Asterisk Users » Compile Of Smsq.c Failed On Ubuntu Xenial (16.04LTS)
Asterisk Users 1 Comment

Hi everyone.

I’m trying to compile Asterisk with the smsq utility on Ubuntu 16.04
LTS, and while most things are compiling fine, smsq fails with the following output:

root@test25:/usr/src/asterisk-certified-13.1-cert7/utils# make smsq
[CC] smsq.c -> smsq.o
[LD] smsq.o strcompat.o -> smsq strcompat.o: In function `_ast_malloc’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:535:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:535:
undefined reference to `ast_log’
strcompat.o: In function `_ast_calloc’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `ast_log’
strcompat.o: In function `_ast_realloc’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:596:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:596:
undefined reference to `ast_log’
strcompat.o: In function `_ast_strdup’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:624:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:624:
undefined reference to `ast_log’
strcompat.o: In function `_ast_strndup’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:654:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:654:
undefined reference to `ast_log’
strcompat.o: In function `_ast_vasprintf’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:694:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:694:
undefined reference to `ast_log’
strcompat.o: In function `_ast_calloc’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `ast_log’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `ast_log’
strcompat.o: In function `_ast_realloc’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:596:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:596:
undefined reference to `ast_log’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:596:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:596:
undefined reference to `ast_log’
strcompat.o: In function `_ast_calloc’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `_ast_mem_backtrace_buffer’
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/utils.h:559:
undefined reference to `ast_log’
strcompat.o: In function `ast_str_set_va’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1014:
undefined reference to `__ast_str_helper’
strcompat.o: In function `ast_str_append_va’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1032:
undefined reference to `__ast_str_helper’
strcompat.o: In function `ast_str_set_va’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1014:
undefined reference to `__ast_str_helper’
strcompat.o: In function `ast_str_append_va’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1032:
undefined reference to `__ast_str_helper’
strcompat.o: In function `ast_str_set_substr’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1039:
undefined reference to `__ast_str_helper2′
strcompat.o: In function `ast_str_append_substr’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1046:
undefined reference to `__ast_str_helper2′
strcompat.o: In function `ast_str_set_escapecommas’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1053:
undefined reference to `__ast_str_helper2′
strcompat.o: In function `ast_str_append_escapecommas’:
/usr/src/asterisk-certified-13.1-cert7/include/asterisk/strings.h:1060:
undefined reference to `__ast_str_helper2′
collect2: error: ld returned 1 exit status
../Makefile.rules:163: recipe for target ‘smsq’ failed make: *** [smsq] Error 1

Years and years of installing binary packages have made my make-fu weak, but I’ve surmised that it’s having trouble loading the asterisk.h library. To get this far, I modified smsq.h to specify the path of asterisk.h to say:

#include “../include/asterisk.h”

But now I get the output we see above. Perhaps there’s an easier way to make it find the include files it needs?

One thought on - Compile Of Smsq.c Failed On Ubuntu Xenial (16.04LTS)

  • Through trial and error, I’ve found the solution by using Certified Asterisk v13.8-cert1 instead. It compiled without a hitch!