Mosiuoa Tsietsi
2006-Nov-04 05:19 UTC
[asterisk-users] app_prepaid won't load - undefined symbol mysql_num_fields
Hi all, I am running Fedora Core 5 on an Intel Server board with 2GB memory and kernel 2.6.18-1.2798.fc6 . I am running asterisk-1.2.10 from bristuff-0.3.0-PRE-1s. I have a mysql-version of app_prepaid which builds properly but when I run asterisk -gc I get the following: [root@myserver /]# asterisk -gc Asterisk 1.2.10-BRIstuffed-0.3.0-PRE-1s, Copyright (C) 1999 - 2006 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'show license' for details. ========================================================================[ Booting...Nov 4 14:06:41 NOTICE[2914]: cdr.c:1191 do_reload: CDR simple logging enabled. .Nov 4 14:06:41 WARNING[2914]: cdr_addon_mysql.c:361 my_load_module: MySQL database sock file not specified. Using default Nov 4 14:06:42 WARNING[2914]: loader.c:325 __load_resource: /usr/lib/asterisk/modules/app_prepaid.so: undefined symbol: mysql_num_fields Nov 4 14:06:42 WARNING[2914]: loader.c:499 load_modules: Loading module app_prepaid.so failed! The mysql_num_fields(MYSQL_RES) method is defined in my mysql.h file in /usr/include/mysql so I'm not sure what the problem is. Any help appreciated. Thanks. -- The Law of Unintended Consequences: for every action, there is an excellent chance of producing an opposite and totally disproportionate reaction. - Clyde Haberman
Tzafrir Cohen
2006-Nov-04 12:42 UTC
[asterisk-users] app_prepaid won't load - undefined symbol mysql_num_fields
On Sat, Nov 04, 2006 at 02:24:24PM +0200, Mosiuoa Tsietsi wrote:> Hi all, > > I am running Fedora Core 5 on an Intel Server board with 2GB memory and > kernel 2.6.18-1.2798.fc6 . I am running asterisk-1.2.10 from > bristuff-0.3.0-PRE-1s. I have a mysql-version of app_prepaid which > builds properlyVs. what copy of Asterisk? With bristuff?> but when I run asterisk -gc I get the following: > > [root@myserver /]# asterisk -gc > Asterisk 1.2.10-BRIstuffed-0.3.0-PRE-1s, Copyright (C) 1999 - 2006 > Digium, Inc. and others. > Created by Mark Spencer <markster@digium.com> > Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for > details. > This is free software, with components licensed under the GNU General > Public > License version 2 and other licenses; you are welcome to redistribute it > under > certain conditions. Type 'show license' for details. > ========================================================================> [ Booting...Nov 4 14:06:41 NOTICE[2914]: cdr.c:1191 do_reload: CDR > simple logging enabled. > .Nov 4 14:06:41 WARNING[2914]: cdr_addon_mysql.c:361 my_load_module: > MySQL database sock file not specified. Using default > Nov 4 14:06:42 WARNING[2914]: loader.c:325 > __load_resource: /usr/lib/asterisk/modules/app_prepaid.so: undefined > symbol: mysql_num_fieldsThis one should come from res_config_mysql.so . Have you built asterisk-addons ? -- Tzafrir Cohen icq#16849755 jabber:tzafrir@jabber.org +972-50-7952406 mailto:tzafrir.cohen@xorcom.com http://www.xorcom.com iax:guest@local.xorcom.com/tzafrir
Mosiuoa Tsietsi
2006-Nov-04 14:02 UTC
[asterisk-users] app_prepaid won't load - undefined symbol mysql_num_fields
Hi again, I downloaded the bristuff-0.3.0-PRE-1s.tar.gz archive from http://www.junghanns.net which has a script you can run to download the sources for asterisk (1.2.10), libpri (1.2.3) and zaptel (1.2.6). It also has patches for the above as well. Another script helps build the sources for each for you one-time. Asterisk build properly and when I copy across my app_prepaid.c file into */apps folder, I can successfully run $ make clean && make && make install I separately have the sources for asterisk-addons-1.2.4 in which I have successfully run $ make clean && make install after I have built asterisk. It's when I try $ asterisk -gcvvvvvvvv that I get the error: [ Booting...Nov 4 22:49:49 NOTICE[1861]: cdr.c:1191 do_reload: CDR simple logging enabled. .Nov 4 22:49:49 WARNING[1861]: cdr_addon_mysql.c:361 my_load_module: MySQL database sock file not specified. Using default Nov 4 22:49:49 WARNING[1861]: loader.c:325 __load_resource: /usr/lib/asterisk/modules/app_prepaid.so: undefined symbol: mysql_num_fields Nov 4 22:49:49 WARNING[1861]: loader.c:499 load_modules: Loading module app_prepaid.so failed! The line in question in the source (app_prepaid.c) is : num_fields = mysql_num_fields(result); where result is of type *MYSQL_RES, which is defined in my mysql.h header. Please help.