Re: [PATCH] make sure mod_jk for Apache 2 is linked like apxs wouldhave done it

2003-06-19 Thread Jeff Trawick
jean-frederic clere wrote:

That needs a little more, because the *.lo files are in common are build 
before using LIBTOOL instead apxs.

When using the actual make in apache-2.0 the common/*.c are compiled and 
left in apache-2.0 but apxs looks for the *.lo in common: (that is with 
2.0.40)
+++
gcc: ../common/jk_ajp14_worker.lo: No such file or directory
gcc: ../common/jk_md5.lo: No such file or directory
gcc: ../common/jk_ajp_common.lo: No such file or directory
gcc: ../common/jk_context.lo: No such file or directory
make: *** [mod_jk.la] Error 1
[EMAIL PROTECTED]:~/jakarta-tomcat-connectors/jk/native/apache-2.0 
+++

Using VPATH=.:../common in Makefile and JK= solves the problem but 
force to use gnu make.
hmm... straight configure and GNU make (native make won't work with 
mod_jk* on AIX) and it works

any chance that it worked with GNU make without any additional changes? 
(not saying that is good, just wondering if that is why I didn't see 
this issue)

or maybe there is some path-related configure option I didn't test with?

did you hit the problem on any of {Linux, AIX, FreeBSD, Tru64, Solaris, 
HP-UX}?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [PATCH] make sure mod_jk for Apache 2 is linked like apxs wouldhave done it

2003-06-19 Thread Jeff Trawick
jean-frederic clere wrote:

gmake in jakarta-tomcat-connectors/jk/native builds correctly.
It fails only if apxs -q LIBTOOLS does not work and Apache-2.0 
libtools is incompatible with the system one.
btw...  when does apxs -q LIBTOOL not work?  apache 2.0.40?

or maybe there is some path-related configure option I didn't test with?


cd jakarta-tomcat-connectors/jk/native
gmake clean
cd apache-2.0; gmake
That should fail.
sure, but it fails for me without my patch

/bin/sh /home/trawick/gcc_httpd_mod_jk2/install/build/libtool --silent 
--mode=link gcc -I/home/trawick/gcc_httpd_mod_jk2/install/include -g -O2 
-DUSE_APACHE_MD5 -I ../common  -I /include -I /include/unix -U__STR__ 
-D_USE_IRS -g -O2 -mthreads -g -O2 -g -O2 -mthreads -U__STR__ -D_USE_IRS 
-o mod_jk.la -module -rpath 
/home/trawick/gcc_httpd_mod_jk2/install/modules -avoid-version mod_jk.lo 
../common/jk_ajp12_worker.lo ../common/jk_connect.lo 
../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo 
../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo 
../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo 
../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo 
../common/jk_ajp14_worker.lo ../common/jk_md5.lo 
../common/jk_ajp_common.lo ../common/jk_context.lo
nm: ../common/jk_ajp12_worker.o: 0654-200 Cannot open the specified file.
(and a bunch of other errors)

did you hit the problem on any of {Linux, AIX, FreeBSD, Tru64, 
Solaris, HP-UX}?


vtxclere is a Linux box.
Linux with Apache 2.0.40?  RH 9 by any chance?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[PATCH] fix type mismatch in apache-2.0/mod_jk.c

2003-06-18 Thread Jeff Trawick
3rd parm to apr_file_write() should be apr_size_t, not unsigned
Index: jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
retrieving revision 1.76
diff -u -r1.76 mod_jk.c
--- jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c 16 May 2003 00:36:18 
-  1.76
+++ jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c 18 Jun 2003 12:39:39 
-
@@ -2032,7 +2032,7 @@
 (l-level = level || level == JK_LOG_REQUEST_LEVEL) 
 l-logger_private  what) {
 unsigned sz = strlen(what);
-unsigned wrote = sz;
+apr_size_t wrote = sz;
 char error[256];
 if(sz) {
 apr_status_t status;

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

[PATCH] make sure mod_jk for Apache 2 is linked like apxs would havedone it

2003-06-18 Thread Jeff Trawick
This fixes mod_jk segfaults when gcc is used to build mod_jk with gcc on 
AIX.  Currently, the -brtl ld flag is missing.  Linking with apxs takes 
care of that and, in general, can clear up other differences.

According to the comment, apxs wasn't used because it compiles all files 
every time, but passing in .lo files instead of .c files will do the 
right thing and keep some unnecessary details out of the mod_jk build.

Also added was a comment to mention why repeatedly running make will 
keep attempting to create mod_jk (unsucessfully).
Index: jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in,v
retrieving revision 1.15
diff -u -r1.15 Makefile.in
--- jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in  9 Sep 2002 15:35:49 
-   1.15
+++ jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in  18 Jun 2003 12:40:03 
-
@@ -59,11 +59,13 @@
@echo 
 
  Dynamic .so file 
-# APXS will compile every file, this is derived from apxs
+# use APXS to link since it includes any special ldflags
 
 mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)
-   $(LIBTOOL) --mode=link ${COMPILE} -o $@ -module -rpath ${libexecdir} 
-avoid-version mod_jk.lo $(APACHE_OBJECTS)
+   $(APXS) -o $@ mod_jk.lo $(APACHE_OBJECTS)
 
+# this doesn't work on every platform, since libtool sometimes
+# will install foo.la as libfoo.so or libfoo.dl
 mod_jk.so: mod_jk.la
$(LIBTOOL) --mode=install cp $ `pwd`/$@
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

[RESEND PATCH] fix syntax error in mod_jk2 file jk_channel_apr_socket.c

2003-04-03 Thread Jeff Trawick
resending in hopes that comments will be received telling me what to 
change or that the patch will be committed or that somebody will commit 
some alternate fix

 Original Message 
Subject: Re: [Fwd: [PATCH] fix syntax error in mod_jk2 file 
jk_channel_apr_socket.c]
Date: Fri, 21 Mar 2003 08:41:18 -0500
From: Jeff Trawick [EMAIL PROTECTED]
Reply-To: Tomcat Developers List [EMAIL PROTECTED], 
[EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
References: [EMAIL PROTECTED] [EMAIL PROTECTED]

Henri Gomez wrote:
Better rewrite it like :

if (remote_sa-next)
env-l-jkLog(env,
env-l,
JK_LOG_DEBUG,
channelApr.open(): error %d creating socket %d %s\n,
ret,
socketInfo-host);
else
env-l-jkLog(env,
env-l,
JK_LOG_ERROR,
channelApr.open(): error %d creating socket %d %s\n,
ret,
socketInfo-host);


Such a patch is attached.

Thanks for your response,

Jeff

Index: common/jk_channel_apr_socket.c
===
RCS file: 
/home/cvspublic/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v
retrieving revision 1.29
diff -u -r1.29 jk_channel_apr_socket.c
--- common/jk_channel_apr_socket.c  4 Feb 2003 07:39:59 -   1.29
+++ common/jk_channel_apr_socket.c  21 Mar 2003 13:38:14 -
@@ -226,9 +226,16 @@
 if ((ret = apr_socket_create(sock, remote_sa-family, SOCK_STREAM,
  (apr_pool_t *)env-globalPool-_private))
 != APR_SUCCESS) {
-env-l-jkLog(env, env-l, remote_sa-next ? JK_LOG_DEBUG : JK_LOG_ERROR,
- channelApr.open(): error %d creating socket %d %s\n,
-  ret, socketInfo-host);
+if (remote_sa-next) {
+env-l-jkLog(env, env-l, JK_LOG_DEBUG,
+  channelApr.open(): error %d creating socket %d %s\n,
+  ret, socketInfo-host);
+}
+else {
+env-l-jkLog(env, env-l, JK_LOG_ERROR,
+  channelApr.open(): error %d creating socket %d %s\n,
+  ret, socketInfo-host);
+}
 remote_sa = remote_sa-next;
 continue;
 }
@@ -255,11 +262,20 @@
 /* if an error occurred, loop round and try again */
 if (ret != APR_SUCCESS) {
 apr_socket_close(sock);
-env-l-jkLog(env, env-l, remote_sa-next ? JK_LOG_DEBUG : JK_LOG_ERROR,
- channelApr.open() attempt to connect to %pI (%s) failed 
%d\n,
- remote_sa,
- socketInfo-host,
- ret);
+if (remote_sa-next) {
+env-l-jkLog(env, env-l, JK_LOG_DEBUG,
+  channelApr.open() attempt to connect to %pI (%s) 
failed %d\n,
+  remote_sa,
+  socketInfo-host,
+  ret);
+}
+else {
+env-l-jkLog(env, env-l, JK_LOG_ERROR,
+  channelApr.open() attempt to connect to %pI (%s) 
failed %d\n,
+  remote_sa,
+  socketInfo-host,
+  ret);
+}
 remote_sa = remote_sa-next;
 continue;
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

[Fwd: [PATCH] fix syntax error in mod_jk2 file jk_channel_apr_socket.c]

2003-03-21 Thread Jeff Trawick
(reposting)

If someone can give me a clue and suggest a better venue for getting 
this bug fixed, please let me know.

Note that gcc complains about this code too, but doesn't consider it a 
fatal error.

 Original Message 
Subject: [PATCH] fix syntax error in mod_jk2 file jk_channel_apr_socket.c
Date: Thu, 13 Mar 2003 08:28:44 -0500
From: Jeff Trawick [EMAIL PROTECTED]
Reply-To: Tomcat Developers List [EMAIL PROTECTED], 
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]

I saw the error with IBM's native compiler for AIX, but it doesn't seem
to be a matter of extreme pickiness.
Here are the error messages:

../../common/jk_channel_apr_socket.c, line 229.56: 1506-226 (S) The
: operator is not allowed between int and char[37].
../../common/jk_channel_apr_socket.c, line 258.56: 1506-226 (S) The
: operator is not allowed between int and char[37].
The code in error is

  remote_sa-next ? JK_LOG_DEBUG : JK_LOG_ERROR,

It looks simple enough, but JK_LOG_DEBUG and JK_LOG_ERROR expand to

__FILE__, __LINE__, something_else

so what the compiler actually sees is a mess.

Here is a fix:

http://www.apache.org/~trawick/jk2_cc_patch_20030313

(Funny, this code looks a lot like some I hacked in Apache 2's mod_proxy.)

Thanks,

Jeff

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Fwd: [PATCH] fix syntax error in mod_jk2 file jk_channel_apr_socket.c]

2003-03-21 Thread Jeff Trawick
Henri Gomez wrote:
Better rewrite it like :

if (remote_sa-next)
env-l-jkLog(env,
env-l,
JK_LOG_DEBUG,
channelApr.open(): error %d creating socket %d %s\n,
ret,
socketInfo-host);
else
env-l-jkLog(env,
env-l,
JK_LOG_ERROR,
channelApr.open(): error %d creating socket %d %s\n,
ret,
socketInfo-host);


Such a patch is attached.

Thanks for your response,

Jeff
Index: common/jk_channel_apr_socket.c
===
RCS file: 
/home/cvspublic/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v
retrieving revision 1.29
diff -u -r1.29 jk_channel_apr_socket.c
--- common/jk_channel_apr_socket.c  4 Feb 2003 07:39:59 -   1.29
+++ common/jk_channel_apr_socket.c  21 Mar 2003 13:38:14 -
@@ -226,9 +226,16 @@
 if ((ret = apr_socket_create(sock, remote_sa-family, SOCK_STREAM,
  (apr_pool_t *)env-globalPool-_private))
 != APR_SUCCESS) {
-env-l-jkLog(env, env-l, remote_sa-next ? JK_LOG_DEBUG : JK_LOG_ERROR,
- channelApr.open(): error %d creating socket %d %s\n,
-  ret, socketInfo-host);
+if (remote_sa-next) {
+env-l-jkLog(env, env-l, JK_LOG_DEBUG,
+  channelApr.open(): error %d creating socket %d %s\n,
+  ret, socketInfo-host);
+}
+else {
+env-l-jkLog(env, env-l, JK_LOG_ERROR,
+  channelApr.open(): error %d creating socket %d %s\n,
+  ret, socketInfo-host);
+}
 remote_sa = remote_sa-next;
 continue;
 }
@@ -255,11 +262,20 @@
 /* if an error occurred, loop round and try again */
 if (ret != APR_SUCCESS) {
 apr_socket_close(sock);
-env-l-jkLog(env, env-l, remote_sa-next ? JK_LOG_DEBUG : JK_LOG_ERROR,
- channelApr.open() attempt to connect to %pI (%s) failed 
%d\n,
- remote_sa,
- socketInfo-host,
- ret);
+if (remote_sa-next) {
+env-l-jkLog(env, env-l, JK_LOG_DEBUG,
+  channelApr.open() attempt to connect to %pI (%s) 
failed %d\n,
+  remote_sa,
+  socketInfo-host,
+  ret);
+}
+else {
+env-l-jkLog(env, env-l, JK_LOG_ERROR,
+  channelApr.open() attempt to connect to %pI (%s) 
failed %d\n,
+  remote_sa,
+  socketInfo-host,
+  ret);
+}
 remote_sa = remote_sa-next;
 continue;
 }

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

[PATCH] fix syntax error in mod_jk2 file jk_channel_apr_socket.c

2003-03-13 Thread Jeff Trawick
I saw the error with IBM's native compiler for AIX, but it doesn't seem 
to be a matter of extreme pickiness.

Here are the error messages:

../../common/jk_channel_apr_socket.c, line 229.56: 1506-226 (S) The 
: operator is not allowed between int and char[37].
../../common/jk_channel_apr_socket.c, line 258.56: 1506-226 (S) The 
: operator is not allowed between int and char[37].

The code in error is

  remote_sa-next ? JK_LOG_DEBUG : JK_LOG_ERROR,

It looks simple enough, but JK_LOG_DEBUG and JK_LOG_ERROR expand to

__FILE__, __LINE__, something_else

so what the compiler actually sees is a mess.

Here is a fix:

http://www.apache.org/~trawick/jk2_cc_patch_20030313

(Funny, this code looks a lot like some I hacked in Apache 2's mod_proxy.)

Thanks,

Jeff

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]