Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 861497 - net-libs/libsignon-glib-2.1 fails to compile: install failed: ERROR: File libsignon-glib/signon-enum-types.h could not be found
Summary: net-libs/libsignon-glib-2.1 fails to compile: install failed: ERROR: File lib...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: PATCH
: 862118 (view as bug list)
Depends on:
Blocks: 610764
  Show dependency tree
 
Reported: 2022-07-27 15:11 UTC by Agostino Sarubbo
Modified: 2022-08-06 22:43 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,50.07 KB, text/plain)
2022-07-27 15:11 UTC, Agostino Sarubbo
Details
Fix compile failure (fix-libsigon-glib.patch,426 bytes, patch)
2022-08-01 02:09 UTC, Matthew Dawson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-07-27 15:11:50 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-libs/libsignon-glib-2.1 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

Here is a bit of explanation:

-Werror=lto-type-mismatch:
User to find possible runtime issues in packages. It likely means the package is unsafe to build & use with LTO.
For projects using the same identifier but with different types across different files, they must be fixed to be consistent across the codebase.

-Werror=odr:
Used to find possible runtime issues in packages. These bugs are a problem anyway but may be even worse when combined with LTO. C++ code must comply with the One Definition Rule (ODR) - see https://en.cppreference.com/w/cpp/language/definition#One_Definition_Rule.

-Werror=strict-aliasing:
Used to find possible runtime issues in packages. These bugs are a problem anyway but may be even worse when combined with LTO.

Workarounds:
- If upstream is friendly and still active, file a bug upstream. For emulators, codecs, games, or multimedia packages, it may be worth just applying a workaround instead, as upstreams sometimes aren't receptive to these bugs (VALID FOR ALL).
- Use the new 'filter-lto' from flag-o-matic.eclass as it's likely to be unsafe with LTO (VALID FOR lto-type-mismatch - odr).
- Fix it yourself if interested, of course (VALID FOR ALL).
- Append-flags -fno-strict-aliasing (VALID FOR strict-aliasing).
- Use memcpy() but a union is sometimes suitable too (VALID FOR strict-aliasing).
- -fstrict-aliasing is implied by -O2, so this must be addressed in some form (VALID FOR strict-aliasing).

See also: https://marc.info/?l=gentoo-dev&m=165639574126280&w=2
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-27 15:11:52 UTC
Created attachment 794987 [details]
build.log

build log and emerge --info
Comment 2 Andreas Sturmlechner gentoo-dev 2022-07-31 11:35:03 UTC
*** Bug 862118 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Sturmlechner gentoo-dev 2022-07-31 11:44:40 UTC
Actually reproducible without lto.
Comment 4 Matthew Dawson 2022-08-01 02:09:57 UTC
Created attachment 796297 [details, diff]
Fix compile failure

I think I found the issue in the ebuild.  The src_test function was named src_compile, causing the code to never actually be compiled.  The attached patch fixes the issue for me.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-01 02:12:32 UTC
(In reply to Matthew Dawson from comment #4)
> Created attachment 796297 [details, diff] [details, diff]
> Fix compile failure
> 
> I think I found the issue in the ebuild.  The src_test function was named
> src_compile, causing the code to never actually be compiled.  The attached
> patch fixes the issue for me.

Oh wow.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-01 02:13:24 UTC
(In reply to Sam James from comment #5)
> (In reply to Matthew Dawson from comment #4)
> > Created attachment 796297 [details, diff] [details, diff] [details, diff]
> > Fix compile failure
> > 
> > I think I found the issue in the ebuild.  The src_test function was named
> > src_compile, causing the code to never actually be compiled.  The attached
> > patch fixes the issue for me.
> 
> Oh wow.

(It's easily done, just meant not sure I would've even thought to look for it as would've assumed it was something harder, a great spot, thanks!)
Comment 7 Larry the Git Cow gentoo-dev 2022-08-01 02:14:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cb83e169f42b7d5f993b5c9db7f9097f4f05954

commit 8cb83e169f42b7d5f993b5c9db7f9097f4f05954
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-01 02:14:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-01 02:14:16 +0000

    net-libs/libsignon-glib: fix compiling (duplicate phase def.)
    
    Closes: https://bugs.gentoo.org/861497
    Thanks-to: Matthew Dawson <matthew@mjdsystems.ca>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{libsignon-glib-2.1.ebuild => libsignon-glib-2.1-r1.ebuild}       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2022-08-01 02:33:55 UTC
The bug has been referenced in the following commit(s):

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

commit b6b16806aa569036e8c49dccd121d7039d9044dc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-01 02:28:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-01 02:30:06 +0000

    gnome-extra/gnome-shell-extension-pop-shell: [QA] fix duplicate phase (pkg_postinst)
    
    Bug: https://bugs.gentoo.org/861497
    Signed-off-by: Sam James <sam@gentoo.org>

 ...uild => gnome-shell-extension-pop-shell-1.2.0_p20210603-r1.ebuild} | 4 ++--
 ...uild => gnome-shell-extension-pop-shell-1.2.0_p20210727-r1.ebuild} | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82b4cd12790bc0b7dfb94408e73ed717fbc920ac

commit 82b4cd12790bc0b7dfb94408e73ed717fbc920ac
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-01 02:27:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-01 02:30:02 +0000

    sci-geosciences/gnome-maps: [QA] fix duplicate phase (pkg_postrm)
    
    Meant to be pkg_postrm.
    
    Let's revbump given there's no guarantee xdg_pkg_postrm has to succeed when called in
    postinst.
    
    Bug: https://bugs.gentoo.org/861497
    Signed-off-by: Sam James <sam@gentoo.org>

 .../gnome-maps/{gnome-maps-42.2.ebuild => gnome-maps-42.2-r1.ebuild}    | 2 +-
 .../gnome-maps/{gnome-maps-42.3.ebuild => gnome-maps-42.3-r1.ebuild}    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=056b1d2f7031396745000c6fd69913a23ccf346d

commit 056b1d2f7031396745000c6fd69913a23ccf346d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-01 02:27:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-01 02:29:58 +0000

    gnome-extra/gnome-characters: [QA] fix duplicate phase (pkg_postinst)
    
    Meant to be pkg_postrm.
    
    Let's revbump given there's no guarantee xdg_pkg_postrm has to succeed when called in
    postinst.
    
    Bug: https://bugs.gentoo.org/861497
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{gnome-characters-42.0.ebuild => gnome-characters-42.0-r1.ebuild}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

commit f39b58243b63c3a4fbf97f6d2989159acbda82ce
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-01 02:26:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-01 02:29:54 +0000

    app-text/cb2bib: [QA] fix duplicate phase (pkg_postinst)
    
    Shadowed optfeature-like messages.
    
    Bug: https://bugs.gentoo.org/861497
    Signed-off-by: Sam James <sam@gentoo.org>

 app-text/cb2bib/cb2bib-2.0.0-r1.ebuild | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00f2a08152dda0c393af57217f5c624d3c88b859

commit 00f2a08152dda0c393af57217f5c624d3c88b859
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-01 02:22:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-01 02:29:50 +0000

    dev-vcs/rcs: [QA] fix duplicate phase (src_test)
    
    Bug: https://bugs.gentoo.org/861497
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-vcs/rcs/rcs-5.10.0.ebuild | 4 ----
 1 file changed, 4 deletions(-)
Comment 9 Andreas Sturmlechner gentoo-dev 2022-08-01 07:34:26 UTC
Fun. Was there since at least commit ebf753a60fc2d705cf613a00842896ddc2c735ff, not sure how it built fine for me ever since.