Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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_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.

share|improve this question

1 Answer 1

Solution 1 (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

Solution 2 (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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.