KDevPlatform strange build errors

Kevin Funk kfunk at kde.org
Fri Feb 5 18:11:59 UTC 2016


On Friday, February 05, 2016 06:40:06 PM Alexander Zhigalin wrote:
> * Upgrading to a newer GCC
> I have a Kubuntu 14.04, so the gcc version is 4.8.
> Raw string literals were implemented in gcc 4.5.

Indeed. That should be recent enough.

Please try to play around with the code a bit more. I.e. replace the 
QByteArrayLiteral with a QByteArray. Maybe this is a corner-case where we hit 
a GCC bug, I don't know.

> * Switching to Clang
> I'm using kdesrc-build, is there a way to do it?

Switching is easy:

$ export CC=clang
$ export CXX=clang++
$ kdesrc-build --refresh-build ...

For a more persistent compiler switch, use this: 
  http://stackoverflow.com/a/30742451

Please report back.

Cheers,
Kevin

> 05.02.2016, 13:06, "Kevin Funk" <kfunk at kde.org>:
> On Thursday, February 04, 2016 11:55:04 PM Alexander Zhigalin wrote:
> 
>  Hi all!
>  I'm trying to get the latest kdev on my Kubuntu 14.04
>  I was following the instructions from TechBase, compiling qt5 and running
>  kdesrc-build. The whole thing was building well, except for (such
>  misfortune!) kdevplatform! The configuration was done,
>  but while building I
>  got this:
> 
> Heya,
> 
> might be that your compiler is outdated (doesn't handle C++11 raw string
> literals(?)). What version are you using?
> 
> Try:
> * Switching to Clang
> * Upgrading to a newer GCC
> 
> Cheers,
> Kevin
> 
> 
>  [ 85%] Building CXX object
>  shell/tests/CMakeFiles/test_detectedproblem.dir/test_detectedproblem.cpp.o
>  Building CXX object
>  shell/tests/CMakeFiles/test_checkerstatus.dir/test_checkerstatus.cpp.o [
>  85%] Built target test_duchain
>  In file included from
>  /home/z/src/kdevelop/qt5/qtbase/include/QtCore/qbytearray.h:1:0, from
>  /home/z/src/kdevelop/qt5/qtbase/include/QtCore/../../src/corelib/tools/qstr
> ing.h:42, from /home/z/src/kdevelop/qt5/qtbase/include/QtCore/qstring.h:1,
> from
>  /home/z/src/kdevelop/qt5/qtbase/include/QtCore/../../src/corelib/kernel/qob
> ject.h:41, from /home/z/src/kdevelop/qt5/qtbase/include/QtCore/qobject.h:1,
> from /home/z/src/kdevelop/qt5/qtbase/include/QtCore/QObject:1, from
> /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> in/tests/test_stringhelpers.h:25, from
>  /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> in/tests/test_stringhelpers.cpp:22:
>  /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> in/tests/test_stringhelpers.cpp: In lambda function:
>  /home/z/src/kdevelop/qt5/qtbase/include/QtCore/../../src/corelib/tools/qbyt
> earray.h:141:9: error: expected primary-expression before ‘enum’ enum {
> Size = sizeof(str) - 1 }; \
>           ^
>  /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> i n/tests/test_stringhelpers.cpp:54:23: note: in expansion of macro
> ‘QByteArrayLiteral’ formatComment(QByteArrayLiteral(R"(
>                         ^
>  /home/z/src/kdevelop/qt5/qtbase/include/QtCore/../../src/corelib/tools/qbyt
> e array.h:141:9: error: expected ‘;’ before ‘enum’ enum { Size = sizeof(str)
> - 1 }; \
>           ^
>  /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> i n/tests/test_stringhelpers.cpp:54:23: note: in expansion of macro
> ‘QByteArrayLiteral’ formatComment(QByteArrayLiteral(R"(
>                         ^
>  /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> i n/tests/test_stringhelpers.cpp: In member function ‘void
>  TestDUChain::benchFormatComment()’:
>  /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> in/tests/test_stringhelpers.cpp:62:5: error: expected ‘)’ before ‘}’ token
> } ^
>  /home/z/src/kdevelop/kde/src/extragear/kdevelop/kdevplatform/language/ducha
> i n/tests/test_stringhelpers.cpp:62:5: error: expected ‘;’ before ‘}’ token
> I have checked the KDE CI and kdevplatfor seems to build well.
>  Here is the full build log: https://paste.kde.org/p4kp1bsof
>  Any ideas here?
>  Thanks in advance for help.
> 
>  --
>  Alexander Zhigalin - DevOps
> 
>  
> 
> --
> Kevin Funk | kfunk at kde.org | http://kfunk.org
>  
>  
> --
> Alexander Zhigalin - DevOps
>  

-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160205/d4522b10/attachment.sig>


More information about the KDevelop-devel mailing list