简体   繁体   中英

installation error apache httpd 2.4.9

I am installing Apache httpd-2.4.9 in linux redhat server, configure command successfully executed and while executing make command it shows the error as ( ). )。 Please find below and help me to resolve this.

$ make
...
...
apr_OFN_ap_proxy_retry_worker_t' undeclared
make[3]: Entering directory `/install/others/httpd-2.4.9/modules/ssl'
Building shared: mod_ssl.la
make[4]: Entering directory `/install/others/httpd-2.4.9/modules/ssl'
make[4]: Nothing to be done for `local-shared-build'.
make[4]: Leaving directory `/install/others/httpd-2.4.9/modules/ssl'
make[3]: Leaving directory `/install/others/httpd-2.4.9/modules/ssl'
make[3]: Entering directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
Building shared: mod_lbmethod_byrequests.la mod_lbmethod_bytraffic.la mod_lbmethod_bybusyness.la mod_lbmethod_heartbeat.la
make[4]: Entering directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
/install/others/httpd-2.4.9/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99  -g -O2 -pthread      -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I. -I/install/others/httpd-2.4.9/os/unix -I/install/others/httpd-2.4.9/include -I/install/others/httpd-2.4.9/srclib/apr/include -I/install/others/httpd-2.4.9/srclib/apr-util/include -I/install/others/httpd-2.4.9/srclib/apr-util/xml/expat/lib -I/install/others/apache2/include -I/install/others/httpd-2.4.9/modules/aaa -I/install/others/httpd-2.4.9/modules/cache -I/install/others/httpd-2.4.9/modules/core -I/install/others/httpd-2.4.9/modules/database -I/install/others/httpd-2.4.9/modules/filters -I/install/others/httpd-2.4.9/modules/ldap -I/install/others/httpd-2.4.9/modules/loggers -I/install/others/httpd-2.4.9/modules/lua -I/install/others/httpd-2.4.9/modules/proxy -I/install/others/httpd-2.4.9/modules/session -I/install/others/httpd-2.4.9/modules/ssl -I/install/others/httpd-2.4.9/modules/test -I/install/others/httpd-2.4.9/server -I/install/others/httpd-2.4.9/modules/arch/unix -I/install/others/httpd-2.4.9/modules/dav/main -I/install/others/httpd-2.4.9/modules/generators -I/install/others/httpd-2.4.9/modules/mappers -prefer-pic -c mod_lbmethod_byrequests.c && touch mod_lbmethod_byrequests.slo
mod_lbmethod_byrequests.c: In function 'find_best_byrequests':
<b>mod_lbmethod_byrequests.c:88: error: 'apr_OFN_ap_proxy_retry_worker_t' undeclared (first use in this function)
mod_lbmethod_byrequests.c:88: error: (Each undeclared identifier is reported only once
mod_lbmethod_byrequests.c:88: error: for each function it appears in.)
mod_lbmethod_byrequests.c:88: error: expected expression before ')' token
mod_lbmethod_byrequests.c:95: warning: implicit declaration of function 'APLOGNO'
mod_lbmethod_byrequests.c:96: error: expected ')' before string constant
mod_lbmethod_byrequests.c:97: warning: passing argument 6 of 'ap_log_error' makes pointer from integer without a cast
mod_lbmethod_byrequests.c:112: warning: implicit declaration of function 'PROXY_WORKER_IS_DRAINING'
mod_lbmethod_byrequests.c:142:69: error: invalid digit "8" in octal constant
mod_lbmethod_byrequests.c:143: error: expected ')' before string constant
mod_lbmethod_byrequests.c:144: warning: passing argument 6 of 'ap_log_error' makes pointer from integer without a cast
mod_lbmethod_byrequests.c: At top level:
mod_lbmethod_byrequests.c:177: warning: excess elements in struct initializer
mod_lbmethod_byrequests.c:177: warning: (near initialization for 'byrequests')
mod_lbmethod_byrequests.c:179: warning: excess elements in struct initializer
mod_lbmethod_byrequests.c:179: warning: (near initialization for 'byrequests')
mod_lbmethod_byrequests.c:190: warning: data definition has no type or storage class
mod_lbmethod_byrequests.c:190: warning: type defaults to 'int' in declaration of 'AP_DECLARE_MODULE'
mod_lbmethod_byrequests.c:190: warning: parameter names (without types) in function declaration
mod_lbmethod_byrequests.c:190: error: function 'AP_DECLARE_MODULE' is initialized like a variable
mod_lbmethod_byrequests.c:191: error: invalid initializer
mod_lbmethod_byrequests.c:191: error: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:192: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:192: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:193: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:193: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:194: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:194: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:195: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:195: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:196: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:196: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:198: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:198: warning: (near initialization for 'AP_DECLARE_MODULE')
make[4]: *** [mod_lbmethod_byrequests.slo] Error 1</b>
make[4]: Leaving directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
make[3]: *** [shared-build-recursive] Error 1
make[3]: Leaving directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
make[2]: *** [shared-build-recursive] Error 1
make[2]: Leaving directory `/install/others/httpd-2.4.9/modules'
make[1]: *** [shared-build-recursive] Error 1
make[1]: Leaving directory `/install/others/httpd-2.4.9'
make: *** [all-recursive] Error 1

Thanks,
Shanmugam A.

The compiler error:

error: 'apr_OFN_ap_proxy_retry_worker_t' undeclared (first use in this function)

While compiling 'mod_lbmethod_byrequests.c', and more specifically, while compiling the function 'find_best_byrequests()' (on line 88 of 'mod_lbmethod_byrequests.c'); the compiler came across a symbol 'apr_OFN_ap_proxy_retry_worker_t' which had not been properly defined.

This type of error is often overcome by including the .h file which defines the unknown symbol ('apr_OFN_ap_proxy_retry_worker_t') for the compiler.

I also got this problem while trying to install a new httpd to replace an older existing one. In my case, the problem seemed related to using $HOME/local as the libpcre location, which happened to also contain the old httpd installation (with old header files in $HOME/local/include). It seems that these installed old header files got in the way when compiling the new httpd. Removing the old httpd header files from $HOME/local/include solved the problem.

I ran into this issue today and was stumped for a little while. I came across this SO article and started looking through source code to try and figure out why apr_OFN_ap_proxy_retry_worker_t was undeclared. I followed the instructions for apr and apr-util (ie to download them into srclib) so I didn't understand why that apr variable was undeclared. Well, it turns out that it was "undeclared" because I had not used the --with-included-apr configure option. So, the system was using whatever relevant header files it could find. And, since I had an old install of Apache on the system, it found it in /usr/include or something like that. After adding --with-included-apr I was able to re-configure, make and successfully install Apache 2.4.10.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM