New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys-devel/clang: stddef.h conflicts with musl's bits/alltypes.h #141
Comments
What is this good for? Pretending that I don't know what stddef.h is? |
Um... no... packages fail to compile because they end up calling both headers, and without consistent guards we end up with conflicting type definitions. If you have a better solution to the problem feel free to share it; the gist was only an example of how to get around the issue for now. |
The particular issue that I came across was a source file that included both stdio.h and stddef.h, resulting in a type definition conflict over size_t. |
Not sure wether this is an official policy, but in most cases gentoo maintainers are reluctant to accept patches which are not from upstream, especially when it is about toolchain. You may write a message to the musl mailing list and ask if this is a problem with musl or with clang, to beginn with. |
Ok I'll do that then. |
@saih792 - have you been successfull with landing this upstream? |
@soleera Building cmake-3.14.3 with clang-8.0.0 on armv7l, I hit this too, for max_align_t. Can't test your patch soon because clang rebuild wants cmake. If you've discussed the issue with clang or musl developers, can you please link where? |
@soleera i can't see that link, its a 404. I don't even know what you're patching. |
the gist is still online, you have to replace the old with the new username. |
musl uses a BSD style header layout, where the system (libc) header location must come before the compiler's header location in the search path; it does not use and is not compatible with the compiler-provided versions of the standard headers, which should never get included. |
Am also facing the same error : conflicting types for 'size_t' . I am not able to open the patch that @soleera has mentioned.. |
Feel free to reopen if you are still having issues. No comment in over a year so we are closing. |
Clang's compiler header <stddef.h> contains typedefs which conflict with musl's <bits/alltypes.h>. This is fixed by making the relevant typedef guards consistent between the two header files as in this patch.
The text was updated successfully, but these errors were encountered: