Bug 360735 - kdelibs-4.14.18 - does not compile using gcc-6
Summary: kdelibs-4.14.18 - does not compile using gcc-6
Status: RESOLVED NOT A BUG
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-19 14:39 UTC by David Kredba
Modified: 2018-05-07 19:43 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kredba 2016-03-19 14:39:22 UTC
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp: In function ‘Solid::Processor::InstructionSets Solid::Backends::Shared::cpuFeatures()’:
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:69:37: error: inconsistent user-defined literal suffixes ‘reg’ and ‘reg1’ in string literal
   #define ASM_MOV_REG(reg1, reg2)   "movq   %%r"reg1", %%r"reg2" \n\t"
                                     ^
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:102:5: note: in expansion of macro ‘ASM_MOV_REG’
     ASM_MOV_REG("cx", "dx")             // Copy ECX to EDX
     ^~~~~~~~~~~
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:114:5: error: unable to find string literal operator ‘operator""reg’ with ‘const char [315]’, ‘long unsigned int’ arguments
     ".Lno_cpuid_support%=:      \n\t"
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:70:37: error: inconsistent user-defined literal suffixes ‘reg’ and ‘var’ in string literal
   #define ASM_MOV_VAR(var, reg)     "movq   "var",     %%r"reg"  \n\t"
                                     ^
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:122:13: note: in expansion of macro ‘ASM_MOV_VAR’
             ASM_MOV_VAR("$1", "ax")             // Set EAX to 1 (features request)
             ^~~~~~~~~~~
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:64:52: error: unable to find string literal operator ‘operator""reg’ with ‘const char [100]’, ‘long unsigned int’ arguments
   #define ASM_POP(reg)              "popq   %%r"reg"             \n\t"
                                                    ^
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:124:13: note: in expansion of macro ‘ASM_POP’
             ASM_POP("bx")                       // Restore EBX
             ^~~~~~~
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:70:37: error: inconsistent user-defined literal suffixes ‘reg’ and ‘var’ in string literal
   #define ASM_MOV_VAR(var, reg)     "movq   "var",     %%r"reg"  \n\t"
                                     ^
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:133:14: note: in expansion of macro ‘ASM_MOV_VAR’
              ASM_MOV_VAR("$0x80000000", "ax")
              ^~~~~~~~~~~
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:64:52: error: unable to find string literal operator ‘operator""reg’ with ‘const char [283]’, ‘long unsigned int’ arguments
   #define ASM_POP(reg)              "popq   %%r"reg"             \n\t"
                                                    ^
/var/tmp/portage/kde-base/kdelibs-4.14.18/work/kdelibs-4.14.18/solid/solid/backends/shared/cpufeatures.cpp:142:14: note: in expansion of macro ‘ASM_POP’
              ASM_POP("bx")                      // Restore EBX
              ^~~~~~~
solid/solid/CMakeFiles/solid_static.dir/build.make:2050: recipe for target 'solid/solid/CMakeFiles/solid_static.dir/backends/shared/cpufeatures.cpp.o' failed

Reproducible: Always

Steps to Reproduce:
1. Use trunk Gcc-6
2. Try to compile kdelibs-4.14.18
3.



Debian Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811895
Comment 1 Christoph Feck 2016-03-22 21:18:56 UTC
Might also affect KF5Solid framework.
Comment 2 nsane457 2016-05-12 18:20:35 UTC
KDE needs to include the following patches from Fedora to fix this;

kdelibs-4.14.17-gcc6_literals.patch
kdelibs-4.14.17-gcc6_narrowing_hack.patch
kdelibs-4.14.17-glibc_trunc.patch

Found here:

http://pkgs.fedoraproject.org/cgit/rpms/kdelibs.git/tree/?id=b459bc2531ad507b99e566dc78495d97478e3fca
Comment 3 David Kredba 2018-05-07 19:43:27 UTC
I do not need kdelibs any more.