Apache2 not loading after 'emerge system': * Apache2 has detected a syntax error in your configuration files: Syntax error on line 5 of /usr/lib/apache2/conf/modules.d/70_mod_php.conf: Cannot load /usr/lib/apache2/extramodules/libphp4.so into server: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so.5) FIXED: I fixed this by providing a symlink from the old gcc-lib dir to the recent compile: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2 -> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2 This fixed the problem, apache loaded and mod_php found the libraries correctly (so it could compile). I imagine other packages would be affected. mod_php borking: checking whether to include YP support... yes checking for yp_match in -lnsl... no checking for yp_match in -lc... no configure: error: Unable to find required yp/nis library !!! ERROR: dev-php/mod_php-4.3.6-r1 failed. !!! Function econf, Line 365, Exitcode 1 !!! econf failed config.log: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: $$nce to `_Unwind_Resume_or_Rethrow@GCC_3.3' collect2: ld returned 1 exit status Googling this error, lead to saying the issue was that the old gcc was still around; and the apache loading error agrees. Why wasn't the old gcc cleaned up? Reproducible: Always Steps to Reproduce: 1. /etc/init.d/apache2 start 2. emerge mod_php 3. (probably a lot of other packages would fail to compile also) Actual Results: In details. Expected Results: (it's really hard not to be a smart ass here) For the packages to merge and for run-time libraries to be loading correctly. Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3-gentoo-r1) ================================================================= System uname: 2.6.3-gentoo-r1 i686 Pentium II (Deschutes) Gentoo Base System version 1.4.10 distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /opt/tomcat/conf /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aavm apache2 apm arts avi berkdb crypt cups encode esd foomaticdb gd gdbm gif gpm gtk2 imlib innodb java jpeg ldap libg++ libwww mad mikmod motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python quicktime readline samba sasl sdl slang spell ssl svga tcltk tcpd tiff truetype usb x86 xml2 xmms xv zlib"
'emerge binutils gcc' and the problem should go away properly.
I have same problem with YP-nis being missing and I tried your recommendation (emerge bintools gcc) but still I get same problem still. mod_php (and php) has been broken since emerge in oct 2003 or something.
Henrick, did you look at my fix? I'm not sure if it's much of a fix, but it got me going again. It's not just a mod_php problem, it's a gcc problem, because that library is part of glibc. -Bryan
toolchain: i remember seeing these before, but i can't remember the fix.
`emerge prune gcc` and make sure that all but the latest 3.3.2 is slated for removal run the fix_libtool_files.sh script to update the .la files run `env-update` and make sure your ld.so.conf lists only 3.3.2
Status update: 1. Only gcc-3.3.2-r5 installed now ([ebuild R ] sys-devel/gcc-3.3.2-r5). 2. executed 'fix_libtool_files.sh VER' on VER found in /usr/lib/gcc-lib/i686-pc-linux-gnu (executed on many differnet versions found inside portage tree too.) 3. /usr/sbin/envupdate executed. 4. closed shell and reopened and executed 'emerge mod_php php' - same problem. I tried Bryan Duff's "hack" and that did do the trick. I just can't help feeling that this will break something else. :-( Anyways. Thanks Bryan Duff. I have been missing my PHP.
I think I've found the solution. I had exaclty the same problem after I upgraded from gcc 3.2.3 -> 3.3.3 Apache refused to start: --------------------------- nexus root #/etc/init.d/apache start * Starting apache... Syntax error on line 61 of /etc/apache/conf/apache.conf: Cannot load /etc/apache/extramodules/libphp4.so into server: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.so.5) --------------------------- And emerge mod_php gave me the exactly same error Brian had, about nis/yp lib, even thought I put -nis -yp in my USE variable. Tried to mess with /usr/portage/eclass/php-sapi.eclass removing the line "enable-yp" from $myconf, and emerge mod_php again, now the configure process bypassed the nis/yp thing but stopped later with another error. A complete "emerge system" also didnt helped. Then I got here, did exactly as SpanKY said and the problem remained: apache refused to start and mod_php/php to compile. The solution came after I deleted the directories 3.2.3 and 3.3.2 inside /usr/lib/gcc-lib/i686-pc-linux-gnu, leaving 3.3.3 only. Joao Paulo M. Fischer
Please emerge rsync and confirm if this still happens with a current toolchain and php.
upgrade paths should be stable now since we've done some work with the ebuilds/gcc-config/fix-libtool-scripts