Skip to content
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

Closed
soleera opened this issue May 26, 2018 · 12 comments
Closed

sys-devel/clang: stddef.h conflicts with musl's bits/alltypes.h #141

soleera opened this issue May 26, 2018 · 12 comments

Comments

@soleera
Copy link

soleera commented May 26, 2018

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.

@stefson
Copy link
Contributor

stefson commented Jun 3, 2018

What is this good for? Pretending that I don't know what stddef.h is?

@soleera
Copy link
Author

soleera commented Jun 7, 2018

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.

@soleera
Copy link
Author

soleera commented Jun 7, 2018

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.

@stefson
Copy link
Contributor

stefson commented Jun 8, 2018

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.

@soleera
Copy link
Author

soleera commented Jun 8, 2018

Ok I'll do that then.

@stefson
Copy link
Contributor

stefson commented Oct 10, 2018

@saih792 - have you been successfull with landing this upstream?

@nykula
Copy link

nykula commented May 3, 2019

@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?

@blueness
Copy link
Collaborator

blueness commented May 3, 2019

@soleera i can't see that link, its a 404. I don't even know what you're patching.

@stefson
Copy link
Contributor

stefson commented May 3, 2019

the gist is still online, you have to replace the old with the new username.

@richfelker
Copy link

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.

@vikasv210
Copy link

Am also facing the same error : conflicting types for 'size_t' . I am not able to open the patch that @soleera has mentioned..

@anarchpenguin
Copy link
Contributor

Feel free to reopen if you are still having issues. No comment in over a year so we are closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants