[MDEV-6446] TokuDB engine FTBFS: more undefined references to toku_do_assert_fail Created: 2014-07-15  Updated: 2015-01-15  Due: 2015-02-11  Resolved: 2015-01-15

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.0.12
Fix Version/s: 10.0.15

Type: Bug Priority: Major
Reporter: Honza Horak Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: compile, tokudb
Environment:

x86_64, Fedora 21


Issue Links:
Relates
relates to MDEV-6449 TokuDB failed to build with 'logforma... Closed

 Description   

When compiling with TokuDB, we get the following error:

$ cmake . -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DINSTALL_LAYOUT=RPM -DRPM=fedora22 -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_DOCDIR=share/doc/mariadb -DINSTALL_DOCREADMEDIR=share/doc/mariadb -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_LIBDIR=lib64/mysql -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mariadb -DINSTALL_MYSQLTESTDIR=share/mysql-test -DINSTALL_PLUGINDIR=lib64/mysql/plugin -DINSTALL_SBINDIR=libexec -DINSTALL_SCRIPTDIR=bin -DINSTALL_SQLBENCHDIR=share -DINSTALL_SUPPORTFILESDIR=share/mariadb -DMYSQL_DATADIR=/var/lib/mysql -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DENABLED_LOCAL_INFILE=ON -DENABLE_DTRACE=ON -DWITH_EMBEDDED_SERVER=ON -DWITH_READLINE=ON -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_PCRE=system -DWITH_JEMALLOC=no -DTMPDIR=/var/tmp -DWITH_MYSQLD_LDFLAGS=-Wl,-z,relro,-z,now
...
$ make VERBOSE=1
...
[  8%] [  8%] Building C object mysys/CMakeFiles/mysys.dir/mf_format.c.o
cd /builddir/build/BUILD/mariadb-10.0.12/mysys && /usr/lib64/ccache/cc  -DHAVE_CONFIG_H -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switch
es  -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -fno-delete-null-pointer-checks  -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing  -Wno-uninitialized -DDBUG_OFF -I/builddir/build/BU
ILD/mariadb-10.0.12/include -I/builddir/build/BUILD/mariadb-10.0.12/mysys    -fPIC -o CMakeFiles/mysys.dir/mf_format.c.o   -c /builddir/build/BUILD/mariadb-10.0.12/mysys/mf_format.c
Building CXX object storage/tokudb/ft-index/util/CMakeFiles/util_static.dir/mempool.cc.o
cd /builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/util && /usr/lib64/ccache/c++   -DHAVE_CONFIG_H -DTOKUDB_VERSION=\"7.1.6\" -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600 -D__LONG_LONG_S
UPPORTED -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++11 -Wall -Werror -Wcast-align -Wshadow -Wmissing-format-attribute -Wpointer-arith -Wmissing-declarations -Wno-missing-noreturn -Wextra -Wno-error=strict-overflow -Wpacked -fno-
exceptions -fno-rtti -Wno-error=missing-format-attribute -Wmissing-format-attribute -Wlogical-op -Wtrampolines -Wswitch -Winit-self -Wstrict-null-sentinel -Wno-missing-field-initializers -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_F
ORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -fno-delete-null-pointer-checks  -fno-exceptions -fn
o-rtti -flto -fuse-linker-plugin -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -DDBUG_OFF -g -O3 -UNDEBUG -fPIC -I/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/buildheader -I/builddi
r/build/BUILD/mariadb-10.0.12/include -I/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/./xz/include -I/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/portability -I/builddir/build/BUILD/mariadb-10.0.12/storage
/tokudb/ft-index -isystem /usr/local/include    -o CMakeFiles/util_static.dir/mempool.cc.o -c /builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/util/mempool.cc
/tmp/ccL4qkTx.ltrans0.ltrans.o: In function `main':
/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/ft/logformat.cc:847: undefined reference to `toku_do_assert_fail(char const*, char const*, char const*, int, int)'
/tmp/ccL4qkTx.ltrans0.ltrans.o: In function `get_error_errno':
/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/portability/toku_assert.h:199: undefined reference to `toku_do_assert_fail(char const*, char const*, char const*, int, int)'
/tmp/ccL4qkTx.ltrans0.ltrans.o: In function `main':
/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/ft/logformat.cc:840: undefined reference to `toku_do_assert_fail(char const*, char const*, char const*, int, int)'
/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/ft/logformat.cc:839: undefined reference to `toku_do_assert_fail(char const*, char const*, char const*, int, int)'
/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/ft/logformat.cc:838: undefined reference to `toku_do_assert_fail(char const*, char const*, char const*, int, int)'
/tmp/ccL4qkTx.ltrans0.ltrans.o:/builddir/build/BUILD/mariadb-10.0.12/storage/tokudb/ft-index/ft/logformat.cc:830: more undefined references to `toku_do_assert_fail(char const*, char const*, char const*, int, int)' follow
collect2: error: ld returned 1 exit status



 Comments   
Comment by Honza Horak [ 2014-07-17 ]

I'd also changed _DEFAULT_SOURCE instead of _SVID_SOURCE, otherwise glibc reported that _SVID_SOURCE is deprecated:

diff -up mariadb-10.0.12/storage/tokudb/ft-index/cmake_modules/TokuSetupCompiler.cmake.defsource mariadb-10.0.12/storage/tokudb/ft-index/cmake_modules/TokuSetupCompiler.cmake
--- mariadb-10.0.12/storage/tokudb/ft-index/cmake_modules/TokuSetupCompiler.cmake.defsource     2014-07-15 16:47:16.070766166 +0200
+++ mariadb-10.0.12/storage/tokudb/ft-index/cmake_modules/TokuSetupCompiler.cmake       2014-07-15 16:47:36.854819917 +0200
@@ -17,7 +17,7 @@ add_c_defines(
 if (NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
   ## on FreeBSD these types of macros actually remove functionality
   add_c_defines(
-    _SVID_SOURCE
+    _DEFAULT_SOURCE
     _XOPEN_SOURCE=600
     )
 endif ()

Comment by Elena Stepanova [ 2014-07-19 ]

See also MDEV-6449

Comment by Rich Prohaska [ 2014-07-28 ]

Leif Walsh commented in MDEV-6449 regarding a similar problem with arch linux and gcc 4.9.0. Perhaps this will address the compilation problem in Fedora 21.

Comment by Sergei Golubchik [ 2015-01-14 ]

Is this still an issue? As far as I know (and as far as I have tried) TokuDB compiles just fine with gcc 4.9 now.

Comment by Honza Horak [ 2015-01-15 ]

We are still not able to build the tokudb plugin in fedora 21 and 22, but now it seems we only need a patched binutils (https://bugzilla.redhat.com/show_bug.cgi?id=1149660#c19) and we'll be fine. So, feel free to close this bug and we'll re-open if there is still some problem in mariadb. Thanks!

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