Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885323 - sys-libs/gpm-1.20.7-r5 fails to compile (lto): src/headers/daemon.h:175:25: error: type of ‘cinfo’ does not match original declaration [-Werror=lto-type-mismatch]
Summary: sys-libs/gpm-1.20.7-r5 fails to compile (lto): src/headers/daemon.h:175:25: e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://github.com/telmich/gpm/issues/47
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-12-10 12:30 UTC by Kostadin Shishmanov
Modified: 2024-03-06 00:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info and build log (build.log,82.83 KB, text/x-log)
2022-12-10 12:30 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2022-12-10 12:30:06 UTC
Created attachment 841239 [details]
emerge --info and build log

sys-libs/gpm-1.20.7-r5 fails to compile with CFLAGS=-flto=auto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing and LDFLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"

/var/tmp/portage/sys-libs/gpm-1.20.7-r5/work/gpm-1.20.7-abi_x86_32.x86/src/headers/daemon.h:175:25: error: type of ‘cinfo’ does not match original declaration [-Werror=lto-type-mismatch]
  175 | extern Gpm_Cinfo       *cinfo[MAX_VC+1];
      |                         ^
daemon/gpm.c:96:12: note: array types have different bounds
   96 | Gpm_Cinfo *cinfo[MAX_VC+1];
      |            ^
daemon/gpm.c:96:12: note: ‘cinfo’ was previously declared here
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Comment 1 Larry the Git Cow gentoo-dev 2024-02-07 19:20:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b043a3fc58e218b230173047b13038bb33888b9

commit 6b043a3fc58e218b230173047b13038bb33888b9
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-02-07 06:37:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-07 19:20:01 +0000

    sys-libs/gpm: prevent LTO, since it is broken
    
    src/headers/daemon.h:175:25: error: type of ‘cinfo’ does not match original declaration [-Werror=lto-type-mismatch]
    
    Bug: https://bugs.gentoo.org/885323
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/gpm/gpm-1.20.7-r5.ebuild | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)