Bug 8453 - apxs uses wrong path-variable for build-dir
Summary: apxs uses wrong path-variable for build-dir
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.0.36
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
: 8678 (view as bug list)
Depends on:
Reported: 2002-04-24 09:05 UTC by Stephan W
Modified: 2013-01-19 23:12 UTC (History)
3 users (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Stephan W 2002-04-24 09:05:45 UTC
I am trying to install php 4.2.0 as a DSO-modul for apache 2.0.35. The 
configure-script of php fails with

cannot open /usr/local/build/config_vars.mk: No such file or directory at 
./apxs line 248.

I tracked the error down to the apxs script. In line 69:


I am using the GNU layout. In this layout the build-directory is under 
"/usr/local/share/apache2/build" and the prefix is "/usr/local/"

If I change that to the right path (/usr/local/share/apache2/build/" it works 
and I can compile php. But when i try to make "make install" I get the 

/usr/local/sbin/apxs -i -a -n php4 libphp4.la
/usr/local/build/instdso.sh SH_LIBTOOL='/usr/local/build/libtool' libphp4.la 
sh: /usr/local/build/instdso.sh: No such file or directory
apxs:Error: Command failed with rc=8323072

It seems thap apxs uses in the lines 418, 443 and 474 the wrong path-variable. 
I think it should be the variable (or path) "$installbuilddir" from the file 
config.layout  in case of "$prefix/build" ??? I do not know how to access that 
variable or how I should do it right, because I am not so familiar with the 
code-structurof apache.

I configured php with following command:

./configure --with-tsrm-pthreads --with-mysql=/usr/local 
--with-imap-ssl=/usr/local --with-gettext --with-imap=/Source/imap-2001a 
--with-gd --with-openssl=/usr/local --with-apxs2=/usr/local/sbin/apxs

and apache 2.0.35 with the following:

./configure --enable-layout=GNU  --enable-info --with-ssl=/usr/local 
Comment 1 Stephan W 2002-04-24 13:43:24 UTC
After a few tries, I changed all the $prefix/build to 
/usr/local/share/apache2/build and compiled and installed php. This time the 
installation was ok. The script copied libphp4.so to the right place and 
inserted the LoadModuledirective in http.conf.

Now there is another error when I start apache:

Syntax error on line 218 of /usr/local/etc/apache2/httpd.conf:
Cannot load /usr/local/libexec/libphp4.so into server: 
/usr/local/libexec/libphp4.so: undefined symbol: ssl_onceonlyinit
sbin/apachectl start: httpd could not be started

I don't have time left for today but I think this is another problem 
(hopefully). I will work on this tomorrow. Maybe there is another point in 
Comment 2 Joshua Slive 2002-04-30 19:28:35 UTC
*** Bug 8678 has been marked as a duplicate of this bug. ***
Comment 3 Joshua Slive 2002-05-03 20:43:35 UTC
I think that this was fixed in 2.0.36.  You can try a prelease version here:

If that doesn't fix it, please reopen this report and up the version number.

Thanks for using Apache.
Comment 4 Josh Smith 2002-05-09 02:21:04 UTC
I'm still seeing this in 2.0.36. In my case, apxs contained

  my $prefix         = "/software/stow/apache-2.0.36";



when that second line should have been


Also, apxs later contained

  my $envvars = get_vars("bindir") . "/envvars";

which should have been

  my $envvars = get_vars("sbindir") . "/envvars";

Those two changes allowed me to configure and build PHP 4.2.0.

I use a custom layout in config.layout, but it's very similar to the GNU layout;
I can send along the details if they'd help.
Comment 5 Josh Smith 2002-05-09 07:00:00 UTC
I spoke too soon: There are other instances of $prefix/build in apxs, As the
original reporter mentioned, and they should all probably be fixed.

It doesn't look like this is fixed in CVS either (looking via ViewCVS at
http://cvs.apache.org/viewcvs.cgi/httpd-2.0/support/apxs.in, which seems to be
at version 1.37).
Comment 6 Dan Muller 2002-06-01 07:12:52 UTC
I also ran into this, with an Apache build I did on a Debian system from 
latest sources. I'm trying to build Subversion, and its configuration script 
fails due to this bug. I've fixed support/apxs.in on my system, sort of. I've 
just subscribed to the developers list so that I can discuss it there. In the 
meantime, if someone's interested in the diffs, send me an email at 
Comment 7 Jeff Trawick 2002-06-05 12:01:13 UTC
A fix for this was just committed to CVS.  I'm pretty sure that it will be
in 2.0.37 (or whatever version comes next).

Thanks for your report, and thanks for using Apache!