I've tried to compile rate-engine 0.5.2 on Fedora Core 1, Redhat 9 and OpenNA Linux 1.0 and all give me an "Error 1" after typing "make" but with no real reason given. Just a few standard/non-critical warning messages, and then suddenly "Error 1" Anybody successfully compile Rate Engine? The least cost routing module for Asterisk? Thanks in advance. ----------------- [root@dev rate-engine]# make cc -O3 -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -g -fno-in line-functions -D_REENTRANT -I/usr/include/pcre -DWITH_MYSQL -I/usr/include/ mysql -c -o rate_engine.o rate_engine.c rate_engine.c:60: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function) rate_engine.c: In function `cdr_ratecall': rate_engine.c:450: warning: implicit declaration of function `ast_channel_walk' rate_engine.c:450: warning: assignment makes pointer from integer without a cast rate_engine.c:450: warning: assignment makes pointer from integer without a cast rate_engine.c: In function `poster_worker': rate_engine.c:652: warning: unused parameter `arg' rate_engine.c: In function `rates_reload': rate_engine.c:1801: warning: unused parameter `argc' rate_engine.c:1801: warning: unused parameter `argv' rate_engine.c: In function `rates_status': rate_engine.c:1813: warning: unused parameter `argc' rate_engine.c:1813: warning: unused parameter `argv' make: *** [rate_engine.o] Error 1 [root@dev rate-engine]# -----------------
Deon Rodden wrote (on Jul 28):> I've tried to compile rate-engine 0.5.2 on Fedora Core 1, Redhat 9 and > OpenNA Linux 1.0 and all give me an "Error 1" after typing "make" but with > no real reason given. Just a few standard/non-critical warning messages, and > then suddenly "Error 1"There's a clue in the line that says "error" near the start...> rate_engine.c:60: error: > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' > undeclared here (not in a function)It needs updating to use a new version of the AST mutex definition macro. It's pretty trivial if you look at similar lines in the asterisk source. Chris. -- == chrisy@flirble.org
Deon Rodden [drodden@webunited.net] wrote:> I've tried to compile rate-engine 0.5.2 on Fedora Core 1, Redhat 9 and > OpenNA Linux 1.0 and all give me an "Error 1" after typing "make" but with > no real reason given. Just a few standard/non-critical warning messages, > and then suddenly "Error 1" > > rate_engine.c:60: error: > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' > undeclared here (not in a function) >The above doesn't look like a standard/non-critical warning to me. Perhaps there's an update for the source you have. I don't have that code myself, so I don't know. You could try contacting the author. If you have no joy there then search the code for lines like the following: static ast_mutex_t foo = AST_MUTEX_INITIALIZER; and change to: AST_MUTEX_DEFINE_STATIC(foo); I.e. do as the error message suggests and use AST_MUTEX_DEFINE_STATIC rather than AST_MUTEX_INITIALIZER. You should also correct those other "standard/non-critical warnings" while you're in there. If the code is GPLed then please submit your changes back to the author for inclusion in the next release. -- _/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h _/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz _/ _/ _/_/_/_/ _/ _/_/_/ _/ _/