[CONC-492] Can't compile a client plugin with libmariadb-dev-compat on ubuntu 20.04 Created: 2020-09-04 Updated: 2020-09-06 Resolved: 2020-09-05 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.1.9 |
| Fix Version/s: | 3.1.10 |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Miguel Sacristan Izcue | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 20.04 |
||
| Description |
|
I can't seem to compile a very simple c++ file with the `mysql/client_plugin.h` file included. Here is a sample file to reproduce
My command line is `g++ main.cpp -I /usr/include/mysql -lmysql`. I am getting this error.
I think the last error is due to a bug in gcc where it doesn't properly expand the macro `MYSQL_CLIENT_PLUGIN_HEADER`, but `uchar` is not defined anywhere except `server/my_global.h` which I think I am not supposed to include but I am not sure. I have a feeling this is related to the fact that now all my `my_*.h` files are empty except for a compiler warning. I have notice this only after upgrading from ubuntu 18.04 to ubuntu 20.04. I would appreciate any help please. If I have made a mistake along the way please let me know as well if more info is needed. Thanks in advance |
| Comments |
| Comment by Georg Richter [ 2020-09-05 ] | |
|
If a plugin is build outside of the source tree, we can't include ma_global.h (not delivered in binary package) - instead of we need to add a
to the pvio header file. As a workaround you could also add this typedef in your code before including mariadb include files. | |
| Comment by Georg Richter [ 2020-09-05 ] | |
|
Fixed in rev. 822233846243008060e2a683ca5900351977a1fe | |
| Comment by Miguel Sacristan Izcue [ 2020-09-05 ] | |
|
Thanks a lot @Georg Richter I am impressed by the turnaround time. I applied the work around already and worked as expected thansk. I still have a couple of question I was hoping you could maybe help me find the answers to. 1. Where can I find info about why the files my_*.h where sort of removed? Was this something coming from mysql upstream or a mariadb decision? Let me know if I should make this questions through another channel | |
| Comment by Georg Richter [ 2020-09-06 ] | |
|
1) Long time ago we removed all internal files, which weren't part of the API. |