Hi, I've built MySQL++ 1.7.9 libs on an smp machine. But every application which is built using mysql++ crashes with segfault when invoking connect() method. For example:
#include <iostream> #include <mysql++> void main() { try { Connection con( use_exceptions ); con.connect(); } catch ( BadQuery er ) { std::cout << er.error.c_str() << endl; } } Last lines of strace - libc 2.2.5, linux 2.4.18 smp (the same result for libc 2.2.4, linux 2.4.16 smp).: .............. open("/etc/mysql/my.cnf", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1897, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000 read(3, "# You can copy this to one of:\n#"..., 4096) = 1897 read(3, "", 4096) = 0 close(3) = 0 munmap(0x40016000, 4096) = 0 open("/var/lib/mysql/my.cnf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/home/projects/kia2/.my.cnf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ On another server (libc 2.2.4, linux 2.4.3, MySQL++ 1.7.9) the same place: open("/etc/mysql/my.cnf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/var/lib/mysql/my.cnf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/home/baubas/.my.cnf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) socket(PF_UNIX, SOCK_STREAM, 0) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) connect(3, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, 110) = -1 ENOENT (No such file or directory) shutdown(3, 2 /* send and receive */) = 0 close(3) = 0 brk(0x8058000) = 0x8058000 brk(0x805a000) = 0x805a000 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000 write(1, "Can\'t connect to local M"..., 93) = 93 munmap(0x40016000, 4096) = 0 _exit(0) = ? I don't get where is the problem, because it crashes only on the second server. Any help would be appreciated. Thanks in advance :) .:: Andrius Armonas ::. .:: [EMAIL PROTECTED] ::. .:: http://baubas.andrius.org ::. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php