When I build mod_php, the compile fails with the following error: In file included from /usr/include/net-snmp/utilities.h:39, from /usr/include/net-snmp/net-snmp-includes.h:64, from /var/tmp/portage/mod_php-4.3.2/work/php-4.3.2/ext/snmp/snmp.c:79: /usr/include/net-snmp/library/data_list.h:29: syntax error before "netsnmp_data_list" /usr/include/net-snmp/library/data_list.h:41: syntax error before "void" /var/tmp/portage/mod_php-4.3.2/work/php-4.3.2/ext/snmp/snmp.c: In function `netsnmp_session_gen_auth_key': /var/tmp/portage/mod_php-4.3.2/work/php-4.3.2/ext/snmp/snmp.c:676: warning: initialization discards qualifiers from pointer target type /var/tmp/portage/mod_php-4.3.2/work/php-4.3.2/ext/snmp/snmp.c: In function `netsnmp_session_gen_sec_key': /var/tmp/portage/mod_php-4.3.2/work/php-4.3.2/ext/snmp/snmp.c:705: warning: initialization discards qualifiers from pointer target type distcc[17713] ERROR: compile on localhost failed with exit code 1 make: *** [ext/snmp/snmp.lo] Error 1 If I specify -snmp in my USE flags, it compiles fine. 13:00 [nihil] ~ # emerge info Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1) ================================================================= System uname: 2.4.20-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz GENTOO_MIRRORS="http://zazu.ru.ac.za http://zion.ru.ac.za ftp://ftp.is.co.za/lin ux/distributions/gentoo ftp://trumpetti.atm.tut.fi/gentoo/ ftp://gentoo.linux.no /pub/gentoo/ ftp://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share /config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/te xmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/init.d /etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg libg++ mikmod mmx mpeg ncu rses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb alsa gdb m berkdb slang readline tetex aalib nas bonobo svga ggi tcltk java guile X sdl g pm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk qt motif opengl mozilla snmp acl flash gd gtk2 i8x0 ipv6 moznocompose moznoirc moznomail pic sa mba vim-with-x wmf xosd -arts -kde" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j3" AUTOCLEAN="yes" SYNC="rsync://rsync.rucus.ru.ac.za/gentoo-portage" FEATURES="sandbox distcc ccache"
Furthermore, after having built mod_php-4.3.2 without SNMP, when I try to start apache up, I get: 20:07 [nihil] /etc/mysql # /etc/init.d/apache start * Starting apache... Syntax error on line 57 of /etc/apache/conf/apache.conf: Cannot load /etc/apache/extramodules/libphp4.so into server: /etc/apache/extramodules/libphp4.so: undefined symbol: unixd_config [ !! ] Which is not happy. I can't seem to find any solution to it.
Could you please include config.log from your mod_php compile, as well as your net-snmp version info? As for the 'unixd_config' bit, running revdep-rebuild on the system may help you. P.S. Say hi to Russell Cloran if he is still around. I went to high school (DHS) with him.
Created attachment 12742 [details] Config.log from a mod_php-4.3.2 build. Here's the config.log from mod_php-4.3.2 build with USE flags: +X -cjk +crypt -curl -firebird +flash -freetds +gd +gdbm -imap -informix +java +jpeg -ldap -mcal +mysql +nls -oci8 -odbc +pam +pdflib -memlimit +pic +png -postgres +qt +snmp +spell +ssl -tiff +truetype -xml +xml2 +zlib -apache2 My SNMP version is: # net-snmp-config --version 5.0.8 (And Russell Cloran is russell@rucus, cc'd in to this bug report already ;-)
I have finally finished my revdep-rebuild, which I performed without much hope, since all the packages being rebuilt were gnome/KDE. I re-merged mod_php-4.3.2, and starting apache still gives me: Cannot load /etc/apache/extramodules/libphp4.so into server: /etc/apache/extramodules/libphp4.so: undefined symbol: unixd_config [ !! ] For what it's worth: 16:46 [nihil] ~ # ldd /etc/apache/extramodules/libphp4.so libcrypt.so.1 => /lib/libcrypt.so.1 (0x4b57a000) libqt-mt.so.3 => /usr/qt/3/lib/libqt-mt.so.3 (0x4be6e000) libpspell.so.15 => /usr/lib/libpspell.so.15 (0x4b2ed000) libpdf.so.1 => /usr/lib/libpdf.so.1 (0x4023b000) libz.so.1 => /usr/lib/libz.so.1 (0x4b362000) libpng.so.3 => /usr/lib/libpng.so.3 (0x4ba53000) libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0x402de000) libming.so => /usr/lib/libming.so (0x4031e000) libm.so.6 => /lib/libm.so.6 (0x4b1d3000) libmhash.so.2 => /usr/lib/libmhash.so.2 (0x40359000) libmcrypt.so.4 => /usr/lib/libmcrypt.so.4 (0x40376000) libltdl.so.3 => /usr/lib/libltdl.so.3 (0x4be1e000) libt1.so.1 => /usr/lib/libt1.so.1 (0x4b46a000) libttf.so.2 => /usr/lib/libttf.so.2 (0x4b311000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4b1f7000) libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x403ae000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4b52b000) libxsltbreakpoint.so.1 => /usr/lib/libxsltbreakpoint.so.1 (0x403bd000) libxslt.so.1 => /usr/lib/libxslt.so.1 (0x4ca74000) libdb.so.2 => /usr/lib/libdb.so.2 (0x4b372000) libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x403c0000) libcrack.so.2 => /usr/lib/libcrack.so.2 (0x403c6000) libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x4b6d7000) libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x403d0000) libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x403fe000) libresolv.so.2 => /lib/libresolv.so.2 (0x4b719000) libdl.so.2 => /lib/libdl.so.2 (0x4b1ce000) libnsl.so.1 => /lib/libnsl.so.1 (0x4b3f3000) libxml2.so.2 => /usr/lib/libxml2.so.2 (0x4b953000) libc.so.6 => /lib/libc.so.6 (0x4b0a5000) libpthread.so.0 => /lib/libpthread.so.0 (0x404be000) libaudio.so.2 => /usr/X11R6/lib/libaudio.so.2 (0x4be56000) libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x4050e000) libmng.so.1 => /usr/lib/libmng.so.1 (0x40567000) libGL.so.1 => /usr/lib/libGL.so.1 (0x405a9000) libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x40621000) libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x4b40b000) libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4b80b000) libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x4b5be000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4b415000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x4b7df000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4b2db000) libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x4b306000) libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40639000) libstdc++.so.5 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libstdc++.so.5 (0x40650000) libgcc_s.so.1 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc_s.so.1 (0x4b70f000) libaspell.so.15 => /usr/lib/libaspell.so.15 (0x40713000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) libXau.so.6 => /usr/X11R6/lib/libXau.so.6 (0x4be51000) libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4b552000) My USE flags and 'emerge info' are as above. Perhaps this should now be in another bug report?
Nope, this bug report is fine. Could you try to capture the output of configure? It looks like PHP may be trying to select the apache2 SAPI. unixd_config is exists only in there. sapi/apache2handler/php_functions.c to be exact. I don't see why it is choosing the Apache2 SAPI however from the config.log. Why do you still use Apache2 anyway? mod_mp3 is the only reason I know of, and that is just because it's unmaintained so the Apache2 part never got finished.
Created attachment 12763 [details, diff] Patch for mod_php-4.3.2.ebuild Aha. Nailed the bugger. I don't use apache2, I use apache1 (I have "-apache2" in my USE flags), but if I don't have apache2 installed, I get asked to install it every time I do an 'emerge -upv --deep world', so I installed it just to make the message go away. It shouldn't matter that I have it installed, though. Here's where the problem is: From mod_php-4.3.2.ebuild #use apache2 \ has_version '>=net-www/apache-2' \ && myconf="${myconf} --with-apxs2=/usr/sbin/apxs2" \ || myconf="${myconf} --with-apxs=/usr/sbin/apxs" It uses 'has_version' to check whether apache2 is What We Want, rather than 'use'. From mod_php-4.3.1.ebuild: if [ "`use apache2`" ] ; then myconf="${myconf} --with-apxs2=/usr/sbin/apxs2" else myconf="${myconf} --with-apxs=/usr/sbin/apxs" fi That's the right way to do it. In fact, somebody appears to have changed on purpose. Why? I fixed my own ebuild, and it worked fine after that. (Although, when I started apache up, I did get the following: * Starting apache... [Tue Jun 3 21:27:01 2003] [warn] module php4_module is already loaded, skipping [Tue Jun 3 21:27:01 2003] [warn] module php4_module is already loaded, skipping [Tue Jun 3 21:27:01 2003] [warn] module php4_module is already loaded, skipping [Tue Jun 3 21:27:01 2003] [warn] module mod_php4.c is already added, skipping [Tue Jun 3 21:27:02 2003] [warn] module mod_php4.c is already added, skipping [Tue Jun 3 21:27:02 2003] [warn] module mod_php4.c is already added, sk [ ok ] Which doesn't seem healthy. Worked fine, though.) I've attached a patch for it, although it's a fairly simple fix.
Sorry about the delay. There was a lot of working going into a proper fix for all combinations of Apache1/2. People with both of them installed together were having large issues. Please test 4.3.2-r2
mod_php-4.3.2-r2 compiles, installs, and starts up just fine with USE="-snmp", although it still breaks with USE="snmp". The problem with "module php4_module is already loaded, skipping" and "module mod_php4.c is already added, skipping" was because of the ebuild config script. After building mod_php, there is a message that says: * 1. Execute the command: * "ebuild /var/db/pkg/dev-php/mod_php-4.3.2-r2/mod_php-4.3.2-r2.ebuild config" The "pkg_config" section of that ebuild does the following: ${ROOT}/usr/sbin/apacheaddmod ${ROOT}/etc/apache/conf/apache.conf extramodules/libphp4.so mod_php4.c php4_module before=perl define=PHP4 addconf=conf/addon-modules/mod_php.conf The 'apacheaddmod' script doesn't check whether the module has already been added, so it adds it again. I think I might write a patch for it, or something. So, the apache2 issue is resolved. Any ideas about the SNMP? Thanks!
Sorry, one further thing. You set the slot of mod_php to ${APACHEVER}, which is 1 or 2. Previous versions of mod_php were slotted at 0, so -r2 will not autoclean them. Maybe set the slot to $[${APACHEVER}-1]? (Man, this is going to suck. Now some people have two versions installed, and there's no way to uninstall both ;-)
Argh. I will put in an ewarn message at the very least. This new apache stuff isn't getting rolled to stable for quite a while now. Doing that is not a suitable change, as it only keeps things working ideally for users with Apache1.
Due to a database snafu, your comment got lost: Here it is again. I really think you should change the SLOT of this ebuild from APACHEVER to APACHEVER-1. The currently stable version has a SLOT of 0, no matter what apache version you use. When this version goes stable, EVERYBODY who has mod_php installed will have two versions of it installed for no reason. The one in SLOT 0 should be unmerged, but it won't be. Putting an ewarn message doesn't seem sufficient when you KNOW that the problem is going to be there. I don't see how it only keeps things working for Apache1 - Apache2 would be no different? In addition, I don't think that this bug should be labelled as "resolved test-request", since the bug is actually about mod_php breaking with "USE=snmp", and it still does that, nothing has been done on that front at all.
I can't change the SLOT from APACHEVER to APACHEVER-1. SLOT=0 is meant for things that could be slotted but there is no need to slot them at this present moment. Barring any major objections to woodchip's email coming out tonight, Apache2 is going into stable on friday evening (PST) anyway. The SNMP problem is fixed for me at least, see bug #22643. Hence the fact that I marked it as resolved, test-request. The SNMP problem is caused by the fact that when both ucd-snmp and net-snmp are installed, PHP tries to mix them together and fails dismally.
closing old bugs.