[MDEV-24099] Mariadb 10.3.25 Issue with ip_len on AIX Created: 2020-11-02  Updated: 2020-12-16  Resolved: 2020-12-16

Status: Closed
Project: MariaDB Server
Component/s: Platform Power
Affects Version/s: 10.3.25
Fix Version/s: 10.3.28

Type: Bug Priority: Blocker
Reporter: A Musse Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: upstream
Environment:

Building mariadb 10.3.25 from source in [IBM i PASE](https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzalf/rzalfintro.htm) environment. This is an AIX runtime.


Attachments: File mariadb-undef-ip_len.patch    
Issue Links:
Blocks
blocks MDEV-19510 Issue with: sql/wsrep_mysqld.cc : ip... Closed
Duplicate
duplicates MDEV-20178 MariaDB server does not compile on AIX Closed

 Description   

There is a compile failure while building:

```
~/mariadb-10.3.25/sql/sql_insert.cc:2694:30: error: expected initializer before '.' token
size_t user_len, host_len, ip_len;

~/mariadb-10.3.25/sql/sql_insert.cc:2728:23: error: 'ip_ff' was not declared in this scope

```

This is failure occurs because `ip_len` is defined in `<netinet/ip.h>`

```
#define ip_len ip_ff.ip_flen
```

There is `ip_len` variable defined in sql_insert.cc and the failure occurs. From what I can tell this file does not use the the `ip_len` field from the ip struct so it should be safe to just undef ip_len if its defined. Otherwise another solution would be to rename ip_len variable to something else.

I've previously build mariadb 10.3.14 and the past and have not run into this failure. The ip_len variable was added in this commit: https://github.com/MariaDB/server/commit/0e403db2c884b72bd0b5de404f38b6cef75ed58e

I've attached a patch that un-defines `ip_len` if its defined. Thanks!



 Comments   
Comment by Daniel Black [ 2020-11-03 ]

The alternate solution is using a different variable name

This is what's in progress:

https://github.com/MariaDB/server/pull/1515/files#diff-3933d8c870499b77c02499c7205eb3e518230607b9dcd367b795831f8412409fR2755

It didn't quite make it to the soon to be next release but I hope for the release after.

Comment by Daniel Black [ 2020-11-03 ]

If you're not set on 10.3 I encourage you to checkout and test the work of EGuesnet and note any problems (or success) on the github issue (or MDEV-20178)

Comment by A Musse [ 2020-11-03 ]

Yeah for now we are set on 10.3. Will these changes be backported to 10.3?

Comment by Daniel Black [ 2020-12-16 ]

I've backported the simple fix for the described issue. Backporting all of the AIX 10.5 work resulting in a few complex merges that I ran out of time to resolve. If still important please raise a new issue.

Generated at Thu Feb 08 09:27:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.