Using gcc-6* to compile kde-base/kdelibs-4.14.19 fails with "error: inconsistent user-defined literal suffixes 'reg' and 'reg1' in string literal"
Created attachment 433684 [details, diff] kdelibs-4.14.17-gcc6_literals.patch Patch to fix compilation kdelibs-4.14.19 and kdelibs-4.14.18 with gcc-6* (taken from Fedora) Patch 1 of 3
Created attachment 433686 [details, diff] kdelibs-4.14.17-gcc6_narrowing_hack.patch Patch to fix compilation kdelibs-4.14.19 and kdelibs-4.14.18 with gcc-6* (taken from Fedora) Patch 2 of 3
Created attachment 433688 [details, diff] kdelibs-4.14.17-glibc_trunc.patch Patch to fix compilation kdelibs-4.14.19 and kdelibs-4.14.18 with gcc-6* (taken from Fedora) Patch 3 of 3
These patches should go upstream.
(In reply to Michael Palimaka (kensington) from comment #4) > These patches should go upstream. I would agree but, as stated, these are Fedora patches (http://pkgs.fedoraproject.org/cgit/rpms/kdelibs.git/tree/) I'm a bit apprehensive about submitting patches on behalf of another distribution but I mentioned them here: https://bugs.kde.org/show_bug.cgi?id=360735
kde-base/kdelibs-4.14.20-r1 builds fine with gcc version 6.1.0 (Gentoo Hardened 6.1.0 p1.1) using the 3 patches (from Comment 1, 2, 3).
This is partially fixed upstream in 4.14.22: https://quickgit.kde.org/?p=kdelibs.git&a=commitdiff&h=e36051fd7cf46093bf96cb5eb987102a605be52a
Yep. But still doesnt build with gcc-6
I had same issue with =kde-base/kdelibs-4.14.24 and =sys-devel/gcc-6.1.0 but after applying kdelibs-4.14.17-glibc_trunc.patch and kdelibs-4.14.17-gcc6_narrowing_hack.patch everything went through.
Are these patches actually up for review upstream?
kdelibs-4.14.25 fails with: In file included from /usr/include/math.h:83:0, from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/cmath:45, from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/math.h:36, from /usr/include/OpenEXR/ImathPlatform.h:48, from /usr/include/OpenEXR/ImathMath.h:83, from /usr/include/OpenEXR/ImathVec.h:48, from /usr/include/OpenEXR/ImfHeader.h:51, from /usr/include/OpenEXR/ImfRgbaFile.h:50, from /var/tmp/portage/kde-base/kdelibs-4.14.25/work/kdelibs-4.14.25/kimgio/exr.cpp:15: /usr/include/bits/mathcalls.h:323:15: error: declaration of 'double trunc(double) throw ()' has a different exception specifier __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); ^~~~~ In file included from /var/tmp/portage/kde-base/kdelibs-4.14.25/work/kdelibs-4.14.25_build/config.h:140:0, from /var/tmp/portage/kde-base/kdelibs-4.14.25/work/kdelibs-4.14.25/kimgio/exr.cpp:13: /var/tmp/portage/kde-base/kdelibs-4.14.25/work/kdelibs-4.14.25_build/kdecore/kdefakes.h:178:8: note: from previous declaration 'double trunc(double)' double trunc(double); ^~~~~ make[2]: *** [kimgio/CMakeFiles/kimg_exr.dir/build.make:87: kimgio/CMakeFiles/kimg_exr.dir/exr.cpp.o] Error 1 make[2]: Leaving directory '/var/tmp/portage/kde-base/kdelibs-4.14.25/work/kdelibs-4.14.25_build' Looks like "double trunc(double);" was there because gcc did not have that definition until recently.
This looks like a possible fix? https://quickgit.kde.org/?p=kdelibs.git&a=commit&h=0c642ae95dacf894e50630ffcc1961ad1e4e0322
That last patch Andreas mentioned in previous comment worked to stop the last build error.
That patch is now in git, and soon on an rsync mirror near you. kde-base/kdelibs-4.14.25 should build successfully in a few hours.