Ryan F
08-16-2003, 06:28 AM
I'm trying to compile MySQL 4.0 right now and am getting a "undefined reference to '__cxa_pure_virtual' error during the 'make' stage. The MySQL manual tells me that to fix this I need to install libstdc++v3. The problem is I cannot find this on the web anywhere. I have libstcd++-3.2.2-5 and the same devel package installed and my gcc is version 3.2.2-5 as well. The MySQL manual page I'm refering to is here:
http://www.mysql.com/doc/en/Linux-x86.html
The machine I'm trying to compile it on is a Dell 1750 with dual Xeons and a hardware RAID controller running Red Hat 9.
If anyone knows where to get libstcd++v3 that would be fantastic.
choon
08-16-2003, 05:44 PM
Hi,
Did you try the following:
ftp://mirror.nus.edu.sg/pub/redhat/9.0/ftp-install/RedHat/RPMS/libstdc++-3.2.2-5.i386.rpm
ftp://mirror.nus.edu.sg/pub/redhat/9.0/ftp-install/RedHat/RPMS/libstdc++-devel-3.2.2-5.i386.rpm
Thanks.
Kindest regards,
Choon
P.S. ops... sorry just noticed that you have already tried it :(
P.P.S. Let me try to compile it in my Red Hat Linux 9 Desktop... will let you know the result :)
choon
08-16-2003, 07:59 PM
Hi Ryan F,
Please check whether do you have the following installed and also its dependencies:
gcc-c++
libstdc++
libstdc++-devel
ncurses-devel
Thanks.
Kindest regards,
Choon
Ryan F
08-17-2003, 02:34 AM
I didn't have ncurses-devel installed. I installed it and tried to make again but it dies at the same point. Here's my error
mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x8): undefined reference to `__cxa_pure_virtual'
mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x18): undefined reference to `__cxa_pure_virtual'
mysqlbinlog.o(.gnu.linkonce.d._ZTV9Log_event+0x1c): undefined reference to `__cxa_pure_virtual'
collect2: ld returned 1 exit status
Here's the one of the strings I've tried using for the configure command:
CXX="gcc -O3" ./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql --mandir=/usr/share/man --infodir=/usr/share/info --with-mysqld-user=mysql --with-openssl --with-tcp-port=3306 --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-raid -with-named-curses-libs=/usr/lib/libncurses.so.5.3 --enable-local-infile
Thanks for taking the time to try to help me!
Ryan
spock
08-17-2003, 11:07 AM
Originally posted by Ryan F
I have libstcd++-3.2.2-5 and the same devel package installed and my gcc is version 3.2.2-5 as well.
Then you have libstdc++ v3. You don't need to install it again. When compiling C++ you should invoke the compiler as g++ rather than gcc.
CXX="gcc -O3" ...
should be
CXX="g++ -O3" ...
This may fix the problem, which is that libstdc++ is not being used by the linker. It probably won't if linker flags are being overridden too.