Description:
I was not able to build new MySQL 8.0.14 from GitHub on my main build 'host" running up to date Ubuntu 14.04:
openxs@ao756:~/git/mysql-server$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l
openxs@ao756:~/git/mysql-server$ uname -a
Linux ao756 3.13.0-164-generic #214-Ubuntu SMP Wed Dec 5 10:42:33 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
openxs@ao756:~/git/mysql-server$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
Copyright (C) 2013 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@ao756:~/git/mysql-server$ cmake --version
cmake version 3.7.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
openxs@ao756:~/git/mysql-server$ git branch
5.5
5.6
5.7
* 8.0
openxs@ao756:~/git/mysql-server$ git log -1
commit 8e797a5d6eb3a87f16498edcb7261a75897babae
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date: Wed Dec 19 13:43:33 2018 +0100
Updated copyright for DEB packaging to 2019 ahead of release
When I run make I get:
...
[ 52%] Built target rpl
[ 52%] Building CXX object sql/CMakeFiles/sql_main.dir/json_dom.cc.o
json_dom.cc: In function ‘Json_dom_ptr merge_doms(Json_dom_ptr, Json_dom_ptr)’:
json_dom.cc:112:12: error: cannot bind ‘Json_object_ptr {aka std::unique_ptr<Json_object>}’ lvalue to ‘std::unique_ptr<Json_object>&&’
return left_object;
^
In file included from /usr/include/c++/4.8/memory:81:0,
from ../sql/json_dom.h:29,
from json_dom.cc:23:
/usr/include/c++/4.8/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_object; _Ep = std::default_delete<Json_object>; <template-parameter-2-3> = void; _Tp = Json_dom; _Dp = std::default_delete<Json_dom>]’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
json_dom.cc:125:10: error: cannot bind ‘Json_array_ptr {aka std::unique_ptr<Json_array>}’ lvalue to ‘std::unique_ptr<Json_array>&&’
return left_array;
^
In file included from /usr/include/c++/4.8/memory:81:0,
from ../sql/json_dom.h:29,
from json_dom.cc:23:
/usr/include/c++/4.8/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_array; _Ep = std::default_delete<Json_array>; <template-parameter-2-3> = void; _Tp = Json_dom; _Dp = std::default_delete<Json_dom>]’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
json_dom.cc: In member function ‘virtual Json_dom_ptr Json_object::clone() const’:
json_dom.cc:1010:10: error: cannot bind ‘Json_object_ptr {aka std::unique_ptr<Json_object>}’ lvalue to ‘std::unique_ptr<Json_object>&&’
return o;
^
In file included from /usr/include/c++/4.8/memory:81:0,
from ../sql/json_dom.h:29,
from json_dom.cc:23:
/usr/include/c++/4.8/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_object; _Ep = std::default_delete<Json_object>; <template-parameter-2-3> = void; _Tp = Json_dom; _Dp = std::default_delete<Json_dom>]’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
json_dom.cc: In member function ‘virtual Json_dom_ptr Json_array::clone() const’:
json_dom.cc:1150:10: error: cannot bind ‘Json_array_ptr {aka std::unique_ptr<Json_array>}’ lvalue to ‘std::unique_ptr<Json_array>&&’
return vv;
^
In file included from /usr/include/c++/4.8/memory:81:0,
from ../sql/json_dom.h:29,
from json_dom.cc:23:
/usr/include/c++/4.8/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_array; _Ep = std::default_delete<Json_array>; <template-parameter-2-3> = void; _Tp = Json_dom; _Dp = std::default_delete<Json_dom>]’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
json_dom.cc: In function ‘Json_dom_ptr merge_doms(Json_dom_ptr, Json_dom_ptr)’:
json_dom.cc:127:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
json_dom.cc: In member function ‘virtual Json_dom_ptr Json_object::clone() const’:
json_dom.cc:1012:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
json_dom.cc: In member function ‘virtual Json_dom_ptr Json_array::clone() const’:
json_dom.cc:1152:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[2]: *** [sql/CMakeFiles/sql_main.dir/json_dom.cc.o] Error 1
make[1]: *** [sql/CMakeFiles/sql_main.dir/all] Error 2
make: *** [all] Error 2
I had no problem to build 8.0.13 from GitHub there.
How to repeat:
Main steps are:
cd ~/git/mysql-server
git branch
git pull
git log -1
rm CMakeCache.txt
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/8.0 -DWITH_BOOST=/home/openxs/boost -DDOWNLOAD_BOOST=1 -DFORCE_INSOURCE_BUILD=1
make
Suggested fix:
If the system can not be used to build 8.0.14 for some reason (gcc version, missing something, whatever), I'd expect cmake command to tell me that.
Also it's strange to hit such a regression/failure at GA stage.