facebook / mysql-5.6

Facebook's branch of the Oracle MySQL database. This includes MyRocks.
http://myrocks.io
Other
2.48k stars 713 forks source link

MySQL fails to build when DTrace support is enabled on Fedora #222

Closed valeriikravchuk closed 7 years ago

valeriikravchuk commented 8 years ago

I've got the following problem while building the code clonned today:

... [ 81%] Built target partition [ 81%] Building CXX object sql/CMakeFiles/sql.dir/sp_instr.cc.o In file included from /home/openxs/git/mysql-5.6/include/probes_mysql_dtrace.h:10:0, from /home/openxs/git/mysql-5.6/include/probes_mysql.h:24, from /home/openxs/git/mysql-5.6/sql/sp_instr.cc:21: /home/openxs/git/mysql-5.6/sql/sp_instr.cc: In member function Б─≤virtual bool sp_instr_stmt::execcore(THD, uint_)Б─≥: /home/openxs/git/mysql-5.6/include/probes_mysql_dtrace.h:131:1: error: invalid use of non-static member function DTRACE_PROBE6 (mysql, queryexecstart, arg1, arg2, arg3, arg4, arg5, arg6) ^ /home/openxs/git/mysql-5.6/sql/sp_instr.cc:912:3: note: in expansion of macro Б─≤MYSQL_QUERY_EXEC_STARTБ─≥ MYSQL_QUERY_EXEC_START(thd->query(), ^ ...

/home/openxs/git/mysql-5.6/sql/sp_instr.cc:912:3: note: in expansion of macro Б─≤MYSQL_QUERY_EXEC_STARTБ─≥ MYSQL_QUERY_EXEC_START(thd->query(), ^ /home/openxs/git/mysql-5.6/include/probes_mysql_dtrace.h:131:1: error: ISO C++ forbids applying Б─≤sizeofБ─≥ to an expression of function type [-fpermissive] DTRACE_PROBE6 (mysql, queryexecstart, arg1, arg2, arg3, arg4, arg5, arg6) ^ /home/openxs/git/mysql-5.6/sql/sp_instr.cc:912:3: note: in expansion of macro Б─≤MYSQL_QUERY_EXEC_STARTБ─≥ MYSQL_QUERY_EXEC_START(thd->query(), ^ sql/CMakeFiles/sql.dir/build.make:1613: recipe for target 'sql/CMakeFiles/sql.dir/sp_instr.cc.o' failed make[2]: * [sql/CMakeFiles/sql.dir/sp_instr.cc.o] Error 1 CMakeFiles/Makefile2:4925: recipe for target 'sql/CMakeFiles/sql.dir/all' failed make[1]: * [sql/CMakeFiles/sql.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *\ [all] Error 2

The code was clonned and built as usual for many weeks on this Fedore Core 23 box:

[openxs@fc23 mysql-5.6]$ fc -l 787 cd mysql-5.6/ 788 git submodule init 789 git submodule update ... 798 vi storage/rocksdb/CMakeLists.txt <-- this was to fix https://github.com/facebook/mysql-5.6/issues/147 799 make clean 800 cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system -DWITH_ZLIB=bundled -DMYSQL_MAINTAINER_MODE=0 -DWITH_EMBEDDED_SERVER=OFF -DENABLED_LOCAL_INFILE=1 -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/fb56 ... 802 make

The box was updated today. gcc is of the following version:

[openxs@fc23 mysql-5.6]$ gcc --version gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[openxs@fc23 mysql-5.6]$ git log commit f001ab343f5c184acbca70c054190a7c4c4e5237 Author: Vasile Paraschiv vasilep@fb.com Date: Mon Mar 28 19:09:55 2016 -0700 ...

gunnarku commented 8 years ago

Hi Valerii,

Thank you for the bug report!

Unfortunately at this point we officially verify that our code compiles with only a select subset of platforms (see https://github.com/facebook/mysql-5.6/wiki/Build-Steps for more details) and Fedora + gcc 5.3.x isn't one of them.

Let me investigate and see if I can set up a virtual machine somewhere to try to replicate your findings. Of course, if you have time to fix the issue and/or tune CMake rules then we would appreciate your contribution very much :-)

Regards, Gunnar

valeriikravchuk commented 8 years ago

I was able to build successfully on the same Fedora Core 23 box using the following cmake command line:

cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system -DWITH_ZLIB=bundled -DMYSQL_MAINTAINER_MODE=0 -DWITH_EMBEDDED_SERVER=OFF -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/fb56

that is, with DTrace support disabled.

There was no problem to build on Ubuntu 14.04.

gunnarku commented 8 years ago

Thanks Valerii,

Here's the system I used to replicate the experiment:

$ cat /etc/redhat-release 
Fedora release 23 (Twenty Three)
$ uname -a
Linux localhost.localdomain 4.4.6-300.fc23.x86_64 #1 SMP Wed Mar 16 22:10:37
UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ g++ --version
g++ (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)

and the CMake command-line is as follows:

cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system
-DWITH_ZLIB=bundled -DMYSQL_MAINTAINER_MODE=0 -DWITH_EMBEDDED_SERVER=OFF
-DENABLED_LOCAL_INFILE=1

No breaks.

Let me try and see what happens when I'll explicitly enable DTrace.

gunnarku commented 8 years ago

Notes:

How did you manage to get DTrace installed on Fedora 23?

gunnarku commented 7 years ago

Closing because no response. Please re-open if you want to add more details.