Bug #83384 filed to link the product
Submitted: 14 Oct 2016 7:45 Modified: 15 Apr 2017 1:33
Reporter: Kemin Zhou Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.7.15 OS:Red Hat
Assigned to: CPU Architecture:Any
Tags: compiler linking

[14 Oct 2016 7:45] Kemin Zhou
Description:

When using RedHat 7, gcc 4.8.3 compiler, the mysql library can be build without any problem.
After upgrading to gcc 5.3.0 I encountered an error during linking.  Using parallel make, I can see that almost all of the package can built and linked.  The only problem is around 85% 
==================

[ 85%] Built target mysqlpump_lib
[ 85%] Linking CXX executable ../mysqlpump
/usr/local/lib/libboost_chrono.so: undefined reference to `std::runtime_error::runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/usr/local/lib/libboost_chrono.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
/usr/local/lib/libboost_system.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
/usr/local/lib/libboost_chrono.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error const&)@GLIBCXX_3.4.21'
/usr/local/lib/libboost_system.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
/usr/local/lib/libboost_chrono.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status

How to repeat:
Try to use GCC 5.3.0 installed at /user/local/
and default compiler gcc 4.8.3 install at /usr

It looks like the linker is confused which could be a configuration issue.
[10 Mar 2017 10:07] MySQL Verification Team
Hello Kemin Zhou,

Thank you for the report.
I'm not seeing the reported issue with gcc 5.3.0 when compiling 5.7.17.
Could you please confirm if this is fixed, and if you are still seeing the issue then report us back with exact cmake command to investigate further at our end.

Thanks,
Umesh
[10 Mar 2017 10:07] MySQL Verification Team
Build details..

Attachment: 83384_5.7.17.log (application/octet-stream, text), 180.99 KiB.

[11 Apr 2017 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[15 Apr 2017 1:33] Kemin Zhou
After seeing this bug, I used other means to install MySql, so that this bug is no longer an issue.
This bug may not be easy to reproduce on a different computer, it could be the problem of my own computer.

I will mark it as fixed.