Bug #87349 Client build fails due to bug in mysys/my_symlink.c
Submitted: 8 Aug 2017 17:12 Modified: 30 Oct 2017 15:02
Reporter: David Ravetti Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.7.19 OS:Any
Assigned to: CPU Architecture:Any
Tags: build, client, cmake, regression

[8 Aug 2017 17:12] David Ravetti
I attempted to perform a client-only build of MySQL 5.7.19 using the build flag -DWITHOUT_SERVER=ON. The build failed when attempting to compile mysys/my_symlink.c with the error "MY_STAT undeclared in function my_is_same_file.

The function my_is_same_file is new in my_symlink.c in version 5.7.19. The function makes reference to MY_STAT, but the appropriate include statement does not exist to define MY_STAT. I don't know why, but this only impacted the client-only build and not the full server build. By adding the following line to the top of my_symlink.c, the build completed successfully:

#include "my_dir.h"

Relevant lines in my_symlink.c:

197: int my_is_same_file(...)
198: {
199: MY_STAT stat_buf;

How to repeat:
Using the source from mysql-boost-5.7.19.tar.gz, attempt to compile using the flag -DWITHOUT_SERVER=ON after making the changes to CMakeLists.txt that I submitted in bug 87348 <https://bugs.mysql.com/bug.php?id=87348>.

Suggested fix:
Add the following include line to mysys/my_symlink.c:

#include "my_dir.h"
[9 Aug 2017 6:38] MySQL Verification Team
Hello David Ravetti,

Thank you for the report and feedback!

[30 Oct 2017 15:02] David Ravetti
This issue was fixed in 5.7.20 as referenced in bug #87137. <https://bugs.mysql.com/bug.php?id=87137>