<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56280>56280</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLDB build problems on s390x with recent glibc
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lldb,
build-problem
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tbaederr
</td>
</tr>
</table>
<pre>
lldb fails to build on s390x with a recent glibc:
```
In file included from /builddir/build/BUILD/lldb-14.0.5.src/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp:21:
/usr/include/linux/uio.h:17:8: error: redefinition of 'struct iovec'
17 | struct iovec
| ^~~~~
In file included from /usr/include/bits/mman_ext.h:24,
from /usr/include/sys/mman.h:150,
from /builddir/build/BUILD/lldb-14.0.5.src/source/Plugins/Process/Linux/IntelPTManager.h:19,
from /builddir/build/BUILD/lldb-14.0.5.src/source/Plugins/Process/Linux/NativeProcessLinux.h:23,
from /builddir/build/BUILD/lldb-14.0.5.src/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp:12:
/usr/include/bits/types/struct_iovec.h:26:8: note: previous definition of 'struct iovec'
26 | struct iovec
| ^~~~~
```
`struct iovec` is defined both in `/usr/include/bits/types/struct_iovec.h` (from glibc) and `/usr/include/linux/uio.h` (from the kernel).
The problem only exists in s390x. FWIW I've found that just removing the `<linux/uio.h>` include from `NativeRegisterContextLinux_s390x.cpp` seems to fix the build.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFVd9vmzAQ_mvgxSoyJkB44GFNGilSNlVTpz5WBg7izsGRbbL0v9_ZkDWN1B_TJhURzvHB5-_uPp8r1TyVUjYVabmQhlhFqkHIhqiemKSgR_JL2C3hREMNvSWdFFUdJF8Cugzo6ZnR6fZ_1z1phQQi-loODTSk1WpHArbywI3QpyHa6x_rzRKtY3AVzyIapZHRNc4YNegacHArh070xo20qsG40Ub0wxHtN27FAb5DJ4wFvVC9haP1zgdPPqr3eyTL4mfGbDUYx2Bi59aewAahoi2-GOf4mOOPgNZKu4GGBlrRCyswLarFYHJj9VBbItQBkG4-ohNC4pwE-YK8cJ98eDnfdAXpTZCf3W8n75J1JazLxG7H-wcM2jNns4Atzlc7u17DMU8nmDH4lL6P8f8LucbKydu7r7znHeiRSfEZREZFTfN-csxs8nlk3pV3zN6S9yQU-7QHZ0dhPnhhjqFlJ7n3yoKzew0HoQZDPix6lv2T6C8ayJ_JF3gZJWKihNuiUtiVRE_cR38bMyIFbO7LNrYzVhDeN69gvWwPZ9_aLZCfoHuQCBCdU79Dz16rSsIO-6h8InDEChrHd6wbWd2v78kaU3gA0qoBF7dbbsnjYCw2m506iL7zCzhOyeKiRd34ZIwMJ_ll9ENiwe8MwM73-VYc_RJerFHYlElTJAUPrbASys1meT0dBVMo5uJMOD8RwkHLcmvt3jgpshXeHb4zVFGtdn4DHE7mCuEeobYuycYMvkBpxuY03JZJG-e8atNknheMtUkLRdrUfJ7Slia0aEPJK5CmDNLrgDG3q9DgzsSaMM_1auLqptNlKEpGGaMZK2gez2dZxJqC11VWtHGVNjSJgxmFHR58kWMWKd2FuvQkq6Ez6JSubs9ObozoegBPAPH5YLdKl7bieEBoHfqASh_Nb6mIQ7A">