tony2001 / pinba_engine

Pinba - MySQL plugin and storage engine
http://pinba.org
GNU General Public License v2.0
478 stars 41 forks source link

Pinba 1.2, libpinba_engine.so: undefined symbol: _ZTI7handler [CentOS 6.8 x64] #59

Open billionaire opened 7 years ago

billionaire commented 7 years ago

Hello. After compiling plug-in for MySQL 5.5.54, when i try to add a plug-in MySQL error is output:

# mysql --execute="INSTALL PLUGIN pinba SONAME 'libpinba_engine.so';"
ERROR 1126 (HY000) at line 1: Can't open shared library '/usr/lib64/mysql/plugin/libpinba_engine.so' (errno: 2 /usr/lib64/mysql/plugin/libpinba_engine.so: undefined symbol: _ZTI7handler)

This happens only when compile the latest version (1.2.0) from the repository. Version 1.1.0 is going correctly. OS: CentOS 6.8 x64 (3.18.44)

Build script:

yum install https://centos6.iuscommunity.org/ius-release.rpm
yum install mysql55-server Judy protobuf libevent Judy-devel protobuf-devel libevent-devel
mkdir /usr/src/pinba_build/
cd /usr/src/pinba_build/
# wget https://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz --no-check-certificate
# tar -xzf Judy-1.0.5.tar.gz
mkdir mysql
cd mysql
VISUAL=cat; export VISUAL
MYSQL_OPTIONS=`mysqlbug | grep ': ../configure ' /tmp/failed-mysql-bugreport | sed -e 's/.*configure //'`
yumdownloader --source mysql55-server
rpm2cpio mysql55-5.5.54-1.ius.centos6.src.rpm | cpio -idmv
tar -xzf mysql-5.5.54.tar.gz
cd mysql-5.5.54
cmake ${MYSQL_OPTIONS} .
git clone 'https://github.com/tony2001/pinba_engine' '/usr/src/pinba_build/pinba_engine'
cd /usr/src/pinba_build/pinba_engine
# wget https://github.com/tony2001/pinba_engine/archive/RELEASE_1_1_0.tar.gz
# tar -xzf RELEASE_1_1_0.tar.gz
# cd /usr/src/pinba_build/pinba_engine-RELEASE_1_1_0
./buildconf.sh
autoreconf -vfi
# nano ./configure
rm -rf /usr/lib64/mysql/plugin/libpinba_engine.so
./configure ${MYSQL_OPTIONS} --with-mysql=/usr/src/pinba_build/mysql/mysql-5.5.54 --with-judy=/usr --with-protobuf=/usr --libdir=/usr/lib64/mysql/plugin/
make && make install
mysql --execute="INSTALL PLUGIN pinba SONAME 'libpinba_engine.so';"
mysql --execute="CREATE DATABASE pinba DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;"
mysql pinba < /usr/share/pinba_engine/default_tables.sql
service mysqld restart

Hopefully this bug will be fixed. Thank you for your work. Sincerely.

iprok commented 7 years ago

Just compile pinba_engine with exactly the same flags as mysql. Your issue can be solved adding -fno-rtti to compile flags.

wpbullet commented 6 years ago

@iprok is there anything else that could cause this? I'm trying something similar on Ubuntu 16.04 and I have extracted the config flags from the mysqlbug command:

--with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

I have used these flags in both the cmake command for the mariadb sources and for the ./configure command inside of the pinba engine. Everything compiles correctly but even after I copy the libpinba_engine.so to the right folder, I get the dreaded error _ZTI7handler undefined symbol

iprok commented 6 years ago

@iprok is there anything else that could cause this? I'm trying something similar on Ubuntu 16.04 and I have extracted the config flags from the mysqlbug command:

--with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

I have used these flags in both the cmake command for the mariadb sources and for the ./configure command inside of the pinba engine. Everything compiles correctly but even after I copy the libpinba_engine.so to the right folder, I get the dreaded error _ZTI7handler undefined symbol

Sorry can't help you cause I'm not a developer. But because of such problems with updating pinba, I've just migrated to docker version of it. You can try also to do so.

wpbullet commented 6 years ago

I appreciate the reply @iprok do you happen to have a link to the docker image you use? I see about 4 of them when I google!

iprok commented 6 years ago

I appreciate the reply @iprok do you happen to have a link to the docker image you use? I see about 4 of them when I google!

The official one of course: https://github.com/tony2001/pinba_engine/wiki/Docker

spider4216 commented 1 year ago

The same problem :(

Ubuntu 14.04 libjudy v1.0.5-netdata2 libevent-2.1.12-stable GCC 4.4 mysql-5.1.73 pinba_engine-RELEASE_1_2_0

Any news?