apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From koszi <ko...@mail.tvnet.hu>
Subject Re: apr_dbd_mysql.c
Date Tue, 02 May 2006 00:21:37 GMT

Hello folx,
I am experiencing similar problems, hope here is the right place for this...
My environment:
-UHU Linux 1.2 Office (Hungarian distro, Debian clone)
-MySQL Server (Ver 14.12 Distrib) 5.0.20 from source
Wanted to implement MySQL based user authentication under Apache:
-Installed apr 1.2.7 under /usr/local/apr : ./configure
--prefix=/usr/local/apr
-Got apr_dbd_mysql.c from their site, placed it under the source directory
in dbd as advised and Installed ap-util 1.2.7 under /usr/local/apr-util: 

****************************************************************************************************
./configure --with-mysql=/usr/local/include/mysql --with-apr=/usr/local/apr
--with-LDFLAGS=-L/usr/local/lib/mysql --prefix=/usr/local/apr-util
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking for working mkdir -p... yes
APR-util Version: 1.2.7
checking for chosen layout... apr-util
Applying apr-util hints file rules for i686-pc-linux-gnu
checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
  setting CFLAGS to " -g -O2 -pthread"
  setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
-D_LARGEFILE64_SOURCE"
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for ldap support...
checking for default DBM... sdbm (default)
checking libpq-fe.h usability... no
checking libpq-fe.h presence... no
checking for libpq-fe.h... no
configure: checking for mysql in /usr/local/include/mysql
checking mysql.h usability... no
checking mysql.h presence... no
checking for mysql.h... no
checking mysql/mysql.h usability... yes
checking mysql/mysql.h presence... yes
checking for mysql/mysql.h... yes
checking for mysql_init in -lmysqlclient_r... no
checking sqlite3.h usability... no
checking sqlite3.h presence... no
checking for sqlite3.h... no
checking sqlite.h usability... no
checking sqlite.h presence... no
checking for sqlite.h... no
checking for Expat in /usr... yes
  setting APRUTIL_EXPORT_LIBS to "-lexpat"
  setting APRUTIL_LDFLAGS to ""
  setting APRUTIL_LIBS to "/usr/lib/libexpat.la"
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for type of inbuf parameter to iconv... char **
checking for iconv.h... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for nl_langinfo... yes
checking for CODESET in langinfo.h... yes
checking for library containing crypt... -lcrypt
checking if system crypt() function is threadsafe... no
checking for crypt_r... yes
checking style of crypt_r... none
  adding "/usr/local/apr/lib/libapr-1.la" to APRUTIL_LIBS
  adding "-lrt" to APRUTIL_LIBS
  adding "-lcrypt" to APRUTIL_LIBS
  adding "-lpthread" to APRUTIL_LIBS
  adding "-ldl" to APRUTIL_LIBS
configure: creating ./config.status
config.status: creating Makefile
config.status: creating export_vars.sh
config.status: creating build/pkg/pkginfo
config.status: creating apr-util.pc
config.status: creating apu-1-config
config.status: creating include/private/apu_select_dbm.h
config.status: creating include/apr_ldap.h
config.status: creating include/apu.h
config.status: creating include/apu_want.h
config.status: creating test/Makefile
config.status: creating include/private/apu_config.h
config.status: include/private/apu_config.h is unchanged
config.status: executing default commands
****************************************************************************************************
apr_dbd_mysql.o IS actually generated, but not put anywhere in the target
directories. Where should it be placed normally upon installation? What
worries me the most is this  "checking for mysql_init in -lmysqlclient_r...
no"... I looked into the generated config script file and there, mysql_init
is tested like this:

...
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char mysql_init ();
int
main ()
{
mysql_init ();
  ;
  return 0;
}
_ACEOF
...
As I was led to understand,  the actual declaration of this is MYSQL*
mysql_init(MYSQL* mysql)...

Eventually:
-Installed apache 2.2.0:   ./configure --enable-dbd --enable-authn-dbd
--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
(After some googling I gathered that installing apr separately is supposed
to be the "safe way")
And after starting apache, I get this nasty  DBD: No driver for mysql  thing
:-(
Please HELP!
TIA+BR
Peter.

--
View this message in context: http://www.nabble.com/apr_dbd_mysql.c-t1451411.html#a4172297
Sent from the APR Dev (Apache Portable Runtime) forum at Nabble.com.


Mime
View raw message