#21789 [Opn]: GCC 3.2.1 needs stdc++ linked
| From: | ron at imperators dot ca | Date: | Sat, 25 Jan 2003 22:54:17 +0000 |
| Subject: | #21789 [Opn]: GCC 3.2.1 needs stdc++ linked | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-31245@lists.php.net to get a copy of this message | ||
ID: 21789
User updated by: ron@imperators.ca
Reported By: ron@imperators.ca
Status: Open
Bug Type: Compile Failure
Operating System: Solaris 8
PHP Version: 4.3.0
New Comment:
Thanks for the notes. The fix you described was similar to what I
actually did to solve the problem, but since it was happening under
Solaris 8, the solution wasn't exactly as described. I would like to
suggest the addition of a flag (--enable-stdc++) to the configure
script so that the same operation could be achieved more easily by any
user having similar problems, regarless of platform, OS or shell.
Ron.
Previous Comments:
------------------------------------------------------------------------
[2003-01-24 15:56:48] llaguno@rogers.com
Duplicate: bug 19983
Notes: fix for the libsablot.so compile errors during php-4.3.0 make:
[sablotron-0.97 with php-4.3.0 on redhat linux 8.0]
1. rpm -U expat-1.95.5-1.i386.rpm
2. rpm -i sablotron-0.97-1.i386.rpm
3. rpm -i sablotron-devel-0.97-1.i386.rpm
4. rpm -e php //current version 4.2.2
5. remove the packages dependent on php-4.2.2 if preceding command
fails
because of dependencies
6. install httpd-2.0.44
// this fixes the error related to missing file 'instdso'. note that
apache2
7. add following line to /root/.bashrc
export LDFLAGS='-lstdc++'
// as explained earlier in this bug report, the undefined references
are
in the stdc++ libraries. Pavel Hlavnicka from Ginger Alliance
suggested
exporting the c++ compiler flag.
7. cd /usr/local/php/php-4.3.0
8. .configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
--with-zlib --with-dom --with-gd --enable-xslt --with-xslt-sablot
--with-sablot-js
9. make
10. make install
------------------------------------------------------------------------
[2003-01-21 07:30:51] ron@imperators.ca
Yes, Sablotron was compiled with the same version of GCC.
------------------------------------------------------------------------
[2003-01-21 01:15:41] sniper@php.net
Was the sablot compiled also with that same GCC version?
------------------------------------------------------------------------
[2003-01-20 23:43:57] ron@imperators.ca
With GCC 3.2.1 these symbols can be found in libstdc++. When php 4.3.0
is linked with -lsablot, there is no easy way to link it to stdc++, to
account for the changes of the locations of these functions in the new
GCC API. I would recommend a configure option like --enable-stdc++ to
allow the user to link this manually like --enable-libgcc.
excerpt from compile :
.lo main/internal_functions_cli.lo -lsablot -liconv -lexpat -liconv
-lcurl -lcrypt -lresolv -lm -ldl -lnsl -lsocket -lgcc -lcrypt -lcurl
-lz -lssl -lcrypto -ldl -lsocket -lnsl -lz -o sapi/cli/php
Undefined first referenced
symbol in file
__cxa_pure_virtual /usr/local/lib/libsablot.so
vtable for __cxxabiv1::__si_class_type_info/usr/local/lib/libsablot.so
vtable for
__cxxabiv1::__vmi_class_type_info/usr/local/lib/libsablot.so
operator new[](unsigned) /usr/local/lib/libsablot.so
vtable for __cxxabiv1::__class_type_info/usr/local/lib/libsablot.so
operator delete(void*) /usr/local/lib/libsablot.so
operator new(unsigned) /usr/local/lib/libsablot.so
__gxx_personality_v0 /usr/local/lib/libsablot.so
operator delete[](void*) /usr/local/lib/libsablot.so
ld: fatal: Symbol referencing errors. No output written to
sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
bash-2.03# gcc --version
gcc (GCC) 3.2.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
bash-2.03#
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21789&edit=1