Summary: | dev-libs/libgcrypt uses ugly inlining gcc hacks and doesn't compile with clang | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
Component: | [OLD] Library | Assignee: | Crypto team [DISABLED] <crypto+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alonbl, ComputerDruid, ryao |
Priority: | Normal | Keywords: | Bug, PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://bugs.g10code.com/gnupg/issue1406 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 297436, 417789 | ||
Attachments: |
The build log
Suggested patch |
Created attachment 315147 [details, diff]
Suggested patch
This patch enables us to build with Clang, but it causes a build failure when we build with GCC. Comment on attachment 315147 [details, diff]
Suggested patch
Then the only solution I see is appending '-std=gnu89' to CFLAGS.
Just stumbled in here. Seems like upstream states that it's fixed. Mgorny? (In reply to comment #4) > Just stumbled in here. Seems like upstream states that it's fixed. Mgorny? I can reproduce it with 1.5.0-r4 but maybe upstream referred to a newer version. I too have just stumbled across this bug
> I can reproduce it with 1.5.0-r4 but maybe upstream referred to a newer version.
Apparently so; libgcrypt-1.5.2 seems to build fine with clang-3.2 (and passes tests)
So this bug can probably be closed.
|
Created attachment 315143 [details] The build log Long story short: upstream first declares regular prototypes for functions, then 'extern __inline__' ones which simply doesn't conform to any kind of C standard I can think of, and it's a miracle gcc eats this somehow. I'll attach patch which seems to be the best course of action. It removes the pointless 'extern', and uses 'inline' in both the prototype and the declaration. This is the correct way of doing that, and should work both with and without the inline bodys. Also, configure uses AC_C_INLINE, so no reason to use __inline__. I wanted to report this directly to upstream but I'm still waiting for the registration e-mail.