While rebuilding php from srpm, the final linking does a -lstdc++ which failed. Looking in /usr/lib, I noticed a couple of libstdc++ symlinks, but never one that actually made for a libstd++.so - I made that symlink (pointed it to libstdc++-2.8.0) and the build worked fine.
Nope. You should use g++ to link C++ shared libraries. g++ takes care of adding necessary -L options to ld. ld -shared shouldn't be used.
ok - then it's a bug in the php srpm - either way, an RH 7.2 SRPM *should* be buildable on RH 7.2, IMHO - I'll try to change the component
nope, I can't change the component - could you? thanks!
Although it seems weird, since we definitely have built that src.rpm if it is our src.rpm, I'm reassigning to php.
still broken in 7.3 - jakub's comment about it needing to g++ looks to be true - if the gcc in this link line is replaced with g++, everything works fine /bin/sh /usr/src/redhat/BUILD/php-4.1.2/build-cgi/libtool --silent --mode=link gcc -I. -I/usr/src/redhat/BUILD/php-4.1.2/ -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/main -I/usr/src/redhat/BUILD/php-4.1.2 -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/Zend -I/usr/include/libxml2 -I/usr/include/freetype2/freetype -I/usr/include/imap -I/usr/include/mysql -I/usr/local/include -I/usr/include/pspell -I/usr/include/ucd-snmp -I/usr/src/redhat/BUILD/php-4.1.2/main -I/usr/src/redhat/BUILD/php-4.1.2/Zend -I/usr/src/redhat/BUILD/php-4.1.2/TSRM -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/TSRM -O2 -march=i386 -mcpu=i686 -fPIC -prefer-non-pic -static -L/usr/kerberos/lib -o libphp4.la -rpath /usr/src/redhat/BUILD/php-4.1.2/build-cgi/libs -export-symbols /usr/src/redhat/BUILD/php-4.1.2/sapi/cgi/php.sym -L/usr/kerberos/lib stub.lo Zend/libZend.la sapi/cgi/libsapi.la main/libmain.la ext/zlib/libzlib.la ext/bcmath/libbcmath.la ext/bz2/libbz2.la ext/calendar/libcalendar.la ext/curl/libcurl.la ext/dba/libdba.la ext/dbx/libdbx.la ext/domxml/libdomxml.la ext/exif/libexif.la ext/ftp/libftp.la ext/gd/libgd.la ext/gettext/libgettext.la ext/gmp/libgmp.la ext/iconv/libiconv.la ext/mbstring/libmbstring.la ext/ncurses/libncurses.la ext/openssl/libopenssl.la ext/pcre/libpcre.la ext/posix/libposix.la ext/pspell/libpspell.la ext/session/libsession.la ext/shmop/libshmop.la ext/sockets/libsockets.la ext/standard/libstandard.la ext/sysvsem/libsysvsem.la ext/sysvshm/libsysvshm.la ext/wddx/libwddx.la ext/xml/libxml.la ext/yp/libyp.la TSRM/libtsrm.la -lpam -ldl -lexpat -lmm -lpspell -lncurses -lcrypt -lpam -lgmp -lgd -lfreetype -lpng -lz -ljpeg -lz -lxml2 -ldb -lgdbm -lcurl -ldl -lcrypto -lssl -lcurl -lbz2 -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lttf -lfreetype -lpng -ljpeg -lz -lnsl -lresolv -lcrypt /bin/sh /usr/src/redhat/BUILD/php-4.1.2/build-cgi/libtool --silent --mode=link gcc -I. -I/usr/src/redhat/BUILD/php-4.1.2/ -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/main -I/usr/src/redhat/BUILD/php-4.1.2 -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/Zend -I/usr/include/libxml2 -I/usr/include/freetype2/freetype -I/usr/include/imap -I/usr/include/mysql -I/usr/local/include -I/usr/include/pspell -I/usr/include/ucd-snmp -I/usr/src/redhat/BUILD/php-4.1.2/main -I/usr/src/redhat/BUILD/php-4.1.2/Zend -I/usr/src/redhat/BUILD/php-4.1.2/TSRM -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/TSRM -O2 -march=i386 -mcpu=i686 -fPIC -L/usr/kerberos/lib -o php -export-dynamic stub.lo libphp4.la /usr/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status make[1]: *** [php] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.1.2/build-cgi' make: *** [all-recursive] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.95634 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.95634 (%build) doing this more "manually" jmm@jmm /usr/src/redhat/BUILD/php-4.1.2/build-cgi> sudo /bin/sh /usr/src/redhat/BUILD/php-4.1.2/build-cgi/libtool --silent --mode=link gcc -I. -I/usr/src/redhat/BUILD/php-4.1.2/ -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/main -I/usr/src/redhat/BUILD/php-4.1.2 -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/Zend -I/usr/include/libxml2 -I/usr/include/freetype2/freetype -I/usr/include/imap -I/usr/include/mysql -I/usr/local/include -I/usr/include/pspell -I/usr/include/ucd-snmp -I/usr/src/redhat/BUILD/php-4.1.2/main -I/usr/src/redhat/BUILD/php-4.1.2/Zend -I/usr/src/redhat/BUILD/php-4.1.2/TSRM -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/TSRM -O2 -march=i386 -mcpu=i686 -fPIC -L/usr/kerberos/lib -o php -export-dynamic stub.lo libphp4.la /usr/bin/ld: cannot find -lstdc++ jmm@jmm /usr/src/redhat/BUILD/php-4.1.2/build-cgi> sudo /bin/sh /usr/src/redhat/BUILD/php-4.1.2/build-cgi/libtool --silent --mode=link g++ -I. -I/usr/src/redhat/BUILD/php-4.1.2/ -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/main -I/usr/src/redhat/BUILD/php-4.1.2 -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/Zend -I/usr/include/libxml2 -I/usr/include/freetype2/freetype -I/usr/include/imap -I/usr/include/mysql -I/usr/local/include -I/usr/include/pspell -I/usr/include/ucd-snmp -I/usr/src/redhat/BUILD/php-4.1.2/main -I/usr/src/redhat/BUILD/php-4.1.2/Zend -I/usr/src/redhat/BUILD/php-4.1.2/TSRM -I/usr/src/redhat/BUILD/php-4.1.2/build-cgi/TSRM -O2 -march=i386 -mcpu=i686 -fPIC -L/usr/kerberos/lib -o php -export-dynamic stub.lo libphp4.la jmm@jmm /usr/src/redhat/BUILD/php-4.1.2/build-cgi> ls -l php -rwxr-xr-x 1 root root 1648390 May 17 15:06 php as noted in the original report, a symlink is another possible workaround, but I'd tend to think jakub's answer may be better
since the symlink is definitely ugly, i'm just gonna change the summary line to better reflect the reality of the bug
This is all settled in the latest and greatest release. Closing Phil =--=