You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Craig R. McClanahan" <cr...@apache.org> on 2001/05/12 18:55:04 UTC
Trying New Connectors Build Stuff
The autoconf stuff is a total mystery to me, but here's my experience so
far.
Platform: Red Hat Linux 7.1
Problem 1 - Can't find APXS:
I tried "./configure --with-apr=/usr/local --with-apxs=xxxxx
with various patterns for xxxxx (/usr/local/apache, /usr/local/apache/bin,
/usr/local/apache/bin/apxs) and could not get it to recognize where my
apxs binary was (in /usr/local/apache/bin). Temporary workaround: add
/usr/local/apache/bin to the PATH environment variable and execute
./configure --with-apr=/usr/local --with-apxs
to let the configure script find apxs on the path.
Problem 2 - Can't compile mod_webapp:
The "Makedefs" file that is created has the following line:
APXS = @APXS@
which causes the build of the mod_webapp connector to blow up:
Linking Apache 1.3.x module
make[1]: APXS@: Command not found
make[1]: *** [mod_webapp.so] Error 127
Workaround: manually patch "Makedefs" to say
APXS = /usr/local/apache/bin/apxs
Problem 3 - "configtest" fails
Moved mod_webapp.so into /usr/local/apache/libexec and added some config
directives to the httpd.conf file, including
LoadModule webapp_module libexec/mod_webapp.so
but running the "configtest" option throws this error:
Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
/usr/local/lib/libapr.so.0: undefined symbol: pthread_create
As you can see, it correctly found where my libapr.so shared library is,
but cannot find the pthreads library - even though it's installed. This
*could* be because Red Hat 7.1 uses libc-2.2.2.so, and I've heard others
have had problems with this.
Problem 4 - Documenation for httpd.conf directives
Even when all of the above stuff gets fixed, I cannot find any docs on the
httpd.conf directives that mod_webapp supports. The notes in the
$CATALINA_HOME/conf/server.xml file do not appear to be accurate any
more. Where's the docs?
Craig
Re: Trying New Connectors Build Stuff
Posted by Christopher Cain <cc...@mhsoftware.com>.
For what it's worth, I prefer Cygwin.
> So we have 2 cygwin (amy+jon) and 1 msvc (kevin)... I hoped to have more
> feedback... I'll start with cygwin (since I can get it for free)
>
> Pier
Re: Trying New Connectors Build Stuff
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
kevin seguin at seguin@motive.com wrote:
>>
>> So we have 2 cygwin (amy+jon) and 1 msvc (kevin)... I hoped to have more
>> feedback... I'll start with cygwin (since I can get it for free)
>>
>
> does it really matter much? it should build with both cygwin and msvc,
> right? you might just have different makefiles for the two.
Just to know which one to tackle first :)
Pier
Re: Trying New Connectors Build Stuff
Posted by kevin seguin <se...@motive.com>.
>
> So we have 2 cygwin (amy+jon) and 1 msvc (kevin)... I hoped to have more
> feedback... I'll start with cygwin (since I can get it for free)
>
does it really matter much? it should build with both cygwin and msvc,
right? you might just have different makefiles for the two.
-kevin.
Re: Trying New Connectors Build Stuff
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Amy Roh at amyroh@apache.org wrote:
>
> I prefer Cygwin personally. Thanks, Pier!
So we have 2 cygwin (amy+jon) and 1 msvc (kevin)... I hoped to have more
feedback... I'll start with cygwin (since I can get it for free)
Pier
Re: Trying New Connectors Build Stuff
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/13/01 10:53 AM, "Amy Roh" <am...@apache.org> wrote:
> I prefer Cygwin personally. Thanks, Pier!
>
> Amy
+1
I know that MSVC is probably "nicer", but with cygwin more people can use
it, it is free, etc...
This was a problem with Jserv...only people with MSVC could compile it. That
sucked because it made getting .dll's difficult.
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
Re: Trying New Connectors Build Stuff
Posted by Amy Roh <am...@apache.org>.
> kevin seguin at seguin@motive.com wrote:
> >
> >> Hmm... Ok, but AFAIK apxs exists also in Apache 2.0, which is the
module I'm
> >> writing right now...
> >
> > so... iis is next, right ;-)
>
> Yes, IIS is next, I just need to install Win2K on my only Intel box I
have.
> It's a very old Pentium 366 and I hope I'll be able to get it working with
> MSVC or CygWin (BTW, which one do you prefer, guys?)
I prefer Cygwin personally. Thanks, Pier!
Amy
>
> Pier
>
Re: Trying New Connectors Build Stuff
Posted by kevin seguin <se...@motive.com>.
"Pier P. Fumagalli" wrote:
>
> kevin seguin at seguin@motive.com wrote:
> >
> >> Hmm... Ok, but AFAIK apxs exists also in Apache 2.0, which is the module I'm
> >> writing right now...
> >
> > so... iis is next, right ;-)
>
> Yes, IIS is next, I just need to install Win2K on my only Intel box I have.
> It's a very old Pentium 366 and I hope I'll be able to get it working with
> MSVC or CygWin (BTW, which one do you prefer, guys?)
>
i was really expecting a "why don't you do it yourself" response ;)
btw, with some guidance, i would certainly be willing to help out with
iis/netscape, time permitting, of course :)
personally, i would prefer MSVC.
Re: Trying New Connectors Build Stuff
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
kevin seguin at seguin@motive.com wrote:
>
>> Hmm... Ok, but AFAIK apxs exists also in Apache 2.0, which is the module I'm
>> writing right now...
>
> so... iis is next, right ;-)
Yes, IIS is next, I just need to install Win2K on my only Intel box I have.
It's a very old Pentium 366 and I hope I'll be able to get it working with
MSVC or CygWin (BTW, which one do you prefer, guys?)
Pier
Re: Trying New Connectors Build Stuff
Posted by kevin seguin <se...@motive.com>.
>
> Hmm... Ok, but AFAIK apxs exists also in Apache 2.0, which is the module I'm
> writing right now...
so... iis is next, right ;-)
Re: Trying New Connectors Build Stuff
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Jon Stevens at jon@latchkey.com wrote:
> on 5/13/01 10:43 AM, "Pier P. Fumagalli" <pi...@betaversion.org> wrote:
>
>> Hmm... Ok, but AFAIK apxs exists also in Apache 2.0, which is the module I'm
>> writing right now... Could I call it --with-apxs2 ??? How does that sound?
>
> No need. That is the point of --with-apxs[=FILE]... you can optionally point
> to any apxs installation.
Yeah, but the source codes will be different, and the one for 1.3 will need
to be compiled with the 1.3 APXS, while the one for 2.0 with the 2.0 APXS...
I need to identify for which web server we're building... Future plans are:
--with-iis
--with-nes
...
> Note: I'm thinking of adding --with-apache back like it was in Jserv...that
> will be used conditionally with --with-apxs. In other words, you specify one
> or the other, not both. --with-apache would then be used for people who are
> building Apache statically. The problem with that, is supporting both
> options is a pain in the ass, however, stealing the code from Jserv's
> autoconf should be easy...
Hisss... Statically... Hmm... Bblblblblblbl... Dunno about that, I didn't
try building the toy statically...
Pier
Re: Trying New Connectors Build Stuff
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/13/01 10:43 AM, "Pier P. Fumagalli" <pi...@betaversion.org> wrote:
> Hmm... Ok, but AFAIK apxs exists also in Apache 2.0, which is the module I'm
> writing right now... Could I call it --with-apxs2 ??? How does that sound?
No need. That is the point of --with-apxs[=FILE]... you can optionally point
to any apxs installation.
Note: I'm thinking of adding --with-apache back like it was in Jserv...that
will be used conditionally with --with-apxs. In other words, you specify one
or the other, not both. --with-apache would then be used for people who are
building Apache statically. The problem with that, is supporting both
options is a pain in the ass, however, stealing the code from Jserv's
autoconf should be easy...
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
Re: Trying New Connectors Build Stuff
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Jon Stevens at jon@latchkey.com wrote:
> on 5/12/01 12:19 PM, "Jack Lauman" <jl...@nwcascades.com> wrote:
>
>> Configured the connectors directory:
>>
>> ./configure --prefix=/usr
>> --enable-DEAPI \
>> --with-apache=/usr/sbin \ (apxs lives here)
>> --with-apr=/usr/java/apr \
>> --libexecdir=/usr/lib \
>> --sysconfdir=/etc/httpd/conf
>
> You are using old CVS code...
>
> I just changed --with-apache to be --with-apxs
Hmm... Ok, but AFAIK apxs exists also in Apache 2.0, which is the module I'm
writing right now... Could I call it --with-apxs2 ??? How does that sound?
Thanks Jon, btw. :)
Pier
Re: Trying New Connectors Build Stuff
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/12/01 12:19 PM, "Jack Lauman" <jl...@nwcascades.com> wrote:
> Configured the connectors directory:
>
> ./configure --prefix=/usr
> --enable-DEAPI \
> --with-apache=/usr/sbin \ (apxs lives here)
> --with-apr=/usr/java/apr \
> --libexecdir=/usr/lib \
> --sysconfdir=/etc/httpd/conf
You are using old CVS code...
I just changed --with-apache to be --with-apxs
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
Re: Trying New Connectors Build Stuff
Posted by Jack Lauman <jl...@nwcascades.com>.
For those interested, here's how I got it to work:
Platform: RedHat Linux7.0
OS: Linux 2.2.19
Apache ver: 1.3.19 (w/SSL 0.9.6a-2.8.3)
Apache Dir: /var/lib/apache
Conf dir: /etc/httpd/conf
TOMCAT_HOME: /usr/java/tomcat
Dowloaded apr and apr-util from cvs.
Configured both with:
./configure --prefix=/usr \
--enable-DEAPI \
--libexcdir=/usr/lib \
--sysconfdir=/etc/httpd/conf \
--disable-threads
Configured the connectors directory:
./configure --prefix=/usr
--enable-DEAPI \
--with-apache=/usr/sbin \ (apxs lives here)
--with-apr=/usr/java/apr \
--libexecdir=/usr/lib \
--sysconfdir=/etc/httpd/conf
NOTES: I had to manually copy APRVARS from the apr directory to the
apr-util directory to get apr-util to compile without complaining.
I had to disable threads to get 'apachectl configtest' to stop
complaining about 'apr_pthreads'.
Other than that it compiled without any warnings, and apache had no
problems loading it.
Regards,
Jack Lauman
"Craig R. McClanahan" wrote:
>
> The autoconf stuff is a total mystery to me, but here's my experience so
> far.
>
> Platform: Red Hat Linux 7.1
>
> Problem 1 - Can't find APXS:
>
> I tried "./configure --with-apr=/usr/local --with-apxs=xxxxx
>
> with various patterns for xxxxx (/usr/local/apache, /usr/local/apache/bin,
> /usr/local/apache/bin/apxs) and could not get it to recognize where my
> apxs binary was (in /usr/local/apache/bin). Temporary workaround: add
> /usr/local/apache/bin to the PATH environment variable and execute
>
> ./configure --with-apr=/usr/local --with-apxs
>
> to let the configure script find apxs on the path.
>
> Problem 2 - Can't compile mod_webapp:
>
> The "Makedefs" file that is created has the following line:
>
> APXS = @APXS@
>
> which causes the build of the mod_webapp connector to blow up:
>
> Linking Apache 1.3.x module
> make[1]: APXS@: Command not found
> make[1]: *** [mod_webapp.so] Error 127
>
> Workaround: manually patch "Makedefs" to say
>
> APXS = /usr/local/apache/bin/apxs
>
> Problem 3 - "configtest" fails
>
> Moved mod_webapp.so into /usr/local/apache/libexec and added some config
> directives to the httpd.conf file, including
>
> LoadModule webapp_module libexec/mod_webapp.so
>
> but running the "configtest" option throws this error:
>
> Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
> /usr/local/lib/libapr.so.0: undefined symbol: pthread_create
>
> As you can see, it correctly found where my libapr.so shared library is,
> but cannot find the pthreads library - even though it's installed. This
> *could* be because Red Hat 7.1 uses libc-2.2.2.so, and I've heard others
> have had problems with this.
>
> Problem 4 - Documenation for httpd.conf directives
>
> Even when all of the above stuff gets fixed, I cannot find any docs on the
> httpd.conf directives that mod_webapp supports. The notes in the
> $CATALINA_HOME/conf/server.xml file do not appear to be accurate any
> more. Where's the docs?
>
> Craig
Re: Trying New Connectors Build Stuff
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Craig R. McClanahan at craigmcc@apache.org wrote:
>
> The autoconf stuff is a total mystery to me, but here's my experience so
> far.
>
> Platform: Red Hat Linux 7.1
>
> Problem 1 - Can't find APXS:
> Problem 2 - Can't compile mod_webapp:
Ok, this should have been fixed by Jon. I don't have a Linux machine (yet),
since someone in Dublin turned off my build machine, but I'll try to have
someone to start it up back again (darn!)...
Otherwise I'll just install RH71 on my slow-as-hell Pentium @ home...
> Problem 3 - "configtest" fails
>
> Moved mod_webapp.so into /usr/local/apache/libexec and added some config
> directives to the httpd.conf file, including
>
> LoadModule webapp_module libexec/mod_webapp.so
>
> but running the "configtest" option throws this error:
>
> Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
> /usr/local/lib/libapr.so.0: undefined symbol: pthread_create
>
> As you can see, it correctly found where my libapr.so shared library is,
> but cannot find the pthreads library - even though it's installed. This
> *could* be because Red Hat 7.1 uses libc-2.2.2.so, and I've heard others
> have had problems with this.
This is probably because of the library... If you build APR as a static
library (instead of a dynamic one) you should get rid of it... To do that,
simply in the APR directory do:
./buildconf
./configure --prefix=[your path for install] --enable-static \
--disable-shared
make
make install
Then switch to your tomcat/connectors directory and do
./buildconf
./configure --with-apr=[your path for install - prefix of APR config] ....
And it should link it against libapr.a, instead of libapr.so...
> Problem 4 - Documenation for httpd.conf directives
>
> Even when all of the above stuff gets fixed, I cannot find any docs on the
> httpd.conf directives that mod_webapp supports. The notes in the
> $CATALINA_HOME/conf/server.xml file do not appear to be accurate any
> more. Where's the docs?
Ok, that's my fault... I'll update the docs by Tuesday/Wednesday (as I need
to finish a couple of things related to security in JSR-096/Java Daemon
API).
Pier
Re: Trying New Connectors Build Stuff
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/12/01 9:55 AM, "Craig R. McClanahan" <cr...@apache.org> wrote:
>
> The autoconf stuff is a total mystery to me, but here's my experience so
> far.
>
> Platform: Red Hat Linux 7.1
>
>
> Problem 1 - Can't find APXS:
>
> I tried "./configure --with-apr=/usr/local --with-apxs=xxxxx
>
> with various patterns for xxxxx (/usr/local/apache, /usr/local/apache/bin,
> /usr/local/apache/bin/apxs) and could not get it to recognize where my
> apxs binary was (in /usr/local/apache/bin). Temporary workaround: add
> /usr/local/apache/bin to the PATH environment variable and execute
>
> ./configure --with-apr=/usr/local --with-apxs
>
> to let the configure script find apxs on the path.
Ok, here is the --help:
--with-apxs[=FILE] Build shared Apache module. FILE is the optional
pathname to the Apache apxs tool; defaults to
apxs.
So, if you read what that says, it says that you should give the full path
to the apxs executable. I see that you tried
/usr/local/apache/bin/apxs...that *should* work assuming that is the right
path to the binary. Mine is in /usr/sbin/apxs and here is it working:
[300][ ~/checkout/jakarta-tomcat-4.0/connectors ]% ./configure
--with-apr=/usr/local --with-apxs=/usr/sbin/apxs
creating cache ./config.cache
checking for gcc... no
checking for cc... cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for test... /bin/test
checking APR directory... /usr/local
setting target directories to "lib"
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
checking for apxs... /usr/sbin/apxs
adding apache-1.3 to target directories: "lib apache-1.3"
checking sources directory...
/Users/jon/checkout/jakarta-tomcat-4.0/connectors
checking targets directory...
/Users/jon/checkout/jakarta-tomcat-4.0/connectors
updating cache ./config.cache
creating ./config.status
creating Makedefs
creating Makefile
creating lib/Makefile
creating apache-1.3/Makefile
[301][ ~/checkout/jakarta-tomcat-4.0/connectors ]%
Showing me your output would be helpful as well as the output of
ls -la /usr/local/apache/bin/apxs
> Problem 2 - Can't compile mod_webapp:
>
> The "Makedefs" file that is created has the following line:
>
> APXS = @APXS@
>
> which causes the build of the mod_webapp connector to blow up:
>
> Linking Apache 1.3.x module
> make[1]: APXS@: Command not found
> make[1]: *** [mod_webapp.so] Error 127
>
> Workaround: manually patch "Makedefs" to say
>
> APXS = /usr/local/apache/bin/apxs
My fault. Will fix asap.
> Problem 3 - "configtest" fails
>
> Moved mod_webapp.so into /usr/local/apache/libexec and added some config
> directives to the httpd.conf file, including
>
> LoadModule webapp_module libexec/mod_webapp.so
>
> but running the "configtest" option throws this error:
>
> Cannot load /usr/local/apache/libexec/mod_webapp.so into server:
> /usr/local/lib/libapr.so.0: undefined symbol: pthread_create
>
> As you can see, it correctly found where my libapr.so shared library is,
> but cannot find the pthreads library - even though it's installed. This
> *could* be because Red Hat 7.1 uses libc-2.2.2.so, and I've heard others
> have had problems with this.
Pier gets that one.
> Problem 4 - Documenation for httpd.conf directives
>
> Even when all of the above stuff gets fixed, I cannot find any docs on the
> httpd.conf directives that mod_webapp supports. The notes in the
> $CATALINA_HOME/conf/server.xml file do not appear to be accurate any
> more. Where's the docs?
Pier gets that one.
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>