Hi Jeff,

Your solution helped me overcome 1 of those 2 missing symbol reference but 1
still remains. Could you please guide me for this one too.

This is the error now.

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_accept_lock_mech was referenced from module
/usr/local/apache2/modules/mod_wsgi.so(), but a runtime definition of the
symbol was not found.

Here is the mpm_common.h for me

  +300  #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
  +301  AP_DECLARE_DATA extern apr_lockmech_e ap_accept_lock_mech;
  +302  extern const char ap_valid_accept_mutex_string[];
  +303  const char *ap_mpm_set_accept_lock_mech(cmd_parms *cmd, void *dummy,
  +304                                          const char *arg);

Thanks again for your help on this.

Regards,
Anurag

On Mon, Nov 22, 2010 at 2:36 AM, Jeff Trawick <traw...@gmail.com> wrote:

> On Sun, Nov 21, 2010 at 3:22 PM, Anurag Chourasia
> <anurag.choura...@gmail.com> wrote:
> > All,
> > I hope you could help me with a mod_wsgi load error upon startup of
> apache.
> > This is affecting one of our site Go Live and I would appreciate any help
> > offered in this regard.
> > The error upon startup of Apache is as follows
> > 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.
>
> those two functions aren't APIs (not expected to be called by
> modules), so maybe they aren't visible?
>
> perhaps there are special instructions *somewhere* from someone who
> has gotten mod_wsgi to work on AIX, as it is not supposed to work
>
> patch httpd with this, rebuild completely, and see if that gets you
> going; the two missing symbols should be exported with this patch
>
> Index: include/mpm_common.h
> ===================================================================
> --- include/mpm_common.h        (revision 1034992)
> +++ include/mpm_common.h        (working copy)
> @@ -298,7 +298,7 @@
>  * The system mutex implementation to use for the accept mutex.
>  */
>  #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
> -extern apr_lockmech_e ap_accept_lock_mech;
> +AP_DECLARE_DATA extern apr_lockmech_e ap_accept_lock_mech;
>  extern const char ap_valid_accept_mutex_string[];
>  const char *ap_mpm_set_accept_lock_mech(cmd_parms *cmd, void *dummy,
>                                         const char *arg);
> Index: include/scoreboard.h
> ===================================================================
> --- include/scoreboard.h        (revision 1034992)
> +++ include/scoreboard.h        (working copy)
> @@ -178,7 +178,7 @@
>  apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int
> detached);
>  void ap_init_scoreboard(void *shared_score);
>  AP_DECLARE(int) ap_calc_scoreboard_size(void);
> -apr_status_t ap_cleanup_scoreboard(void *d);
> +AP_DECLARE(apr_status_t) ap_cleanup_scoreboard(void *d);
>
>  AP_DECLARE(void) ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t
> *p,
>                                      int child_num, int thread_num);
>
>
> >
> > 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
> >
> > I am wondering if there is a way to statically link mod_wsgi into apache?
> > Please guide.
> > I built Apache 2.2.17 and Mod_Wsgi 3.3 using the source and the compiler
> was
> > gcc-4.2.
> >
> > Here is the Apache Build Information
> > =====================================
> > root [zibal]% ./usr/local/apache2/bin/httpd -V
> > Server version: Apache/2.2.17 (Unix)
> > Server built:   Nov 18 2010 05:04:25
> > Server's Module Magic Number: 20051115:25
> > Server loaded:  APR 1.4.2, APR-Util 1.3.10
> > Compiled using: APR 1.4.2, APR-Util 1.3.10
> > Architecture:   32-bit
> > Server MPM:     Prefork
> >  threaded:     no
> >    forked:     yes (variable process count)
> > Server compiled with....
> >  -D APACHE_MPM_DIR="server/mpm/prefork"
> >  -D APR_HAS_SENDFILE
> >  -D APR_HAS_MMAP
> >  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> >  -D APR_USE_SYSVSEM_SERIALIZE
> >  -D APR_USE_PTHREAD_SERIALIZE
> >  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> >  -D APR_HAS_OTHER_CHILD
> >  -D AP_HAVE_RELIABLE_PIPED_LOGS
> >  -D DYNAMIC_MODULE_LIMIT=128
> >  -D HTTPD_ROOT="/usr/local/apache2"
> >  -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
> >  -D DEFAULT_PIDLOG="logs/httpd.pid"
> >  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> >  -D DEFAULT_LOCKFILE="logs/accept.lock"
> >  -D DEFAULT_ERRORLOG="logs/error_log"
> >  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> >  -D SERVER_CONFIG_FILE="conf/httpd.conf"
> > Contents of config.nice file are as follows
> > ++++++++++++++++++++++++
> > #! /bin/sh
> > #
> > # Created by configure
> > CC="gcc"; export CC
> > "./configure" \
> > "CC=gcc" \
> > "$@"
> > ++++++++++++++++++++++++
> >
> >
> > Information about Apache Modules Loaded
> > =======================================
> > root [zibal]% ./usr/local/apache2/bin/httpd -l
> > Compiled in modules:
> >  core.c
> >  mod_authn_file.c
> >  mod_authn_default.c
> >  mod_authz_host.c
> >  mod_authz_groupfile.c
> >  mod_authz_user.c
> >  mod_authz_default.c
> >  mod_auth_basic.c
> >  mod_include.c
> >  mod_filter.c
> >  mod_log_config.c
> >  mod_env.c
> >  mod_setenvif.c
> >  mod_version.c
> >  prefork.c
> >  http_core.c
> >  mod_mime.c
> >  mod_status.c
> >  mod_autoindex.c
> >  mod_asis.c
> >  mod_cgi.c
> >  mod_negotiation.c
> >  mod_dir.c
> >  mod_actions.c
> >  mod_userdir.c
> >  mod_alias.c
> >  mod_so.c
> >
> > In httpd.conf, i only have the following LoadModule Statement
> > =============================================================
> > LoadModule wsgi_module modules/mod_wsgi.so
> > Information about Global Accept Mutex
> > =====================================
> > Valid accept mutexes for this platform and MPM are: default, fcntl,
> > sysvsem, posixsem, pthread.
> > Alo, here is my build session transcript while building
> mod_wsgi.....There
> > was absolutely no error during build.
> > root [zibal]% make
> >         /usr/local/apache2/bin/apxs -c -I/usr/local/include/python2.6
> > -DNDEBUG   mod_wsgi.c -L/usr/local/lib -L/usr/local/lib/python2.6/config
> >  -lpython2.6 -ldl -lm
> > /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
> > -U__STR__ -D_THREAD_SAFE -D_USE_IRS -D_LARGEFILE64_SOURCE -g -O2 -pthread
> > -I/usr/local/apache2/include  -I/usr/local/apache2/include
> > -I/usr/local/apache2/include -I/usr/local/include
> > -I/usr/local/include/python2.6 -DNDEBUG  -c -o mod_wsgi.lo mod_wsgi.c &&
> > touch mod_wsgi.slo
> > /usr/local/apache2/build/libtool --silent --mode=link gcc -o mod_wsgi.la
> >  -rpath /usr/local/apache2/modules -module -avoid-version  -Wl,-brtl
> >  mod_wsgi.lo -L/usr/local/lib -L/usr/local/lib/python2.6/config
> -lpython2.6
> > -ldl -lm
> > Target "all" is up to date.
> > root [zibal]% make install
> >         /usr/local/apache2/bin/apxs -i -S
> > LIBEXECDIR=/usr/local/apache2/modules -n 'mod_wsgi' mod_wsgi.la
> > /usr/local/apache2/build/instdso.sh
> > SH_LIBTOOL='/usr/local/apache2/build/libtool' mod_wsgi.la
> > /usr/local/apache2/modules
> > rm -f /usr/local/apache2/modules/mod_wsgi.so
> > /usr/local/apache2/build/libtool --mode=install cp mod_wsgi.la
> > /usr/local/apache2/modules/
> > cp .libs/mod_wsgi.so /usr/local/apache2/modules/mod_wsgi.so
> > cp .libs/mod_wsgi.lai /usr/local/apache2/modules/mod_wsgi.la
> > cp .libs/mod_wsgi.a /usr/local/apache2/modules/mod_wsgi.a
> > chmod 644 /usr/local/apache2/modules/mod_wsgi.a
> > ranlib /usr/local/apache2/modules/mod_wsgi.a
> > ----------------------------------------------------------------------
> > Libraries have been installed in:
> >    /usr/local/apache2/modules
> > If you ever happen to want to link against installed libraries
> > in a given directory, LIBDIR, you must either use libtool, and
> > specify the full pathname of the library, or use the `-LLIBDIR'
> > flag during linking and do at least one of the following:
> >    - add LIBDIR to the `LIBPATH' environment variable
> >      during execution
> >    - use the
> >
> `-Wl,-blibpath:LIBDIR:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/../../..:/usr/lib:/lib
> > ' linker flag
> > See any operating system documentation about shared libraries for
> > more information, such as the ld(1) and ld.so(8) manual pages.
> > ----------------------------------------------------------------------
> > chmod 755 /usr/local/apache2/modules/mod_wsgi.so
> > Please let me know if I should provide some additional information.
> > Regards,
> > Anurag
>
>
>
> --
> Born in Roswell... married an alien...
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Reply via email to