Summary: | dev-libs/ustr fails to compile | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Sven Eden <sven.eden> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jstein, sidereal |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/18173 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963 | ||
Attachments: |
build.log
Proposed patch Proposed patch (with ebuild update) |
Description
Agostino Sarubbo
2020-07-10 08:04:58 UTC
Created attachment 648722 [details]
build.log
build log and emerge --info
Sorry for the late reply! I'll look into it during the next week! Created attachment 662260 [details, diff] Proposed patch I ran into this myself today and did some investigating. The library depends on the old/traditional GCC inline semantics. The gcc_5-check patch in files fixes this for GCC specifically by defining "inline" to mean "inline __attribute__ ((gnu_inline))" which restores this behaviour, but it detects this by specifically looking for a particular version of GCC and STDC, so it breaks on gcc-compatible compilers. I believe changing this check to look for __GNUC_STDC_INLINE__ will fix this for clang. See the compiler documentation here: https://clang.llvm.org/docs/AttributeReference.html#gnu-inline https://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Inline.html I've attached a proposed patch, which appears to fix this issue. Created attachment 662263 [details, diff]
Proposed patch (with ebuild update)
Hello, thanks for the patch. I believe you can speed up the process by making a pull-request via Github. This is only relevant for clang/LLVM But I assume the linker used is irrelevant. @Agostino : Something is not right with your patch. With gcc-9.3.0 I now get the "multiple definitions" errors here. (In reply to Sven Eden from comment #7) > @Agostino : Something is not right with your patch. > > With gcc-9.3.0 I now get the "multiple definitions" errors here. Patch comes from Fergus (In reply to Sven Eden from comment #7) > @Agostino : Something is not right with your patch. > > With gcc-9.3.0 I now get the "multiple definitions" errors here. My fault. I also want to uplift the ebuild to EAPI 7 and forgot that the patches have to go into PATCHES array. Sorry! And the patch is made by Fergus Dall, and not Agostino Sarubbo, of course. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a13790eb155f9c5740fb0c11b56ab2d81dd7f591 commit a13790eb155f9c5740fb0c11b56ab2d81dd7f591 Author: Fergus Dall <sidereal@google.com> AuthorDate: 2020-09-24 08:08:39 +0000 Commit: Aaron Bauman <bman@gentoo.org> CommitDate: 2020-11-13 21:31:15 +0000 dev-libs/ustr: Fix compilation using clang/LLVM This package depends on old-style GCC inline functions, but the patch to maintain this behaviour on newer compilers only works for GCC specifically. Replace this with a check for __GNUC_STDC_INLINE__, which is documented to work with both GCC and clang. Bug: https://bugs.gentoo.org/732026 Closes: https://bugs.gentoo.org/732026 Signed-off-by: Fergus Dall <sidereal@google.com> Signed-off-by: Sven Eden <sven.eden@prydeworx.com> Signed-off-by: Aaron Bauman <bman@gentoo.org> dev-libs/ustr/files/ustr-1.0.4-inline-check.patch | 27 ++++++++ dev-libs/ustr/ustr-1.0.4-r9.ebuild | 83 +++++++++++++++++++++++ 2 files changed, 110 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a13790eb155f9c5740fb0c11b56ab2d81dd7f591 commit a13790eb155f9c5740fb0c11b56ab2d81dd7f591 Author: Fergus Dall <sidereal@google.com> AuthorDate: 2020-09-24 08:08:39 +0000 Commit: Aaron Bauman <bman@gentoo.org> CommitDate: 2020-11-13 21:31:15 +0000 dev-libs/ustr: Fix compilation using clang/LLVM This package depends on old-style GCC inline functions, but the patch to maintain this behaviour on newer compilers only works for GCC specifically. Replace this with a check for __GNUC_STDC_INLINE__, which is documented to work with both GCC and clang. Bug: https://bugs.gentoo.org/732026 Closes: https://bugs.gentoo.org/732026 Signed-off-by: Fergus Dall <sidereal@google.com> Signed-off-by: Sven Eden <sven.eden@prydeworx.com> Signed-off-by: Aaron Bauman <bman@gentoo.org> dev-libs/ustr/files/ustr-1.0.4-inline-check.patch | 27 ++++++++ dev-libs/ustr/ustr-1.0.4-r9.ebuild | 83 +++++++++++++++++++++++ 2 files changed, 110 insertions(+) |