You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dan Ciarniello <dc...@cityxpress.com> on 2007/12/11 23:56:32 UTC

apxs problem

I am putting together RPMs for apache and tomcat and I want to include 
the mod_jk connector with the apache RPM but I get an error that apxs 
cannot be found even though I give the full path to apxs.

The commands that I do are

(in apache)
./configure  --enable-ssl=shared --enable-so --with-ldap --enable-ldap 
--enable-auth-ldap
make
make DESTDIR=/var/tmp/httpd-2.0.55-1-root install

(in jakarta-tomcat-connectors-1.2.15-src/jk/native)
./configure 
--with-apxs=/var/tmp/httpd-2.0.55-1-root/usr/local/apache2/bin/apxs

The configure fails with:
checking for perl... /usr/bin/perl
could not find /var/tmp/httpd-2.0.55-1-root/usr/local/apache2/bin/apxs
configure: error: You must specify a valid --with-apxs path

Note that since I'm building for purposes of packaging, I'm not 
installing apache in its intended location but in a temporary location.  
This is obviously the problem since if I do actually install apache, the 
connector configure script works fine.  Thing is, I don't want to have 
install apache just to build the connector.  Is there any way to do this?

Thanks,
Dan.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: apxs problem

Posted by Dan Ciarniello <dc...@cityxpress.com>.
Rainer Jung wrote:
> If you put the jk modules into your apache rpm, you couple the 
> lifecycle of those two together. So you need to build and deliver a 
> new rpm whenever at least one of apache httpd and of jk have a new 
> version, you want to deploy.
>
> The release cycles of httpd and jk are very different from each other, 
> so you might want to consider unbundling and maybe not even installing 
> jk into the httpd directory, but in a different tree. That will make 
> your updates and rollbacks easier.
>

This isn't really an issue since we are very conservative when it comes 
to deploying servers - we are, after all, still using Apache 2.0.55 and 
mod_jk 1.2.15.  Having said that, it doesn't look like I will be able to 
do what I was hoping to do so separate RPMs it is.

Thanks for the help,
Dan.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: apxs problem

Posted by Rainer Jung <ra...@kippdata.de>.
Dan Ciarniello wrote:
> Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Dan,
>>
>> Dan Ciarniello wrote:
>>  
>>> I am putting together RPMs for apache and tomcat and I want to
>>> include the mod_jk connector with the apache RPM
>>>     
>>
>> :(
>>
>> Don't do that; instead, have a separate RPM that just contains mod_jk
>> and maybe a script to install it on top of an existing Apache httpd RPM
>> install.
>>
>> Forgive my skepticism, but are you building RPMs for a particular distro
>> or will there be yet another set of packaged versions of Tomcat-related
>> software out there that does not work properly.
>>   
> No, I'm not building for a particular distribution.  I'm building for a 
> specific configuration based on the way that we run things on my 
> company's servers.  I have considered a separate RPM for the connector 
> but it seemed a bit silly for a single file especially when all our 
> servers run both Apache and Tomcat and the connector will be required on 
> all of them.

If you put the jk modules into your apache rpm, you couple the lifecycle 
of those two together. So you need to build and deliver a new rpm 
whenever at least one of apache httpd and of jk have a new version, you 
want to deploy.

The release cycles of httpd and jk are very different from each other, 
so you might want to consider unbundling and maybe not even installing 
jk into the httpd directory, but in a different tree. That will make 
your updates and rollbacks easier.

>>> but I get an error that apxs cannot be found even though I give the
>>> full path to apxs.

First thing that needs to work is ".../path/to/my/apxs -q PREFIX" (and 
apxs needs to have execution permission).

Depending on the version of Apache httpd during configure we might do:

all:

apxs -q INCLUDEDIR
apxs -q CC
apxs -q CFLAGS

additionally for 2.x:

apxs -q APR_INCLUDEDIR
apxs -q APU_INCLUDEDIR
apxs -q EXTRA_CFLAGS
apxs -q EXTRA_CPPFLAGS
apxs -q exp_installbuilddir
apxs -q LIBTOOL

>> Stupid question: is that full path correct?
>>   
> Absolutely. bash command line completion is a wonderful thing :-)
>>  
>>> Note that since I'm building for purposes of packaging, I'm not 
>>> installing apache in its intended location but in a temporary
>>> location. This is obviously the problem since if I do actually
>>> install apache, the connector configure script works fine.  Thing is,
>>> I don't want to have install apache just to build the connector.  Is
>>> there any way to do this?

You will at least need installed header files and libraries. Otherwise 
we can't compile respectively link. A module uses the httpd API and thus 
needs the API description for compiles and during linking it checks, if 
it could resolve symbols in the libs.

>> Ideally, the connector should be built on the machine that will be
>> running it. Is it acceptable to create an RPM that actually builds the
>> module instead of installing a previously-built binary? It takes only a
>> few seconds to build mod_jk from source. Since mod_jk requires Apache
>> httpd to be installed, installing such an RPM would require that apxs be
>> available in a known location, right?
>>   
> I hadn't considered that.  You're right that mod_jk doesn't take long to 
> build so building as part of the installation should not be a problem.
> 
> Thanks,
> Dan.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: apxs problem

Posted by Dan Ciarniello <dc...@cityxpress.com>.
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dan,
>
> Dan Ciarniello wrote:
>   
>> I am putting together RPMs for apache and tomcat and I want to
>> include the mod_jk connector with the apache RPM
>>     
>
> :(
>
> Don't do that; instead, have a separate RPM that just contains mod_jk
> and maybe a script to install it on top of an existing Apache httpd RPM
> install.
>
> Forgive my skepticism, but are you building RPMs for a particular distro
> or will there be yet another set of packaged versions of Tomcat-related
> software out there that does not work properly.
>   
No, I'm not building for a particular distribution.  I'm building for a 
specific configuration based on the way that we run things on my 
company's servers.  I have considered a separate RPM for the connector 
but it seemed a bit silly for a single file especially when all our 
servers run both Apache and Tomcat and the connector will be required on 
all of them.
>   
>> but I get an error that apxs cannot be found even though I give the
>> full path to apxs.
>>     
>
> Stupid question: is that full path correct?
>   
Absolutely. bash command line completion is a wonderful thing :-)
>   
>> Note that since I'm building for purposes of packaging, I'm not 
>> installing apache in its intended location but in a temporary
>> location. This is obviously the problem since if I do actually
>> install apache, the connector configure script works fine.  Thing is,
>> I don't want to have install apache just to build the connector.  Is
>> there any way to do this?
>>     
>
> Ideally, the connector should be built on the machine that will be
> running it. Is it acceptable to create an RPM that actually builds the
> module instead of installing a previously-built binary? It takes only a
> few seconds to build mod_jk from source. Since mod_jk requires Apache
> httpd to be installed, installing such an RPM would require that apxs be
> available in a known location, right?
>   
I hadn't considered that.  You're right that mod_jk doesn't take long to 
build so building as part of the installation should not be a problem.

Thanks,
Dan.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: apxs problem

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan,

Dan Ciarniello wrote:
> I am putting together RPMs for apache and tomcat and I want to
> include the mod_jk connector with the apache RPM

:(

Don't do that; instead, have a separate RPM that just contains mod_jk
and maybe a script to install it on top of an existing Apache httpd RPM
install.

Forgive my skepticism, but are you building RPMs for a particular distro
or will there be yet another set of packaged versions of Tomcat-related
software out there that does not work properly.

> but I get an error that apxs cannot be found even though I give the
> full path to apxs.

Stupid question: is that full path correct?

> Note that since I'm building for purposes of packaging, I'm not 
> installing apache in its intended location but in a temporary
> location. This is obviously the problem since if I do actually
> install apache, the connector configure script works fine.  Thing is,
> I don't want to have install apache just to build the connector.  Is
> there any way to do this?

Ideally, the connector should be built on the machine that will be
running it. Is it acceptable to create an RPM that actually builds the
module instead of installing a previously-built binary? It takes only a
few seconds to build mod_jk from source. Since mod_jk requires Apache
httpd to be installed, installing such an RPM would require that apxs be
available in a known location, right?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHXyNY9CaO5/Lv0PARAkpzAKCjRDNPne/1JfK6GfifsoWqL96OdACgvZOu
QTqZBN8KNM+BDyJWcCAFdMo=
=qpQ1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org