You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Easton <jo...@transcanada.com> on 2001/10/17 23:33:36 UTC

Problems compiling mod_webapp on AIX

I'm trying to get Tomcat 4.0.1 running in conjunction with Apache 1.3.x
on AIX 4.3.2.  From what I can gather, mod_webapp is now the preferred
connector to use, so that's what I've been trying to get working.  For
some reason, I can't get it to compile (in my experience, a common
problem on AIX :)

configure runs fine (configure --with-apxs=/path/to/apxs), but when I
try make, it blows up immediately with the following:

NrG_DEVL_2>make

make[]: Entering directory "lib"
make[]: Invoking "make  build"
        /usr/local/bin/gcc -g -O2   -g -O2 -D_USE_IRS -U__STR__
-D_THREAD_SAFE   -I/www/java/webapp-module-1.0-tc40/apr/include
-I/www/java/webapp-module-1.0-tc40/include -c "pr_warp.c" -o "pr_warp.o"

pr_warp.c: In function `headers':
pr_warp.c:198: `TYPE_REQ_HEADER' undeclared (first use in this function)

pr_warp.c:198: (Each undeclared identifier is reported only once
pr_warp.c:198: for each function it appears in.)
pr_warp.c: In function `warp_handle':
pr_warp.c:245: `TYPE_REQ_INIT' undeclared (first use in this function)
pr_warp.c:279: `TYPE_REQ_CONTENT' undeclared (first use in this
function)
pr_warp.c:291: `TYPE_REQ_SCHEME' undeclared (first use in this function)

pr_warp.c:303: `TYPE_REQ_AUTH' undeclared (first use in this function)
pr_warp.c:329: `TYPE_REQ_CLIENT' undeclared (first use in this function)

pr_warp.c:345: `TYPE_REQ_SERVER' undeclared (first use in this function)

pr_warp.c:359: `TYPE_REQ_PROCEED' undeclared (first use in this
function)
pr_warp.c:372: `TYPE_RES_STATUS' undeclared (first use in this function)

pr_warp.c:380: `TYPE_RES_HEADER' undeclared (first use in this function)

pr_warp.c:391: `TYPE_RES_COMMIT' undeclared (first use in this function)

pr_warp.c:396: `TYPE_RES_BODY' undeclared (first use in this function)
pr_warp.c:403: `TYPE_RES_DONE' undeclared (first use in this function)
pr_warp.c:408: `TYPE_CBK_READ' undeclared (first use in this function)
pr_warp.c:416: `TYPE_CBK_DONE' undeclared (first use in this function)
pr_warp.c:418: `TYPE_CBK_DATA' undeclared (first use in this function)
pr_warp.c:421: `TYPE_ERROR' undeclared (first use in this function)
pr_warp.c:373: warning: unreachable code at beginning of switch
statement
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.

I'm not much of a C person, but I went looking, and the constants it's
complaining about are in fact not declared in any .c or .h file at all.
In fact, the only mention of them seemed to be in this switch statement
which make is complaining about.  Seemed to be that is, until I tried
'find . -name "*" | xargs grep TYPE_RES_HEADER' which yielded this:

NrG_DEVL_2>find . -name "*"|xargs grep TYPE_RES_HEADER
./java/Constants.java.in:    public static final int
TYPE_RES_HEADER=0x21;
./java/WarpResponse.java:
this.packet.setType(Constants.TYPE_RES_HEADER);
./java/WarpResponse.java:
this.packet.setType(Constants.TYPE_RES_HEADER);
./java/WarpResponse.java:
this.packet.setType(Constants.TYPE_RES_HEADER);
./java/WarpResponse.java:
this.packet.setType(Constants.TYPE_RES_HEADER);
./java/Constants.java:    public static final int TYPE_RES_HEADER=0x21;
./java/org/apache/catalina/connector/warp/Constants.class:VERS_MINOR
./lib/pr_warp.c:            case TYPE_RES_HEADER: {

I'm not sure how this is supposed to work, or what I am doing wrong to
cause it to fail like this.  Has anyone else had the same problem or
know how to do it right?

Thanks in advance,
John


Re: Problems compiling mod_webapp on AIX

Posted by John Easton <jo...@transcanada.com>.
So even though I've compiled using gcc, you think apxs is calling 'cc'?  That
could certainly explain why it breaks, we've found our version of IBM's
compiler to be extremely flaky.  How did you get it to compile without apxs?

Nikola Milutinovic wrote:

> Pier Fumagalli wrote:
>
> > This looks like big troubles with your current compiler and linker rather
> > than APXS, I really have no whatsoever clue...
> >
> > I'm working to see how to build the WebApp module without APXS, as a
> > statically linked module... That might help (still work in progress,
> > though!)
>
> APXS, AFAIK, just calls "cc" and "ld", I've built my mod_webapp.so
> manually, since apxs had some problems.
>
> Nix.


Re: Problems compiling mod_webapp on AIX

Posted by Pier Fumagalli <pi...@betaversion.org>.
Nikola Milutinovic at Nikola.Milutinovic@ev.co.yu wrote:

> Pier Fumagalli wrote:
> 
>> This looks like big troubles with your current compiler and linker rather
>> than APXS, I really have no whatsoever clue...
>> 
>> I'm working to see how to build the WebApp module without APXS, as a
>> statically linked module... That might help (still work in progress,
>> though!)
> 
> APXS, AFAIK, just calls "cc" and "ld",

It does...

> I've built my mod_webapp.so
> manually, since apxs had some problems.

Hmmm... That might be the problem... Why it doesn't export symbols... I have
no clue on how ld an cc work on AIX...

    Pier


Re: Problems compiling mod_webapp on AIX

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Pier Fumagalli wrote:

> This looks like big troubles with your current compiler and linker rather
> than APXS, I really have no whatsoever clue...
> 
> I'm working to see how to build the WebApp module without APXS, as a
> statically linked module... That might help (still work in progress,
> though!)

APXS, AFAIK, just calls "cc" and "ld", I've built my mod_webapp.so
manually, since apxs had some problems.

Nix.

Re: Problems compiling mod_webapp on AIX

Posted by Pier Fumagalli <pi...@betaversion.org>.
John Easton at john_easton@transcanada.com wrote:

> Thanks Pier,  I'm a lot closer now.  Looks like pretty much everything
> compiled,
> but when apxs is called it dies now.  I've had problems with shared modules on
> AIX in the past, but unfortunately this is way over my head!  Here's the
> error:
> 
> make[]: Invoking "make  build"
>       { APXS_LDFLAGS_SHLIB="`/www/apache_portal/bin/apxs -q LDFLAGS_SHLIB`
> -lm -liconv -lnsl -ldl" ;  APXS_LDFLAGS_SHLIB=`/usr/bin/echo
> ${APXS_LDFLAGS_SHLIB}` ;  APXS_CFLAGS="`/www/apache_portal/bin/apxs -q CFLAGS`
> -g -O2  -g -O2    -D_USE_IRS -U__STR__ -D_THREAD_SAFE
> -I/www/java/webapp-module-20011017/apr/include
> -I/www/java/webapp-module-20011017/include  " ;  APXS_CFLAGS=`/usr/bin/echo
> ${APXS_CFLAGS}` ;  /www/apache_portal/bin/apxs  -S CFLAGS="${APXS_CFLAGS}"  -S
> LDFLAGS_SHLIB="${APXS_LDFLAGS_SHLIB}"  -o "mod_webapp.so"  -c "mod_webapp.c"
> "/www/java/webapp-module-20011017/lib/libwebapp.a"
> "/www/java/webapp-module-20011017/lib/libapr.a" ;  }
> gcc -DAIX=43 -DUSE_PTHREAD_SERIALIZED_ACCEPT -U__STR__ -DAIX_BIND_PROCESSOR
> -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -O2 -g -O2 -D_USE_IRS
> -U__STR__
> -D_THREAD_SAFE -I/www/java/webapp-module-20011017/apr/include
> -I/www/java/webapp-module-20011017/include -fpic -DSHARED_MODULE
> -I/www/apache_portal/include  -c mod_webapp.c
> cc1: warning: -fpic ignored for AIX (all code is position independent)
> ld -H512 -T512 -bhalt:4 -bM:SRE -bnoentry
> -bI:/www/apache_portal/libexec/httpd.exp -lc -lm -liconv -lnsl -ldl -o
> mod_webapp.so mod_webapp.o /www/java/webapp-module-20011017/lib/libwebapp.a
> /www/java/webapp-module-20011017/lib/libapr.a
> ld: 0711-244 ERROR: No csects or exported symbols have been saved.
> apxs:Break: Command failed with rc=8
> make: 1254-004 The error code from the last command is 1.
> 
> 
> Stop.
> make: 1254-004 The error code from the last command is 2.
> 
> 
> Stop.
> make: 1254-004 The error code from the last command is 2.
> 
> Any ideas?

This looks like big troubles with your current compiler and linker rather
than APXS, I really have no whatsoever clue...

I'm working to see how to build the WebApp module without APXS, as a
statically linked module... That might help (still work in progress,
though!)

    Pier


Re: Problems compiling mod_webapp on AIX

Posted by John Easton <jo...@transcanada.com>.
Thanks Pier,  I'm a lot closer now.  Looks like pretty much everything compiled,
but when apxs is called it dies now.  I've had problems with shared modules on
AIX in the past, but unfortunately this is way over my head!  Here's the error:

make[]: Invoking "make  build"
        { APXS_LDFLAGS_SHLIB="`/www/apache_portal/bin/apxs -q LDFLAGS_SHLIB`
-lm -liconv -lnsl -ldl" ;  APXS_LDFLAGS_SHLIB=`/usr/bin/echo
${APXS_LDFLAGS_SHLIB}` ;  APXS_CFLAGS="`/www/apache_portal/bin/apxs -q CFLAGS`
-g -O2  -g -O2    -D_USE_IRS -U__STR__ -D_THREAD_SAFE
-I/www/java/webapp-module-20011017/apr/include
-I/www/java/webapp-module-20011017/include  " ;  APXS_CFLAGS=`/usr/bin/echo
${APXS_CFLAGS}` ;  /www/apache_portal/bin/apxs  -S CFLAGS="${APXS_CFLAGS}"  -S
LDFLAGS_SHLIB="${APXS_LDFLAGS_SHLIB}"  -o "mod_webapp.so"  -c "mod_webapp.c"
"/www/java/webapp-module-20011017/lib/libwebapp.a"
"/www/java/webapp-module-20011017/lib/libapr.a" ;  }
gcc -DAIX=43 -DUSE_PTHREAD_SERIALIZED_ACCEPT -U__STR__ -DAIX_BIND_PROCESSOR
-DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -O2 -g -O2 -D_USE_IRS -U__STR__
-D_THREAD_SAFE -I/www/java/webapp-module-20011017/apr/include
-I/www/java/webapp-module-20011017/include -fpic -DSHARED_MODULE
-I/www/apache_portal/include  -c mod_webapp.c
cc1: warning: -fpic ignored for AIX (all code is position independent)
ld -H512 -T512 -bhalt:4 -bM:SRE -bnoentry
-bI:/www/apache_portal/libexec/httpd.exp -lc -lm -liconv -lnsl -ldl -o
mod_webapp.so mod_webapp.o /www/java/webapp-module-20011017/lib/libwebapp.a
/www/java/webapp-module-20011017/lib/libapr.a
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
apxs:Break: Command failed with rc=8
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.
make: 1254-004 The error code from the last command is 2.

Any ideas?

Thanks,
John



Pier Fumagalli wrote:

> John Easton at john_easton@transcanada.com wrote:
>
> > configure runs fine (configure --with-apxs=/path/to/apxs), but when I
> > try make, it blows up immediately with the following:
>
> Can you try the latest daily snapshot from http://nagoya.apache.org/~pier/ ?
> Thanks!
>
>     Pier


Re: Problems compiling mod_webapp on AIX

Posted by Pier Fumagalli <pi...@betaversion.org>.
John Easton at john_easton@transcanada.com wrote:

> configure runs fine (configure --with-apxs=/path/to/apxs), but when I
> try make, it blows up immediately with the following:

Can you try the latest daily snapshot from http://nagoya.apache.org/~pier/ ?
Thanks!

    Pier