tony2001 / pinba_engine

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

Installation on Ubuntu 16.04 and MySQL 5.7.15 #56

Closed perepechaev closed 7 years ago

perepechaev commented 7 years ago

Hi, i compiled mysql

apt source mysql-server-5.7
cd mysql-5.7-5.7.15
cmake 

and fetched pinba-engine-source

apt source pinba-engine-mysql-5.7
cd pinba-engine-mysql-1.1.0
./buildconf.sh
./configure --with-mysql=/tmp/mysql/mysql-5.7-5.7.15 --libdir=/usr/local/mysql/lib/plugin/
sudo make install

And after trying install plugin i get error:

mysql> INSTALL PLUGIN pinba SONAME 'libpinba_engine.so';
ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql/lib/plugin/libpinba_engine.so' (errno: 2 /usr/local/mysql/lib/plugin/libpinba_engine.so: undefined symbol: mysql_malloc_service)

Also i am trying rebuild pinba with release-engine-1.2.0, release-engine-1.0.0 and get this error

I found bug in ubuntu tracker: https://bugs.launchpad.net/ubuntu/+source/pinba-engine-mysql/+bug/1590893 . But I don't know what I have to do

ldd -v /usr/local/mysql/lib/plugin/libpinba_engine.so
    linux-gate.so.1 =>  (0xb7775000)
    libevent-2.0.so.5 => /usr/lib/i386-linux-gnu/libevent-2.0.so.5 (0xb76b9000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7664000)
    libJudy.so.1 => /usr/lib/i386-linux-gnu/libJudy.so.1 (0xb763a000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7484000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7467000)
    /lib/ld-linux.so.2 (0x800e3000)

    Version information:
    /usr/local/mysql/lib/plugin/libpinba_engine.so:
        libm.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libm.so.6
        libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.2) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libc.so.6
    /usr/lib/i386-linux-gnu/libevent-2.0.so.5:
        libpthread.so.0 (GLIBC_2.0) => /lib/i386-linux-gnu/libpthread.so.0
        libc.so.6 (GLIBC_2.3.4) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.2) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.15) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.1) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.7) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.17) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libc.so.6
    /lib/i386-linux-gnu/libm.so.6:
        ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
        libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_PRIVATE) => /lib/i386-linux-gnu/libc.so.6
    /usr/lib/i386-linux-gnu/libJudy.so.1:
        libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libc.so.6
    /lib/i386-linux-gnu/libc.so.6:
        ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
        ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
        ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
    /lib/i386-linux-gnu/libpthread.so.0:
        ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
        ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
        libc.so.6 (GLIBC_2.3.2) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.1) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2) => /lib/i386-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_PRIVATE) => /lib/i386-linux-gnu/libc.so.6
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial
$ uname -a
Linux site 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:05 UTC 2016 i686 i686 i686 GNU/Linux
perepechaev commented 7 years ago

also i'm trying devel version with last commit 76d646e3dafb08d07080237ad200f085908929e9

ValentinNikolaev commented 7 years ago

confirm problem. the same problem Ubuntu 16.04 and MySQL 5.7.16

Distributor ID: LinuxMint
Description:    Linux Mint 18 Sarah
Release:    18
Codename:   sarah
tony2001 commented 7 years ago

Same problem again and again. The package was configured in one way and the sources you are using were configured in another way. That's why I recommend building the server yourself - this way you'll be using the same sources and it'll work 100%.

perepechaev commented 7 years ago

Hy tony. I've rebuild mysql-server. And after that pinba-engine-plugin was rebuild too.

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.7.16, for Linux (i686) using  EditLine wrapper

Connection id:      3
Current database:
Current user:       root@localhost
SSL:            Not in use
Current pager:      stdout
Using outfile:      ''
Using delimiter:    ;
Server version:     5.7.16 Source distribution

But get some error:

mysql> INSTALL PLUGIN pinba SONAME 'libpinba_engine.so';
ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql/lib/plugin/libpinba_engine.so' (errno: 2 /usr/local/mysql/lib/plugin/libpinba_engine.so: undefined symbol: mysql_malloc_service)

How it was rebuild:

~/mysql/mysql-5.7-5.7.16$ make clean

~/mysql/mysql-5.7-5.7.16$ cmake .
-- Running cmake version 3.5.1
-- Configuring with MAX_INDEXES = 64U
-- SIZEOF_VOIDP 4
-- MySQL 5.7.16
-- Packaging as: mysql-5.7.16-Linux-i686
-- Local boost dir /home/user/boost/boost_1_59_0
-- Local boost zip /home/user/boost/boost_1_59_0.tar.gz
-- Found /home/user/boost/boost_1_59_0/boost/version.hpp
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 105900
-- BOOST_INCLUDE_DIR /home/user/boost/boost_1_59_0
-- WITH_PROTOBUF=bundled
-- protobuf version is 2.6
-- Using cmake version 3.5.1
-- Disabling -Wunused-but-set-variable warning for building NDB
-- Disabling -Wstrict-aliasing warning for building NDB
-- Not building NDB
-- Using Boost headers from /home/user/boost/boost_1_59_0
-- MYSQLX - Text log of protobuf messages enabled
-- Library mysqlclient depends on OSLIBS -lpthread;m;rt;dl
-- Library mysqlserver depends on OSLIBS -lpthread;m;rt;crypt;dl;numa
-- INSTALL mysqlclient.pc lib/pkgconfig
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: _GNU_SOURCE;_FILE_OFFSET_BITS=64;BOOST_GEOMETRY_SQRT_CHECK_FINITENESS;HAVE_CONFIG_H;HAVE_LIBEVENT1
-- CMAKE_C_FLAGS:  -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS:  -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter
-- CMAKE_C_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -fno-expensive-optimizations -DDBUG_OFF
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -fno-expensive-optimizations -DDBUG_OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/mysql/mysql-5.7-5.7.16

~/mysql/mysql-5.7-5.7.16$ make
-- Running cmake version 3.5.1
...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/mysql/mysql-5.7-5.7.16

Pinba plugin

~/pinba/pinba_engine$ git branch
  master
* release.1.2.0
~/pinba/pinba_engine$ git log -1
commit 99ca84d4b6ad77301533e3eb19dea1282f60d456
Author: Antony Dovgal <tony@daylessday.org>
Date:   Fri Sep 30 16:36:41 2016 +0300

    regenerate sparsehash autotools files

~/pinba/pinba_engine$ ./configure --with-mysql=/home/user/mysql/mysql-5.7-5.7.16/ --libdir=/usr/local/mysql/lib/plugin/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking syslimits.h usability... no
checking syslimits.h presence... no
checking for syslimits.h... no
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for gawk... (cached) gawk
checking for strndup... yes
checking for sysconf... yes
checking for recvmmsg... yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for floor in -lm... yes
checking for pthread_setaffinity_np in -lpthread... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for MySQL source code... /home/user/mysql/mysql-5.7-5.7.16
checking for MySQL version >= 5.1... ok
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing src/pinba_config.h commands
config.status: creating: src/pinba_config.h: prefix PINBA_ENGINE for src/config.h defines
config.status: unchanged src/pinba_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in sparsehash (/home/user/pinba/pinba_engine/sparsehash)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  '--with-mysql=/home/user/mysql/mysql-5.7-5.7.16/' '--libdir=/usr/local/mysql/lib/plugin/' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for memcpy... yes
checking for memmove... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for uint16_t... yes
checking for u_int16_t... yes
checking for __uint16... no
checking for long long... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking how to run the C++ preprocessor... g++ -E
checking google/malloc_extension.h usability... no
checking google/malloc_extension.h presence... no
checking for google/malloc_extension.h... no
checking whether the compiler implements namespaces... yes
checking the location of hash_map... <tr1/unordered_map>
checking how to include hash_fun directly... <tr1/functional>
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
perepechaev commented 7 years ago

Tony, what i am doing wrong?

tchwpkgorg commented 7 years ago

Hmm, why was this ticket closed? pinba-engine-mysql-5.7 is broken in Ubuntu 16.04.

asakasinsky commented 6 years ago

the same problem