Bug #92870 Include header in a wrong way
Submitted: 20 Oct 2018 13:30 Modified: 21 Nov 2018 10:09
Reporter: Fang Tony Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0 community server OS:SUSE (15.0)
Assigned to: CPU Architecture:x86 (AMD 1600x)
Tags: df_registration_types.h, mysql_com.h

[20 Oct 2018 13:30] Fang Tony
The GCC encountered bellow error when I compile the project 'Kbengine' which is an open source project on GitHub and relies on MySQL.
------------error area------------------
In file included from /usr/include/mysql/mysql.h:81:0,
                 from db_interface_mysql.h:14,
                 from db_exception.cpp:4:
/usr/include/mysql/mysql_com.h:1011:10: fatal error: mysql/udf_registration_types.h: No such file or directory
 #include <mysql/udf_registration_types.h>
compilation terminated.
--------------error area-----------------

How to repeat:
Every time I compile the project with MySQL Server 8.0 or 5.x.

Suggested fix:
I only found the header 'udf_registration_types.h' under folder '/usr/include/mysql/mysql', so I changed the code '#include <mysql/udf_registration_types.h>' in the file '/usr/include/mysql/mysql_com.h':1011:10 to '#include "mysql/udf_registration_types.h"'and it works for me.

I'm not sure if it is a buggy of MySQL community server.
[21 Oct 2018 10:06] Terje Røsten
You should use mysql_config to find correct build flags.

/usr/bin/mysql_config --cflags

will output something like:


If you add that option to gcc when building Kbengine, it should.
[21 Oct 2018 10:09] Terje Røsten
Fixing status.
[22 Nov 2018 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".