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

Bug 843989

Summary: dev-util/mingw64-toolchain-10.0.0 fails to compile: libgcov.h:49:10: fatal error: mman.h: No such file or directory
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Ionen Wolkens <ionen>
Status: RESOLVED FIXED    
Severity: normal CC: proteuss
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100289
See Also: https://bugs.gentoo.org/show_bug.cgi?id=827824
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log.xz

Description Agostino Sarubbo gentoo-dev 2022-05-13 06:01:23 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/mingw64-toolchain-10.0.0 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2022-05-13 06:01:26 UTC
Created attachment 778427 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2022-05-13 06:01:26 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


checking for exported symbols... /var/tmp/portage/dev-util/mingw64-toolchain-10.0.0/work/gcc/gcc/configure: line 32086: objdump: command not found
checking for exported symbols... /var/tmp/portage/dev-util/mingw64-toolchain-10.0.0/work/gcc/libcc1/configure: line 15034: objdump: command not found
checking for -rdynamic... /var/tmp/portage/dev-util/mingw64-toolchain-10.0.0/work/gcc/gcc/configure: line 32096: objdump: command not found
checking for -rdynamic... /var/tmp/portage/dev-util/mingw64-toolchain-10.0.0/work/gcc/libcc1/configure: line 15044: objdump: command not found
/var/tmp/portage/dev-util/mingw64-toolchain-10.0.0/work/gcc/libgcc/libgcov.h:49:10: fatal error: sys/mman.h: No such file or directory
/var/tmp/portage/dev-util/mingw64-toolchain-10.0.0/work/gcc/libgcc/libgcov.h:49:10: fatal error: sys/mman.h: No such file or directory
Comment 3 Ionen Wolkens gentoo-dev 2022-05-13 06:33:23 UTC
Interesting, only happens if export the same toolchain variables which I find surprising given I've exported all of these for clang/llvm before and it built (had -native-symlinks too).

This doesn't need gcov so I can go with the easy solution and disable it entirely.

The objdump stuff is a non-issue as far as I can tell? This would happen with normal gcc too as the call hardcodes: export_sym_check="objdump${exeext} -T" if chost == cbuild
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-13 06:52:00 UTC
We try to patch gcc where possible but wouldn't surprise me if missing cases: https://github.com/gentoo/gcc-patches/blob/master/12.0.0/gentoo/26_all_plugin-objdump.patch. Veeeeery slowly upstreaming stuff but it's not a very quick process on that end.
Comment 5 Larry the Git Cow gentoo-dev 2022-05-13 06:53:20 UTC
The bug has been closed via the following commit(s):

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

commit 2a3c0f5024be20d4604d7a686039cbee6cd36a30
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-05-13 06:46:43 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-05-13 06:52:54 +0000

    dev-util/mingw64-toolchain: disable gcov
    
    Doesn't make sense for this package and if going to cause issues...
    
    Closes: https://bugs.gentoo.org/843989
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 6 Ionen Wolkens gentoo-dev 2022-05-13 06:54:14 UTC
(In reply to Sam James from comment #4)
> We try to patch gcc where possible but wouldn't surprise me if missing
> cases:
> https://github.com/gentoo/gcc-patches/blob/master/12.0.0/gentoo/
> 26_all_plugin-objdump.patch. Veeeeery slowly upstreaming stuff but it's not
> a very quick process on that end.

Ah I see, guess I could add it too for safety.
Comment 7 Larry the Git Cow gentoo-dev 2022-05-13 07:20:21 UTC
The bug has been referenced in the following commit(s):

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

commit dde8c3f4bdcec2a7435f88a047615991bc474d04
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-05-13 07:03:21 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-05-13 07:19:59 +0000

    dev-util/mingw64-toolchain: fix direct objdump call
    
    Cherry pick from Gentoo's gcc patches. Ideally don't want to
    carry/follow the full set given they do not really affect this
    (features are disabled, or irrelevant with mingw target), but
    this one does.
    
    Turns out plugin is silently skipped entirely if objdump is missing.
    
    Bug: https://bugs.gentoo.org/843989
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../files/gcc-11.3.0-plugin-objdump.patch          | 22 ++++++++++++++++++++++
 .../mingw64-toolchain-10.0.0.ebuild                |  1 +
 2 files changed, 23 insertions(+)