[MDEV-23732] Build fails with lastest C/C 3.1 Created: 2020-09-14 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Georg Richter | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
MYSQL_PORT and MYSQL_UNIX_ADDR are documented parts of C API and need to be defined in Connector/C. Since both definitions also exist in mysql_version.h, build will break. |
| Comments |
| Comment by Sergei Golubchik [ 2020-09-14 ] |
|
georg, I think a better fix would be to make sure mysql.cc and other clients include mysql_version.h before Connector/C headers, this way we'll know they use server declarations as they did before. And not just randomly server or Connector/C declarations depending on what header happened to be included first. |
| Comment by Georg Richter [ 2020-09-14 ] |
|
serg I think it would be better to build Connector/C inside server with -DMARIADB_PORT and -DMARIADB_UNIX_ADDR to be sure that they have the same values. |
| Comment by Sergei Golubchik [ 2020-09-14 ] |
|
Yes, this is even better. And then we won't need this patch for mysql_version.h.in, as I'd rather get a compiler error when definitions differ. |