Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 112863 - www-servers/apache: apxs:Error: Config file /etc/apache2/apache2.conf not found. axps2 relies on wrong configuration file name
Summary: www-servers/apache: apxs:Error: Config file /etc/apache2/apache2.conf not fou...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-17 15:55 UTC by Bryce Lohr
Modified: 2025-06-05 15:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryce Lohr 2005-11-17 15:55:00 UTC
/usr/portage/net-www/apache/apache-2.0.54-r31.ebuild(167):
	# as decided on IRC-AGENDA-10.2004, we use httpd.conf as standard config file name
	sed -i -e 's:apache2\.conf:httpd.conf:' include/ap_config_auto.h

/usr/lib/apache2/build/config_vars.mk(51, 85):
progname = apache2

/usr/sbin/apxs2(38):
my $CFG_TARGET     = get_vars("progname");

If the name of the configuration file is to be different than the binary, then
it seems that this code can't work. Maybe there needs to be a separate variable
for the config file name.

Changing /usr/sbin/apxs2 line 38 to
  my $CFG_TARGET     = "httpd"; # get_vars("progname");
allowed me to work around the problem and get the install to finish.

Reproducible: Always
Steps to Reproduce:
1. php-5.0.5 # ./configure --with-apxs2=/usr/sbin/apxs2 ...
2. php-5.0.5 # make
3. php-5.0.5 # make install


Actual Results:  
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

Installing PHP SAPI module:       apache2handler
/usr/lib/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-0/build/libtool'
libphp5.la /usr/lib/apache2/modules
/usr/share/apr-0/build/libtool --mode=install cp libphp5.la
/usr/lib/apache2/modules/
cp .libs/libphp5.so /usr/lib/apache2/modules/libphp5.so
cp .libs/libphp5.lai /usr/lib/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish
/usr/local/src/php-5.0.5/libs'
chmod 755 /usr/lib/apache2/modules/libphp5.so
apxs:Error: Config file /etc/apache2/apache2.conf not found.
make: *** [install-sapi] Error 1


Expected Results:  
The make script should have updated the correct Apache configuration file to
include the appropriate LoadModule lines, and then proceeded with finishing the
rest of its installation tasks (such as installing the PHP CLI, etc.)

# emerge --info
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.5-20050130,
glibc-2.3.5-r1, 2.6.12-gentoo-r9 i686)
=================================================================
System uname: 2.6.12-gentoo-r9 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
http://mirror.mcs.anl.gov/pub/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa apache2 audiofile avi bitmap-fonts bonobo bzip2
cddb cdr crypt cups curl dga dts encode esd exif expat fam ffmpeg flac
foomaticdb gdbm gif glut gstreamer gtk gtk2 gtkhtml guile imagemagick imlib java
javascript jpeg lcms libg++ libwww mad mikmod mmx mng motif mp3 mpeg ncurses
nptl nvidia ogg oggvorbis openal opengl oss pam pcre pdflib perl png postgres
python qt quicktime readline real sdl sndfile spell sse ssl svg tcltk tcpd tetex
theora threads tiff truetype truetype-fonts type1-fonts udev usb vorbis wmf xine
xml xml2 xmms xpm xprint xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-11-17 15:59:56 UTC
We have php ebuilds in portage, that work just fine. Compiling things manually,
you are on your own.
Comment 2 Calvin Buckley 2025-05-23 13:39:27 UTC
I think it's worth reopening this bug. (I was going to file, but saw this in the possible dupes.) apxs is recommended by the Apache guide to develop extensions [1], so it might be confusing or annoying to people following that.

[1]: https://httpd.apache.org/docs/2.4/developer/modguide.html
Comment 3 Larry the Git Cow gentoo-dev 2025-05-25 09:27:02 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/apache.git/commit/?id=9bffce54dbffbeb9bc67d61d84cfad4e7981b4dc

commit 9bffce54dbffbeb9bc67d61d84cfad4e7981b4dc
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2025-05-24 09:27:30 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2025-05-25 09:21:15 +0000

    Patch apxs for correct configuration filename
    
    Bug: https://bugs.gentoo.org/112863
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 2.4/patches/05_apxs_conf_name.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2025-05-25 09:28:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8963289dea2db22ca7e6a16d3f5a6d6b1f996d0f

commit 8963289dea2db22ca7e6a16d3f5a6d6b1f996d0f
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2025-05-25 09:27:17 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2025-05-25 09:28:49 +0000

    www-servers/apache: patch apxs for configuration file name
    
    Bug: https://bugs.gentoo.org/112863
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 www-servers/apache/Manifest                |   1 +
 www-servers/apache/apache-2.4.63-r3.ebuild | 262 +++++++++++++++++++++++++++++
 2 files changed, 263 insertions(+)