Re: ERROR: Group 'mysql-connection' may not contain field 'mysql-username'

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization The Kannel Group
Message-ID <[email protected]>
Mike Harris wrote:

> I have just downloaded the latest stable release and have some issues
> compiling it.

BTW, we advice to use the current CVS HEAD which is a 1.4.1-rc stable, a lot of 
this have been fixed since 1.4.0 stable. (including the mysql vs kannel 
list_foobar() naming clash)

> 
> ./configure --prefix=/usr/local \
> --disable-wap \
> --enable-start-stop-daemon \
> --disable-ssl \
> --with-mysql \
> --with-mysql-dir=/usr/local/mysql \
> --with-dlr=mysql
> 
> When I run ./configure I get;
> 
> Configuring DB support ...
> checking whether to compile with MySQL support... searching
> checking for mysql_config... /usr/local/sbin/mysql_config
> checking mysql version... 5.0.13-rc
> checking mysql reentrant libs...  -L/usr/local/mysql/lib -lmysqlclient_r -lz
> -lpthread -lcrypt -lnsl -lm -lpthread
> checking for mysql_init in -lmysqlclient_r... yes
> checking mysql includes... -I/usr/local/mysql/include
> checking for mysql/mysql.h... no
> checking for mysql/mysql_version.h... no
> checking whether to compile with MySQL support... yes
> 
> So it appears to not find mysql/mysql.h - not surprising its in
> /usr/local/Mysql/include..
> So make depend fails with;
> 
> # make depend
> for dir in gw gw/smsc gwlib test utils wmlscript checks wap radius; do \
>         gcc -D_REENTRANT=1 -I. -Igw  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
> -I/usr/include/libxml2 -I/usr/local/mysql/include -MM $dir/*.c | sed "s:^[^
> ]:$dir/&:"; done > .depend
> gw/dlr_mysql.c:74:25: mysql/mysql.h: No such file or directory

which means the behaviour of mysql-4.x to mysql-5.x changed in the way the 
include header file layout is set while installation.

Which --prefix path did you use while compiling mysql? was it 
--prefix=/usr/local/mysql?

What is the output of 'mysql_config --include'?
Since configure depends on those value when the mysql_config binary is found.

If mysql-5.x does not prefix the header directory with an additional 'mysql' 
dir, then we need to change this to reflect latest mysql layout behaviour.

> If I hardcode all of the $loc to /usr/local/Mysql - make then does this;
> 
> make
> gcc -D_REENTRANT=1 -I. -Igw  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
> -I/usr/include/libxml2 -I/usr/local/mysql/include -o gw/dlr_mysql.o -c
> gw/dlr_mysql.c
> In file included from /usr/local/mysql/include/mysql.h:62,
>                  from gw/dlr_mysql.c:74:
> /usr/local/mysql/include/my_list.h:32: error: conflicting types for
> 'list_delete'
> ./gwlib/list.h:179: error: previous declaration of 'list_delete' was here
> /usr/local/mysql/include/my_list.h:32: error: conflicting types for
> 'list_delete'
> ./gwlib/list.h:179: error: previous declaration of 'list_delete' was here
> make: *** [gw/dlr_mysql.o] Error 1
> 
> I then find this;
> 
> "This issue has been fixed a while ago by renaming all list_* functions
> in gwlib to gwlist_*. Please use CVS HEAD. It's fairly stable"
> 
> So I download CVS HEAD, same problem with mysql/mysql.h so hardcode paths
> and it builds!!

ok, see above, please answer and we'll go on further with this. Obviously it 
would be better to file a bug report for this, with minor priority, simply to 
keep track of it... http://bugs.kannel.org/

> But when I try to run it;
> 
> /usr/local/sbin/bearerbox -- /etc/kannel/kannel.conf.cvs
> 2005-10-20 17:47:42 [3936] [0] INFO: Debug_lvl = -1, log_file = <none>,
> log_lvl = 0
> 2005-10-20 17:47:42 [3936] [0] DEBUG: Loading include file
> `/etc/kannel/modems.conf' (on line 17 of file /etc/kannel/kannel.conf.cvs).
> 2005-10-20 17:47:42 [3936] [0] ERROR: Group 'mysql-connection' may not
> contain field 'mysql-username'.
> 2005-10-20 17:47:42 [3936] [0] ERROR: Error found on line 164 of file
> `/etc/kannel/kannel.conf.cvs'.
> 2005-10-20 17:47:42 [3936] [0] PANIC: Couldn't read configuration from
> `/etc/kannel/kannel.conf.cvs'.
> 2005-10-20 17:47:42 [3936] [0] PANIC:
> /usr/local/sbin/bearerbox(gw_panic+0x174) [0x80cee60]
> 2005-10-20 17:47:42 [3936] [0] PANIC: /usr/local/sbin/bearerbox(main+0x17d)
> [0x8058b78]
> 2005-10-20 17:47:42 [3936] [0] PANIC:
> /lib/tls/libc.so.6(__libc_start_main+0xd3) [0x4ade23]
> 2005-10-20 17:47:42 [3936] [0] PANIC: /usr/local/sbin/bearerbox [0x8057e59]
> 
> #
>  
> # MySQL connection
> group = mysql-connection
> id = mydlr
> host = localhost
> mysql-username = xxx
> mysql-password = xxx
> database = xxx
> max-connections = 1
>  
> # MySQL config
> group = dlr-db
> id = mydlr
> table = dlr
> field-smsc = smsc
> field-timestamp = ts
> field-destination = destination
> field-service = service
> field-url = url
> field-mask = mask
> field-status = status
> field-source = source
> field-boxc-id = boxc
> 
> What am I doing wrong here? Help!

nothing... there has been a compatibility breaking change since 1.4.0 and cvs, 
see ChangeLog entry:

2005-09-21  Stipe Tolj  <[email protected]>
    Feature request #254 in order to set port values for mysql and pgsql
    database connection types. Used as DLR storage space.
    * gwlib/cfg.def: added config directive 'port' to 'myqsl|pgsql-connection'
      groups, changed mysql config directive names to 'username' and
      'password' to reflect the harmonization to others. (COMPATIBILITY BREAKER)
    * gwlib/dbpool.[ch]: added port value to mysql and pgsql confs, also
      renamed internal pgsql variables to be more harmonized.
    * gwlib/dbpool_[pgsql|myqsl].c: added port variable support and changed
      internal variable naming.
    * gw/dlr_[sdb|oracle].c: source code layout fixes. No logic change.
    * gw/dlr_[pgsql|mysql].c: added port variable support and minor source
      layout changes.

hence use 'username' and 'password' as config directive.

Stipe

mailto:stolj_{at}_wapme-group.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
-------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.