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

Bug 657388

Summary: app-emulation/xen-tools-4.10.0 fails to emerge with gcc 8.1
Product: Gentoo Linux Reporter: spargeltarzan
Component: Current packagesAssignee: Gentoo Xen Devs <xen>
Status: RESOLVED FIXED    
Severity: normal CC: hydrapolic, jstein, viklevin2
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/9217
https://bugs.gentoo.org/show_bug.cgi?id=654766
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Emerge --info
emerge -pvq
emerge log

Description spargeltarzan 2018-06-05 12:48:46 UTC
Created attachment 534892 [details]
Emerge --info

In file included from /usr/include/features.h:428,
                 from /usr/include/assert.h:35,
                 from fuzz-emul.c:1:
fuzz-emul.c: In function ‘input_read’:
/usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^~~~~
fuzz-emul.c:66:5: note: called from here
     memcpy(dst, &s->corpus->data[s->data_index], size);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:428,
                 from /usr/include/assert.h:35,
                 from fuzz-emul.c:1:
/usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^~~~~
fuzz-emul.c:66:5: note: called from here
     memcpy(dst, &s->corpus->data[s->data_index], size);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[5]: *** [/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/fuzz/x86_instruction_emulator/../../../tools/Rules.mk:222: fuzz-emul.o] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from /usr/include/features.h:428,
                 from /usr/include/assert.h:35,
                 from x86-emulate.h:1,
                 from x86-emulate.c:1:
x86_emulate/x86_emulate.c: In function ‘is_aligned’:
/usr/include/bits/string_fortified.h:59:1: error: inlining failed in call to always_inline ‘memset’: target specific option mismatch
 __NTH (memset (void *__dest, int __ch, size_t __len))
 ^~~~~
In file included from x86-emulate.c:155:
x86_emulate/x86_emulate.c:1986:9: note: called from here
         memset(&reg, 0, sizeof(reg));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[5]: *** [/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/fuzz/x86_instruction_emulator/../../../tools/Rules.mk:222: x86-emulate.o] Error 1
make[5]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/fuzz/x86_instruction_emulator'
make[4]: *** [/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/fuzz/../../tools/Rules.mk:246: subdir-all-x86_instruction_emulator] Error 2
make[4]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/fuzz'
make[3]: *** [/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/fuzz/../../tools/Rules.mk:241: subdirs-all] Error 2
make[3]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/fuzz'
make[2]: *** [/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/../tools/Rules.mk:246: subdir-all-fuzz] Error 2
make[2]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools'
make[1]: *** [/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools/../tools/Rules.mk:241: subdirs-all] Error 2
make[1]: Leaving directory '/var/tmp/portage/app-emulation/xen-tools-4.10.0/work/xen-4.10.0/tools'
make: *** [Makefile:59: build-tools] Error 2
Comment 1 spargeltarzan 2018-06-05 12:49:24 UTC
Created attachment 534894 [details]
emerge -pvq
Comment 2 spargeltarzan 2018-06-05 12:51:12 UTC
Created attachment 534896 [details]
emerge log
Comment 4 spargeltarzan 2018-06-27 09:20:38 UTC
I am not a developer, unfortunately I do not know how to apply patches.

Maybe you could test it and merge to Gentoo repo if it fixes?
Comment 5 Tomáš Mózes 2018-06-27 09:48:42 UTC
(In reply to spargeltarzan from comment #4)
> I am not a developer, unfortunately I do not know how to apply patches.

In that case, it's probably not wise to run a hard masked gcc :)

Please read below how to apply additional patches to packages:
https://wiki.gentoo.org/wiki//etc/portage/patches
Comment 6 spargeltarzan 2018-06-28 09:49:07 UTC
Let me rephrase it a bit, I am a studied in informatics, but I do not work as a software engineer. For Gentoo I see myself between an user and a developer and someone who tries things, discovers bugs and helps how I might can to fix it. Once we have xen fixed with gcc 8.1, every user will benefit when gcc 8.1 will be in ~amd64. I will work through the patching section of the wiki and let you know my results.

For Xen I observed in the last year, that with every new Gcc release emerge fails. Maybe we discover a root cause and we can fix in long-term.
Comment 7 Tomáš Mózes 2018-06-28 10:29:18 UTC
Well, each gcc upgrade resulted in xen code change that needed to be merged upstream. I think there is nothing we (as the distro) can do about it to prevent such situation.

That's why we have a testing/stable version of xen and the testing is expected to be broken from time to time (for example when we test with gcc 8, but none of the xen developers actually use gcc 8). Of course providing such test results is appreciated and providing tested patches that fix the problem are very welcomed.
Comment 8 spargeltarzan 2018-06-28 15:38:27 UTC
Are you sure the provided patch is made for xen-tools? Looks like it might be for xen, what compiles successfully with gcc 8.1

ebuild preparing fails with the applied patches.

In xen-dev mailing lists I see some hints that some use gcc 8.1, but I don't find compilation issues or possible solutions.
Comment 9 spargeltarzan 2018-06-28 15:39:32 UTC
Xen 4.10.1 is available, if you merg it to Gentoo repo I will appreciate and test it.
Comment 10 spargeltarzan 2018-06-28 15:44:45 UTC
https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg14111.html
shows the hint the xen developers only face some warnings on gcc 8.1
Comment 11 Tomáš Mózes 2018-07-02 11:42:34 UTC
I've a work-in-progress in my overlay:
https://github.com/hydrapolic/gentoo/tree/master/app-emulation/xen
https://github.com/hydrapolic/gentoo/tree/master/app-emulation/xen-tools

Currently shim is disabled (by a patch) as it fails to compile on my machine.
Comment 12 Larry the Git Cow gentoo-dev 2018-07-17 11:07:16 UTC
The bug has been closed via the following commit(s):

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

commit adead3394f8614285565b710718df947e01a0584
Author:     Tomas Mozes <hydrapolic@gmail.com>
AuthorDate: 2018-07-13 16:49:48 +0000
Commit:     Mikle Kolyada <zlogene@gentoo.org>
CommitDate: 2018-07-17 11:06:51 +0000

    app-emulation/xen-tools: bump to 4.10.1
    
    Closes: https://bugs.gentoo.org/657388
    Package-Manager: Portage-2.3.42, Repoman-2.3.9
    Closes: https://github.com/gentoo/gentoo/pull/9217

 app-emulation/xen-tools/Manifest                  |   3 +
 app-emulation/xen-tools/files/gentoo-patches.conf |  26 ++
 app-emulation/xen-tools/xen-tools-4.10.1.ebuild   | 457 ++++++++++++++++++++++
 3 files changed, 486 insertions(+)
Comment 13 Tomáš Mózes 2018-07-17 12:48:57 UTC
In tree now, please test if it works for you.