[Home]

Summary:ASTERISK-05575: Makefile for asterisk-addons needs CFLAGS+=-I../asterisk/include
Reporter:boatright (boatright)Labels:
Date Opened:2005-11-12 09:12:49.000-0600Date Closed:2011-06-07 14:10:38
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) Makefile_changes.patch
Description:When compiling asterisk-addons CVS HEAD, I encounter the following error:

bryanb@alpha /data/build/asterisk/ast_cvs_head/asterisk-addons make
cc -fPIC -I../asterisk -D_GNU_SOURCE  -I/usr/include/mysql     -c -o app_saycountpl.o app_saycountpl.c
cc -shared -Xlinker -x -o app_saycountpl.so app_saycountpl.o
cc -fPIC -I../asterisk -D_GNU_SOURCE  -I/usr/include/mysql     -c -o app_addon_sql_mysql.o app_addon_sql_mysql.c
app_addon_sql_mysql.c:164:64: macro "AST_LIST_REMOVE" requires 4 arguments, but only 3 given
app_addon_sql_mysql.c: In function `del_identifier':
app_addon_sql_mysql.c:164: error: `AST_LIST_REMOVE' undeclared (first use in this function)
app_addon_sql_mysql.c:164: error: (Each undeclared identifier is reported only once
app_addon_sql_mysql.c:164: error: for each function it appears in.)
make: *** [app_addon_sql_mysql.o] Error 1


This is occuring because I have not "installed" the corresponding (newer) version of asterisk and the compilation of the addons is seeing my older installed headers.

This can be resolved with this patch to the Makefile in asterisk-addons:

ndex: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile    22 Jun 2005 00:14:26 -0000      1.14
+++ Makefile    12 Nov 2005 15:05:56 -0000
@@ -17,6 +17,7 @@

CFLAGS+=-fPIC
CFLAGS+=-I../asterisk
+CFLAGS+=-I../asterisk/include
CFLAGS+=-D_GNU_SOURCE

INSTALL=install

Disclaimer on file.
Comments:By: Mark Spencer (markster) 2005-11-12 19:51:03.000-0600

You should always install Asterisk before installing asterisk addons.

By: Mark Spencer (markster) 2005-11-12 19:51:37.000-0600

I don't think it's reasonable to assume that asterisk-addons is always checked out in parallel with asterisk, either.