AIX缺少符号ap_cleanup_scoreboard和Apache进程的ap_accept_lock_mech。但是,符号确实存在

时间:2010-11-19 21:29:35

标签: mod-wsgi aix apache

我遇到一个问题,即apache无法找到从apache进程中加载​​的库(mod_wsgi)引用的某些符号。

当我启动apache进程时,我收到此错误。

+++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++

root [zibal]%。/ usr / local / apache2 / bin / apachectl restart httpd:/usr/local/apache2/conf/httpd.conf第53行的语法错误:无法加载/ usr / local / apache2 / modules / mod_wsgi.so进入服务器:

rtld:0712-001符号ap_cleanup_scoreboard是从模块/usr/local/apache2/modules/mod_wsgi.so()引用的,但未找到该符号的运行时定义。

rtld:0712-001符号ap_accept_lock_mech是从模块/usr/local/apache2/modules/mod_wsgi.so()引用的,但找不到符号的运行时定义

+++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++

我在apache可执行文件上粘贴了nm命令的输出,这些符号似乎存在。

+++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++

root [zibal]%nm ./usr/local/apache2/bin/httpd | grep ap_accept_lock_mech

ap_accept_lock_mech D 536880332

ap_accept_lock_mech d 536900392 4

ap_accept_lock_mech:G879 - 0

root [zibal]%nm ./usr/local/apache2/bin/httpd | grep ap_cleanup_scoreboard

.ap_cleanup_scoreboard T 268613428 212

ap_cleanup_scoreboard D 536890068

ap_cleanup_scoreboard d 536890068 12

ap_cleanup_scoreboard d 536899972 4

ap_cleanup_scoreboard:F385 - 2976 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++

请指导。

1 个答案:

答案 0 :(得分:0)

这就是我能够解决这个问题的方法(我必须按照以下说明应用两种解决方案)。

解决方案1(感谢Graham Dumpleton)

不要在Apache Code中更改任何内容。

进入mod_wsgi.c源代码并更改:

/ *     *清理Apache记分板以确保任何     *共享内存段或内存映射文件不     *可用于守护程序进程中的代码。     * /

ap_cleanup_scoreboard(0);

#if 0
       /*
        * Cleanup the Apache scoreboard to ensure that any
        * shared memory segments or memory mapped files not
        * available to code in daemon processes.
        */

       ap_cleanup_scoreboard(0);
#endif

然后寻找:

#if !defined(AP_ACCEPT_MUTEX_TYPE)
   sconfig->lock_mechanism = ap_accept_lock_mech;
#else
   sconfig->lock_mechanism = APR_LOCK_DEFAULT;
#endif

并将其更改为:

#define AP_ACCEPT_MUTEX_TYPE 1
#if !defined(AP_ACCEPT_MUTEX_TYPE)
   sconfig->lock_mechanism = ap_accept_lock_mech;
#else
   sconfig->lock_mechanism = APR_LOCK_DEFAULT;
#endif

然后构建mod_wsgi

解决方案2(感谢Apache的Jeff Trawick)

在目录中提取源tar球..... cd到该目录

找到文件include / mpm_common.h

Change
        extern apr_lockmech_e ap_accept_lock_mech;
to
        AP_DECLARE_DATA extern apr_lockmech_e ap_accept_lock_mech;

找到文件include / scoreboard.h

Change
        apr_status_t ap_cleanup_scoreboard(void *d);
to
        AP_DECLARE(apr_status_t) ap_cleanup_scoreboard(void *d);

然后发出以下命令

./configure
make

完成此步骤后,将在服务器中创建一个httpd.exp文件 目录和在当前目录中创建的httpd文件

删除httpd

编辑server / httpd.exp并为ap_accept_lock_mech添加一行

    make
    make install (as root)

然后从Source Tarball构建mod_wsgi 3.3

我希望这可以帮助其他人面对同样的问题。