Bug #20119 Undefined functions when linking with libmysqlclient with yaSSL + icc
Submitted: 29 May 2006 9:20 Modified: 9 Jun 2006 16:38
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S2 (Serious)
Version:5.0.22 OS:Linux (Linux)
Assigned to: Magnus Blåudd

[29 May 2006 9:20] Magnus Blåudd
Description:
mysqldev@production:~/users/magnus/test/mysql-debug-5.0.22-linux-i686> CFLAGS=" -unroll2 -ip -mp -restrict" CC=icc CXX=icpc CXXFLAGS=" -unroll2 -ip -mp -restrict" LDFLAGS="-static-libcxa -i-static"  ~/production-icc-glibc23/Do-mysqlclient-test  ##############################################################################
#  Running Do-mysqlclient-test
##############################################################################

CC=icc
CXX=icpc
CFLAGS=-I/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/include  -unroll2 -ip -mp -restrict
LIBS=-static-libcxa -i-static -L/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib -lmysqlclient -lz -lcrypt -lnsl -lm

Running: icc  -I/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/include  -unroll2 -ip -mp -restrict test.c -static-libcxa -i-static -L/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib -lmysqlclient -lz -lcrypt -lnsl -lm

Testing from C to link with all functions in libmysqlclient... /data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib/libmysqlclient.a(yassl_imp.o)(_ZTVN5yaSSL7MessageE+0x8): In function `yaSSL::Finished::~Finished()':
../include/yassl_imp.hpp:65536: undefined reference to `__cxa_pure_virtual'
/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib/libmysqlclient.a(yassl_imp.o)(_ZTVN5yaSSL7MessageE+0xc): undefined reference to `__cxa_pure_virtual'
/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib/libmysqlclient.a(yassl_imp.o)(_ZTVN5yaSSL7MessageE+0x10): undefined reference to `__cxa_pure_virtual'
/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib/libmysqlclient.a(yassl_imp.o)(_ZTVN5yaSSL7MessageE+0x14): undefined reference to `__cxa_pure_virtual'
/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib/libmysqlclient.a(yassl_imp.o)(_ZTVN5yaSSL7MessageE+0x18): undefined reference to `__cxa_pure_virtual'
/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib/libmysqlclient.a(yassl_imp.o)(_ZTVN5yaSSL13HandShakeBaseE+0x8): more undefined references to `__cxa_pure_virtual' follow
fail

------------------------------------------------------------------------------

Running: icpc -I/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/include  -unroll2 -ip -mp -restrict test.cc -static-libcxa -i-static -L/data0/mysqldev/users/magnus/test/mysql-debug-5.0.22-linux-i686/lib -lmysqlclient -lz -lcrypt -lnsl -lm

Testing from C++ to link with all functions in libmysqlclient... pass

##############################################################################

How to repeat:
See above
[29 May 2006 13:13] Magnus Blåudd
Fixed in yaSSL upstream. Imported latest version.
[29 May 2006 13:16] Magnus Blåudd
Patch is from yaSSL
[29 May 2006 13:18] Magnus Blåudd
This is the patch http://lists.mysql.com/commits/6967
[7 Jun 2006 9:43] Magnus Blåudd
Pushed to 5.0.23 and 5.1.12 a fix that defines function  '__cxa_pure_virtual', this will remove depndency on C++ libs when linking with libmysqlclient from C.
[9 Jun 2006 16:38] Paul Dubois
Noted in 5.0.23, 5.1.12 changelogs.

On Linux, libmysqlclient when compiled with yaSSL using the icc
compiler had a spurious dependency on C++ libraries.