Bug 19012 - mod_so can not be actived in AIX 5.1
Summary: mod_so can not be actived in AIX 5.1
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_so (show other bugs)
Version: 2.0.45
Hardware: Other other
: P3 critical (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-14 21:01 UTC by Tony Fan
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Fan 2003-04-14 21:01:40 UTC
Hi,

      I tried to build Apache 2.0.45 in my AIX 5.1 system. 
here is what I start to build:
./configure --enable-ssl=shared \
--with-ssl=/usr/local/ssl \
--enable-rule=SHARED_CORE \
--enable-module=so

everything is working fine then I do make
no error
make install no error
but when I relized mod_so doesn't work I went beck to check the config.log file.
it is showed:
..........
configure:14313: checking whether to enable mod_userdir
configure:14351: result: yes (default)
configure:14399: checking whether to enable mod_alias
configure:14437: result: yes (default)
configure:14486: checking whether to enable mod_rewrite
configure:14524: result: no
configure:14618: checking whether to enable mod_so
configure:14656: result:
configure:15020: checking whether byte ordering is bigendian
..........

somehow mod_so module can not be turned on

--Tony
Comment 1 Joshua Slive 2003-04-14 23:03:01 UTC
Try --enable-so or --enable-modules=so

(Have I mentioned how annoying it is that you can
--enable-whatever-you-want without getting an 
error message; yes, I think I have.)
Comment 2 Jeff Trawick 2003-04-14 23:18:38 UTC
Also, drop the --enable-rule=SHARED_CORE argument.  That too is Apache-1.3-style
configure argument which means nothing to Apache 2.0.

(But I suspect you have mod_so anyway...  mod_so defaults to on for most systems
(including AIX 5.1)...  Try ./httpd -l and see if mod_so.c is in the output.)

Also, there is a bug in the message generation.  As you noticed, nothing is
printed in the expected position to say yes or no or shared.
Comment 3 Tony Fan 2003-04-16 19:36:27 UTC
Thank you for the information.  I recomplired Aapche,  I check httpd -l to make 
sure I had mod_so,  but after I used JRun 4 connector to configure with Apache.
here is the error I am getting.
# ./apachectl start
Syntax error on line 1037 of /usr/local/apache2/conf/httpd.conf:
Cannot load /home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so into server: 

here is line 1037 from httpd.conf:
LoadModule jrun_module /home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so

this error most likely is mod_so doesn't work.  any ideal?
Comment 4 André Malo 2003-04-16 19:53:45 UTC
Ehm no, the error probably says, that mod_jrun doesn't work with that httpd version.

  Syntax error on line 1037 of /usr/local/apache2/conf/httpd.conf:
  Cannot load /home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so into server: 
  <here is the interesting part>

what is the interesting message?
Comment 5 Jeff Trawick 2003-04-16 19:58:39 UTC
Unfortunately, some Apache modules don't build properly
on AIX and an inability to load them is a frequent symptom.

See my fun at trying to get some Tomcat connectors to build properly 
on AIX: http://www.apache.org/~trawick/tomcataix.html

Send me privately the output of "dump -Tv mod_jrun20.so" and "dump -Hv
mod_jrun20.so" and I'll maybe have a guess as to why they won't load.
Comment 6 Tony Fan 2003-04-16 20:11:22 UTC
Here is result for dump -Tv mod_jrun20.so:

# dump -Tv /home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so

/home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so:

                        ***Loader Section***

                        ***Loader Symbol Table Information***
[Index]      Value      Scn     IMEX Sclass   Type           IMPid Name

[0]     0x00000000    undef      IMP     DS EXTref               . ap_add_cgi_va
rs
[1]     0x00000000    undef      IMP     DS EXTref               . ap_add_common
_vars
[2]     0x00000000    undef      IMP     DS EXTref               . ap_destroy_su
b_req
[3]     0x00000000    undef      IMP     DS EXTref               . ap_get_client
_block
[4]     0x00000000    undef      IMP     DS EXTref               . ap_log_error
[5]     0x00000000    undef      IMP     DS EXTref               . ap_os_escape_
path
[6]     0x00000000    undef      IMP     DS EXTref               . ap_rflush
[7]     0x00000000    undef      IMP     DS EXTref               . ap_rwrite
[8]     0x00000000    undef      IMP     DS EXTref               . ap_set_conten
t_length
[9]     0x00000000    undef      IMP     DS EXTref               . ap_setup_clie
nt_block
[10]    0x00000000    undef      IMP     DS EXTref               . ap_should_cli
ent_block
[11]    0x00000000    undef      IMP     DS EXTref               . ap_sub_req_lo
okup_uri
[12]    0x00000000    undef      IMP     UA EXTref   libc.a(shr.o) errno
[13]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) close
[14]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) socket
[15]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) send
[16]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) recv
[17]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) setsockopt
[18]    0x00000000    undef      IMP     UA EXTref   libc.a(shr.o) _system_confi
guration
[19]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) free
[20]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) malloc
[21]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strlen
[22]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) fopen
[23]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strncasecmp
[24]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) atoi
[25]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strchr
[26]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strtok
[27]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) fclose
[28]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) memset
[29]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) vsprintf
[30]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) sprintf
[31]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) fwrite
[32]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strncmp
[33]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) tolower
[34]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) fread
[35]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strdup
[36]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) ftell
[37]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) fseek
[38]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) time
[39]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) gettimeofday
[40]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strstr
[41]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) srand
[42]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) rand
[43]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strerror
[44]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) connect
[45]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) inet_addr
[46]    0x00000000    undef      IMP     DS EXTref   libc.a(shr.o) strcasecmp
[47]    0x20000580    .data      EXP     RW SECdef        [noIMid] jrun_module
[48]    0x200005b8    .data      EXP     RW SECdef        [noIMid] jrMetrics
[49]    0x200005c0    .data      EXP     RW SECdef        [noIMid] VARIABLE_NAME
S
[50]    0x2000089c    .data      EXP     DS SECdef        [noIMid] loadServersFr
omStore
[51]    0x200008a8    .data      EXP     DS SECdef        [noIMid] mappingsTable
New
[52]    0x200008b4    .data      EXP     DS SECdef        [noIMid] mappingsTable
Delete
[53]    0x200008c0    .data      EXP     DS SECdef        [noIMid] init_jrun_req
uest
[54]    0x200008cc    .data      EXP     DS SECdef        [noIMid] retrieveServe
rsFromServer
[55]    0x200008d8    .data      EXP     DS SECdef        [noIMid] persistServer
s
[56]    0x200008e4    .data      EXP     DS SECdef        [noIMid] longerThan
[57]    0x200008f0    .data      EXP     DS SECdef        [noIMid] removePathPar
ms
[58]    0x200008fc    .data      EXP     DS SECdef        [noIMid] jrunProxyNew
[59]    0x20000908    .data      EXP     DS SECdef        [noIMid] startSync
[60]    0x20000914    .data      EXP     DS SECdef        [noIMid] gtod
[61]    0x20000920    .data      EXP     DS SECdef        [noIMid] tvToMillis
[62]    0x2000092c    .data      EXP     DS SECdef        [noIMid] stopSync
[63]    0x20000938    .data      EXP     DS SECdef        [noIMid] initSync
[64]    0x20000944    .data      EXP     DS SECdef        [noIMid] getPropertyVa
lue
[65]    0x20000950    .data      EXP     DS SECdef        [noIMid] freePropertie
s
[66]    0x2000095c    .data      EXP     DS SECdef        [noIMid] describeError
[67]    0x20000968    .data      EXP     DS SECdef        [noIMid] parseProperti
es
[68]    0x20000974    .data      EXP     DS SECdef        [noIMid] getSession
[69]    0x20000980    .data      EXP     DS SECdef        [noIMid] addProperty
[70]    0x2000098c    .data      EXP     DS SECdef        [noIMid] removePropert
yByIndex
[71]    0x20000998    .data      EXP     DS SECdef        [noIMid] removePropert
y
[72]    0x200009a4    .data      EXP     DS SECdef        [noIMid] setProperty
[73]    0x200009b0    .data      EXP     DS SECdef        [noIMid] getPropertyVa
lue3
[74]    0x200009bc    .data      EXP     DS SECdef        [noIMid] getPropertyVa
lue2
[75]    0x200009c8    .data      EXP     DS SECdef        [noIMid] freePropertie
s1
[76]    0x200009d4    .data      EXP     DS SECdef        [noIMid] parseProperti
es1
[77]    0x200009e0    .data      EXP     DS SECdef        [noIMid] loadPropertie
s1
[78]    0x200009ec    .data      EXP     DS SECdef        [noIMid] loadPropertie
s
[79]    0x200009f8    .data      EXP     DS SECdef        [noIMid] getServerId
[80]    0x20000a04    .data      EXP     DS SECdef        [noIMid] getNextBuddy
[81]    0x20000a10    .data      EXP     DS SECdef        [noIMid] freeSync
[82]    0x20000c78     .bss      EXP     RW    BSS        [noIMid] jrun_rootdir
[83]    0x00000000    undef      IMP     DS EXTref              .. apr_palloc
[84]    0x00000000    undef      IMP     DS EXTref              .. apr_table_add
[85]    0x00000000    undef      IMP     DS EXTref              .. apr_table_set
[86]    0x00000000    undef      IMP     DS EXTref              .. apr_pstrdup
[87]    0x00000000    undef      IMP     DS EXTref              .. apr_table_get
[88]    0x00000000    undef      IMP     DS EXTref              .. apr_pstrcat
[89]    0x00000000    undef      IMP     DS EXTref              .. ap_hook_post_
config
[90]    0x00000000    undef      IMP     DS EXTref              .. ap_hook_child
_init
[91]    0x00000000    undef      IMP     DS EXTref              .. ap_hook_type_
checker
[92]    0x00000000    undef      IMP     DS EXTref              .. ap_hook_handl
er
[93]    0x00000000    undef      IMP     DS EXTref              .. ap_run_http_m
ethod
[94]    0x00000000    undef      IMP     DS EXTref              .. apr_table_elt
s
[95]    0x00000000    undef      IMP     DS EXTref              .. apr_table_set
n
[96]    0x00000000    undef      IMP     DS EXTref              .. apr_pool_clea
nup_register


--------------------------------------------------------------------------------
Here is a result for dump -Hv /home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so:

# dump -Hv /home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so

/home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so:

                        ***Loader Section***
                      Loader Header Information
VERSION#         #SYMtableENT     #RELOCent        LENidSTR
0x00000001       0x00000061       0x00000149       0x00000038

#IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
0x00000004       0x000018a4       0x00000470       0x000018dc


                        ***Import File Strings***
INDEX  PATH                          BASE                MEMBER
0      /usr/lib/threads:/usr/lib:/lib
1                                    libc.a              shr.o
2                                    .
3                                    ..
Comment 7 Jeff Trawick 2003-04-16 22:47:07 UTC
dang it, I think it is a build problem related to the display issue you noted
back at square one...  your DSO looks great

try this:

$ cd /path/to/httpd-2.0.45
$ grep HTTPD_LDFLAGS build/config_vars.mk

I bet the output is simply

HTTPD_LDFLAGS = 

when it should be something similar to 

HTTPD_LDFLAGS = -Wl,-uXML_Parse -Wl,-bE:/path/to/server/httpd.exp

The lack of the weird "-Wl,-bE:" option means that httpd doesn't export the
Apache API to DSOs, subsequently leading to DSOs failing to load.

Depending on how mod_so gets enabled, the variable $enable_so may or may not get
set, and if it isn't set then the right LDFLAGS for linking httpd don't get
initialized.

If you verify that HTTPD_LDFLAGS is an empty string, here is a work-around that
worked for me:  Add "--enable-so" to your Apache configure invocation, as in

make distclean && ./configure --enable-so --other-opts && make && make install

By explicitly turning on mod_so (using the Apache 2 option this time :) ), we
avoid the bug.
Comment 8 Jeff Trawick 2003-04-17 02:46:18 UTC
This has been fixed in 2.1-dev, and if nobody complains about the fix
in the next few days I'll propose it for merging into 2.0.46-dev.

Until then, specify --enable-so.
Comment 9 Tony Fan 2003-04-17 16:13:08 UTC
I recompiled as your suggection. 
after that I check:
1. config.log (I can see mod_so turned on YES)
2. HTTPD_LDFLAGS = -Wl,-uXML_Parse -Wl,-bE:/path/to/server/httpd.exp
3. httpd -l showed mod_so

but when I start up Aapche still got same error.
# ./apachectl start
Syntax error on line 1037 of /usr/local/apache2/conf/httpd.conf:
Cannot load /home/tfan/jrun4/lib/wsconfig/1/mod_jrun20.so into server: 
Comment 10 Jeff Trawick 2003-04-17 16:21:25 UTC
plz send me off-line (trawick@apache.org) the output of

 dump -Tv /path/to/new/httpd

(the one picked up by your still-failing ./apachectl start)
Comment 11 Jeff Trawick 2003-06-18 02:32:47 UTC
ISTR hearing off-line that the Apache build was corrected with the --enable-so
work-around, and that further work was going to be done with the 3rd-party
module build to see why it wasn't loading.

Re-open the PR if there is still a problem with httpd not exporting symbols.