[MDEV-5027] Allow tokudb-engine to be used with RHEL6/CentOS6 Created: 2013-09-17  Updated: 2014-03-25  Resolved: 2014-03-25

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: 5.5.36, 5.5.37

Type: Task Priority: Minor
Reporter: Antonio Fernandes Assignee: Sergei Golubchik
Resolution: Fixed Votes: 10
Labels: tokudb

Attachments: File 4.7.3-libstdc++4.4.6.patch    
Issue Links:
Duplicate
is duplicated by MDEV-5489 Adding TokuDB engine to CentOS / RedH... Closed
Relates
relates to MDEV-5330 tokudb packages for centos6 and other... Closed
relates to MDEV-4507 Include TokuDB storage engine Closed

 Description   

ha_tokudb.so requires GLIBC_2.14

# ldd ha_tokudb.so
./ha_tokudb.so: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./ha_tokudb.so)

It appears the problem is related to handlersocket requiring GCC4.7...

https://groups.google.com/forum/#!msg/tokudb-user/TB6DZDVCq-g/lNvQ2kdbtP8J

Thank you for your great work.



 Comments   
Comment by Peter (Stig) Edwards [ 2013-09-18 ]

With mariadb-5.5.33.tar.gz src on RHEL6.3, using cmake 2.8.11.2 (2.8.9 needed by storage/tokudb/CMakeLists.txt) and gcc 4.8.1 (built using GNU SRC - http://www.gnu.org/software/gsrc/), adding the bin dirs for these to PATH and gcc lib dirs to LD_LIBRARY_PATH,

and with "-flto -fuse-linker-plugin" removed from CMAKE_MODULE_LINKER_FLAGS_RELEASE in storage/tokudb/CMakeLists.txt
and "-fuse-linker-plugin" removed from storage/tokudb/ft-index/cmake_modules/TokuSetupCompiler.cmake (I did not try using --fwhole-program)

I can compile, link and pass all "make test" tests with:

cmake . -DCMAKE_CXX_COMPILER=/path/to/gcc_4_8_1/bin/c++
make test

When running the mariadb 5.5.33 bintar package built by "make package" on RHEL6.3 after disabling transparent hugepage support:

INSTALL SONAME 'ha_tokudb';
Query OK, 0 rows affected (0.09 sec)

INSTALL PLUGIN handlersocket SONAME 'handlersocket.so';
ERROR 1126 (HY000): Can't open shared library '<removed>mariadb-5.5.33-linux-x86_64/lib/plugin/handlersocket.so' (errno: 2 /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by <removed>mariadb-5.5.33-linux-x86_64/lib/p)

If I set LD_LIBRARY_PATH in support-files/mysql.server to the location of the gcc 4.8.1 lib64 then:

INSTALL PLUGIN handlersocket SONAME 'handlersocket.so';
Query OK, 0 rows affected (0.00 sec)

UPDATE:
Link to https://github.com/Tokutek/mariadb/issues/6

Comment by Colin Charles [ 2013-11-11 ]

10.0.5 beta on RHEL6/CentOS6 also does not ship TokuDB! This on the other hand is available in Fedora 18 repository that we ship. Clearly we need to sync/fix this

Comment by Rich Prohaska [ 2013-11-11 ]

I build a debug version of mariadb-5.5.33a using gcc 4.7.1 on centos 6.2 and found the following problem: handlersocket.so has a dependency on GLIBCXX_3.4.15 which does not exist in /usr/lib64/libstdc+.so.6.0.13 but does exist in /usr/local/gcc-4.7/lib64/libstdc+.so.6.0.17. is this the cause of the build problem on CentOS 6?

$ strings bin/mysqld | grep GLIBC
GLIBC_2.3
GLIBC_2.2.5
GLIBCXX_3.4
GLIBC_2.3.2

$ strings lib/plugin/ha_tokudb.so | grep GLIBC
GLIBC_2.2.5
GLIBC_2.3
GLIBCXX_3.4
GLIBC_2.3.2

$ strings lib/plugin/handlersocket.so | grep GLIBC
GLIBC_2.2.5
GLIBC_2.3.2
GLIBCXX_3.4.15
GLIBCXX_3.4

$ strings /usr/lib64/libstdc++.so.6.0.13 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.2

$ strings /usr/local/gcc-4.7/lib64/libstdc++.so.6.0.17|grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17

Comment by Sergei Golubchik [ 2014-02-24 ]

We avoid this issue in our CentOS6/x86-64 builder by compiling with gcc-4.7.3 (which is fine for TokuDB), but with libstdc++ that comes from gcc-4.4.6 (gcc version that comes with CentOS 6). So, our binaries and plugins (namely, handlersocket and oqgraph) don't have any dependency on newer libstdc++ symbols.

Comment by Sergei Golubchik [ 2014-03-24 ]

need a different fix for 5.5.37 and 10.0.10, TokuDB 7.1.5 doesn't compile with libstdc++ from gcc-4.4.6

Comment by Rich Prohaska [ 2014-03-24 ]

we are using devtoolset-1.1 on centos 5 and centos 6 to build mariadb 5.5 and mariadb 10.0 with tokudb. devtoolset-1.1 includes gcc-4.7 but links to the systems libstdc++ library.

Comment by Sergei Golubchik [ 2014-03-25 ]

Thanks. I didn't know that devtoolset-1.1 builds with system libstdc++ (how it can do it, I wonder?).
If my current solution won't work, I'll try devtoolset.

Comment by Sergei Golubchik [ 2014-03-25 ]

Solved by linking with a small static libstdc++extra.a library that has all new (with the version GLIBCXX_3.4.15) symbols.

Generated at Thu Feb 08 07:01:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.