Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 855599

Summary: dev-lang/gprolog-1.5.0-r1 fails to compile (lto): wam_archi.h:62:34: error: global register variable follows a function definition
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Prolog project <prolog>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68384
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2022-07-01 20:15:22 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-lang/gprolog-1.5.0 fails to compile (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

NOTE:
This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-01 20:15:24 UTC
Created attachment 789383 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-07-01 20:15:42 UTC
I'm not 100% sure that it is an lto fault. After if you dig into it, please remove the blocker bug if you think this has nothing to do with lto. Thanks
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-11 18:26:18 UTC
(In reply to Agostino Sarubbo from comment #2)
> I'm not 100% sure that it is an lto fault. After if you dig into it, please
> remove the blocker bug if you think this has nothing to do with lto. Thanks

It is, see e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68384.
Comment 4 Agostino Sarubbo gentoo-dev 2024-04-30 07:18:57 UTC
lto_tinderbox has reproduced this issue with version 1.5.0-r1 - Updating summary.
Comment 5 Larry the Git Cow gentoo-dev 2024-09-05 04:08:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=628886ee3e4364da8e389ba12b7c980073c6d656

commit 628886ee3e4364da8e389ba12b7c980073c6d656
Author:     Eli Schwartz <eschwartz@gentoo.org>
AuthorDate: 2024-09-03 22:21:43 +0000
Commit:     Eli Schwartz <eschwartz@gentoo.org>
CommitDate: 2024-09-05 04:07:44 +0000

    dev-lang/gprolog: mark as LTO-unsafe
    
    It is using global register variables, and there's a GCC bug that makes
    this not work with LTO.
    
    Closes: https://bugs.gentoo.org/855599
    Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>

 dev-lang/gprolog/gprolog-1.5.0-r1.ebuild | 5 +++++
 1 file changed, 5 insertions(+)