开发者

AIX Missing Symbols ap_cleanup_scoreboard and ap_accept_lock_mech for Apache Process. However, the symbols do exist

开发者 https://www.devze.com 2023-01-25 20:03 出处:网络
I am having a problem whereby apache is not able to find certain symbols referenced from a library (mod_wsgi) loaded within the apache process.

I am having a problem whereby apache is not able to find certain symbols referenced from a library (mod_wsgi) loaded within the apache process.

When i start the apache process, i get this error.

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

root [zibal]% ./usr/local/apache2/bin/apachectl restart httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_wsgi.so into server:

rtld:0712-001 Symbol ap_cleanup_scoreboard was referenced from module /usr/local/apache2/modules/mod_wsgi.so(), but a runtime definition of the symbol was not found.

rtld: 0712-001 Symbol ap_accept_lock_mech was referenced from module /usr/local/apache2/modules/mod_wsgi.so(), but a runtime definition of the symbol was not found

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

I am pasting the output of nm command on the apache executable and those symbols seem to exist.

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

root [zibal]% nm ./usr/local/apache2/bin/httpd | grep ap_accept_lock开发者_JAVA技巧_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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Please guide.


And this is how I was able to solve this issue (I had to do apply two solutions as indicated below).

Solution 1 (Thanks to Graham Dumpleton)

Don't change anything in Apache Code.

Go into mod_wsgi.c source code and change:

/* * 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);

to

#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

and then look for:

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

and change it to:

#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

Then build mod_wsgi

Solution 2 (Thanks to Jeff Trawick from Apache)

Extract the Source tar ball in a directory.....cd into that directory

Locate the file 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;

Locate the file include/scoreboard.h

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

And then issue the following commands

./configure
make

After this step, there will be a httpd.exp file create in the server directory and a httpd file created in the present directory

remove httpd

edit server/httpd.exp and add one line for ap_accept_lock_mech

    make
    make install (as root)

Then build mod_wsgi 3.3 from Source Tarball

I hope this helps others facing the same problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号