Summary: | sys-devel/flex-2.6.4 with sys-libs/glibc-2.26 - Segmentation fault: …src/stage1flex -o stage1scan.c …/src/scan.l | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | iGentoo <AlphatPC> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ab4bd, gentoo-bugzilla, sam, slyfox |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/westes/flex/issues/241 | ||
See Also: |
https://sourceware.org/bugzilla/show_bug.cgi?id=21789 https://bugs.gentoo.org/show_bug.cgi?id=705800 |
||
Whiteboard: | fixed in 2.6.4-r4 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 870412, 628768 | ||
Attachments: |
flex-2.6.4-build.log
workaround patch |
Description
iGentoo
2017-08-23 17:37:38 UTC
Created attachment 490324 [details, diff]
workaround patch
It's caused by reallocarray() added to glibc-2.26. The problem is lack of #define _GNU_SOURCE (or any other way to pull explicit prototype). Fixed upstream as: https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380 The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa6c077d00c3a21b75ae646421aefadcad527f80 commit aa6c077d00c3a21b75ae646421aefadcad527f80 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2017-10-13 20:16:10 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2017-10-13 20:19:23 +0000 sys-devel/flex: Rev bump to fix multiple problems Closes: https://bugs.gentoo.org/628744 Closes: https://bugs.gentoo.org/625508 See: https://bugs.gentoo.org/632523 Package-Manager: Portage-2.3.10, Repoman-2.3.3 .../flex-2.6.4-fix-build-with-glibc2.6+.patch | 767 +++++++++++++++++++++ sys-devel/flex/files/flex-2.6.4-libobjdir.patch | 26 + sys-devel/flex/flex-2.6.4-r1.ebuild | 85 +++ 3 files changed, 878 insertions(+) *** Bug 634984 has been marked as a duplicate of this bug. *** The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bec6a7be57fc3493dccef497b5d4b513c315f5f1 commit bec6a7be57fc3493dccef497b5d4b513c315f5f1 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-10-25 11:41:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-25 11:42:25 +0000 sys-devel/flex: backport "config.h" fix too We already have the patch to config.h/configure.ac backported but we don't have the fix to actually *use* config.h everywhere, and clearly from bug #705800 it wasn't sufficient to just backport it (for reasons covered in the bug & upstream bug). Bug: https://bugs.gentoo.org/628744 Bug: https://bugs.gentoo.org/705800 Signed-off-by: Sam James <sam@gentoo.org> .../flex/files/flex-2.6.4-implicit-func-decl.patch | 50 ++++++++++++ sys-devel/flex/flex-2.6.4-r3.ebuild | 95 ++++++++++++++++++++++ 2 files changed, 145 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af4a94a1b5b778c0d983fbe6370b5ded4e6b54e1 commit af4a94a1b5b778c0d983fbe6370b5ded4e6b54e1 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-10-28 00:35:41 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-28 01:54:19 +0000 sys-devel/flex: backport further macro fixes The gist is that the original glibc-2.26 patch was incomplete and didn't help with cross-compilation or non-glibc environments fully. There were a succession of further upstream commits now backported here. Noticed when doing some more Clang 16 work. This complements bec6a7be57fc3493dccef497b5d4b513c315f5f1 in that more effort is taken to ensure all necessary macros are defined so needed functions are available. Bug: https://bugs.gentoo.org/628744 Bug: https://bugs.gentoo.org/705800 See: bec6a7be57fc3493dccef497b5d4b513c315f5f1 See: 4d77781e2db7bb8bef7f390c43efc04ba58ff7bb See: aa6c077d00c3a21b75ae646421aefadcad527f80 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/flex/Manifest | 2 +- .../flex-2.6.4-fix-build-with-glibc2.26.patch | 219 +++++++++++++++++++++ .../{flex-2.6.4-r3.ebuild => flex-2.6.4-r4.ebuild} | 20 +- 3 files changed, 233 insertions(+), 8 deletions(-) |