[Modules] FreeBSD & Module mod_dbi_pool

Christian Lorenz chris at l-o-r-e-n-z.com
Fri Jan 28 09:10:19 EST 2005


Hi all,

i desperatly try to compile mod_dbi_pool because i want to test 
mod_vhost_dbi which depends on mod_dbi_pool.

I'm using FreeBSD 5.3 installed as minimal install from the miniISO

First i got the follwing error after:
# ./configure --with-apxs=/usr/local/sbin/apxs
# ...
#Configuration summary for mod_dbi_pool
#
#   * Apache modules directory = /usr/local/libexec/apache2
#   * libdbi Includes = -I/usr/local/include
#   * libdbi Libs = -L/usr/local/lib -ldbi

and

# make
# ...
# mod_dbi_pool.c:36: error: syntax error before "apr_reslist_t"
# mod_dbi_pool.c: In function `dbi_pool_post_config':
# mod_dbi_pool.c:277: warning: implicit declaration of function 
`apr_reslist_create'
# mod_dbi_pool.c:277: error: structure has no member named `pool'
# mod_dbi_pool.c: In function `dbipool_open':
# mod_dbi_pool.c:350: warning: implicit declaration of function 
`apr_reslist_acquire'
# mod_dbi_pool.c:350: error: structure has no member named `pool'
# mod_dbi_pool.c:350: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
# mod_dbi_pool.c: In function `dbipool_close':
# mod_dbi_pool.c:363: warning: implicit declaration of function 
`apr_reslist_release'
# mod_dbi_pool.c:363: error: structure has no member named `pool'
# *** Error code 1
# Stop in /usr/ports/distfiles/mod_dbi_pool-0.4.0/src.
# *** Error code 1
# Stop in /usr/ports/distfiles/mod_dbi_pool-0.4.0.

I found out that on FreeBSD the apache 'variable' (i'm not well in 
programming) "APR_HAS_THREADS" is set to "0" and that the declaration
"#ifdef APR_HAS_THREADS" in ./src/mod_dbi_pool.c (line 38) has to be 
changed to
"#if APR_HAS_THREADS". So far so well ... i did once again
./configure --with-apxs=/usr/local/sbin/apxs && make

but the follwing error occured:

# mod_dbi_pool.c: In function `dbi_pool_post_config':
# mod_dbi_pool.c:277: warning: implicit declaration of function 
`apr_reslist_create'
# mod_dbi_pool.c:277: error: structure has no member named `pool'
# mod_dbi_pool.c: In function `dbipool_open':
# mod_dbi_pool.c:350: warning: implicit declaration of function 
`apr_reslist_acquire'
# mod_dbi_pool.c:350: error: structure has no member named `pool'
# mod_dbi_pool.c:350: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
# mod_dbi_pool.c: In function `dbipool_close':
# mod_dbi_pool.c:363: warning: implicit declaration of function 
`apr_reslist_release'
# mod_dbi_pool.c:363: error: structure has no member named `pool'
# *** Error code 1
# Stop in /usr/ports/distfiles/mod_dbi_pool-0.4.0/src.
# *** Error code 1
# Stop in /usr/ports/distfiles/mod_dbi_pool-0.4.0.

I just had a second glance at the code and found that there are more 
"#ifdef APR_HAS_THREADS" that might be changed to "#if APR_HAS_THREADS" 
and so i did. configure and make spits out the follwing:

# mod_dbi_pool.c: In function `dbi_pool_post_config':
# mod_dbi_pool.c:288: warning: passing arg 1 of `dbipool_construct' from 
incompatible pointer type
# mod_dbi_pool.c:288: error: incompatible type for argument 2 of 
`dbipool_construct'
# mod_dbi_pool.c: In function `dbipool_open':
# mod_dbi_pool.c:347: warning: unused variable `ret'
# mod_dbi_pool.c: At top level:
# mod_dbi_pool.c:233: warning: 'dbipool_destruct' defined but not used
# *** Error code 1
# Stop in /usr/ports/distfiles/mod_dbi_pool-0.4.0/src.
# *** Error code 1
# Stop in /usr/ports/distfiles/mod_dbi_pool-0.4.0.

And now i'm kind of lost because my deeper sense of programming stops 
here: "passing arg 1 of `dbipool_construct' from incompatible pointer 
type". I don't know what else to do but i want this thing running. Can 
anybody just give me some hints??

Greets,

Chris



More information about the Modules mailing list