Discussion:
[Qt-creator] [4.6] Clang code model doesn't work on Android
Nikos Chantziaras
2018-02-16 02:24:39 UTC
Permalink
4.6 beta1, but also the latest rc1 snapshot (15 Feb), seem to have a
non-working Clang code model when using an Android kit.

The error is usually something like this:

qglobal.h:45:12: fatal error: 'type_traits' file not found
QDebug:1:10: note: in file included from [...]

This is printed by the yellow warning sign at the top. As a result, the
code model is completely broken for the rest of the file.

Is this a known bug?
Nikos Chantziaras
2018-02-16 05:41:36 UTC
Permalink
On 16/02/18 04:24, Nikos Chantziaras wrote:
> 4.6 beta1, but also the latest rc1 snapshot (15 Feb), seem to have a
> non-working Clang code model when using an Android kit.
>
> The error is usually something like this:
>
>   qglobal.h:45:12: fatal error: 'type_traits' file not found
>   QDebug:1:10: note: in file included from [...]
>
> This is printed by the yellow warning sign at the top. As a result, the
> code model is completely broken for the rest of the file.
>
> Is this a known bug?

Well, actually it seems even the built-in code model has issues with
Android.

In both cases, standard C++ headers cannot be found. Only standard C
headers work. So this:

#include <cstdio>

appears underlined with the pop-up error message being "no such file or
directory".

But this:

#include <stdio.h>

works fine.
Ivan Donchevskii
2018-02-16 07:13:49 UTC
Permalink
ClangCodeModel should work fine if you have set up your Android toolkit properly.


I'm able to reproduce your issue when I have wrong NDK location set in the Android settings (settings->devices->android).

Point the proper folder and your errors should be gone.


Kind regards,

Ivan

________________________________
From: Qt-creator <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of Nikos Chantziaras <***@gmail.com>
Sent: Friday, February 16, 2018 6:41:36 AM
To: qt-***@qt-project.org
Subject: Re: [Qt-creator] [4.6] Clang code model doesn't work on Android

On 16/02/18 04:24, Nikos Chantziaras wrote:
> 4.6 beta1, but also the latest rc1 snapshot (15 Feb), seem to have a
> non-working Clang code model when using an Android kit.
>
> The error is usually something like this:
>
> qglobal.h:45:12: fatal error: 'type_traits' file not found
> QDebug:1:10: note: in file included from [...]
>
> This is printed by the yellow warning sign at the top. As a result, the
> code model is completely broken for the rest of the file.
>
> Is this a known bug?

Well, actually it seems even the built-in code model has issues with
Android.

In both cases, standard C++ headers cannot be found. Only standard C
headers work. So this:

#include <cstdio>

appears underlined with the pop-up error message being "no such file or
directory".

But this:

#include <stdio.h>

works fine.
Nikos Chantziaras
2018-02-16 07:31:53 UTC
Permalink
The NDK path is set up correctly:

https://i.imgur.com/3fSaHnQ.png



On 16/02/18 09:13, Ivan Donchevskii wrote:
> ClangCodeModel should work fine if you have set up your Android toolkit
> properly.
>
>
> I'm able to reproduce your issue when I have wrong NDK location set in
> the Android settings (settings->devices->android).
>
> Point the proper folder and your errors should be gone.
>
>
> Kind regards,
>
> Ivan
>
> ------------------------------------------------------------------------
> *From:* Qt-creator
> <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of
> Nikos Chantziaras <***@gmail.com>
> *Sent:* Friday, February 16, 2018 6:41:36 AM
> *To:* qt-***@qt-project.org
> *Subject:* Re: [Qt-creator] [4.6] Clang code model doesn't work on Android
> On 16/02/18 04:24, Nikos Chantziaras wrote:
>> 4.6 beta1, but also the latest rc1 snapshot (15 Feb), seem to have a
>> non-working Clang code model when using an Android kit.
>>
>> The error is usually something like this:
>>
>>    qglobal.h:45:12: fatal error: 'type_traits' file not found
>>    QDebug:1:10: note: in file included from [...]
>>
>> This is printed by the yellow warning sign at the top. As a result, the
>> code model is completely broken for the rest of the file.
>>
>> Is this a known bug?
>
> Well, actually it seems even the built-in code model has issues with
> Android.
>
> In both cases, standard C++ headers cannot be found. Only standard C
> headers work. So this:
>
>    #include <cstdio>
>
> appears underlined with the pop-up error message being "no such file or
> directory".
>
> But this:
>
>    #include <stdio.h>
>
> works fine.
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
Ivan Donchevskii
2018-02-16 07:39:12 UTC
Permalink
Ok, than it's weird. I'm using much newer NDK (16 in my case vs 10 in your) but this should not be the case.

So does that mean that your toolkit shows no red icon?


Anyways. Can you please create a bugreport at bugreports.qt.io?


Regards,

Ivan

________________________________
From: Qt-creator <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of Nikos Chantziaras <***@gmail.com>
Sent: Friday, February 16, 2018 8:31:53 AM
To: qt-***@qt-project.org
Subject: Re: [Qt-creator] [4.6] Clang code model doesn't work on Android

The NDK path is set up correctly:

https://i.imgur.com/3fSaHnQ.png



On 16/02/18 09:13, Ivan Donchevskii wrote:
> ClangCodeModel should work fine if you have set up your Android toolkit
> properly.
>
>
> I'm able to reproduce your issue when I have wrong NDK location set in
> the Android settings (settings->devices->android).
>
> Point the proper folder and your errors should be gone.
>
>
> Kind regards,
>
> Ivan
>
> ------------------------------------------------------------------------
> *From:* Qt-creator
> <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of
> Nikos Chantziaras <***@gmail.com>
> *Sent:* Friday, February 16, 2018 6:41:36 AM
> *To:* qt-***@qt-project.org
> *Subject:* Re: [Qt-creator] [4.6] Clang code model doesn't work on Android
> On 16/02/18 04:24, Nikos Chantziaras wrote:
>> 4.6 beta1, but also the latest rc1 snapshot (15 Feb), seem to have a
>> non-working Clang code model when using an Android kit.
>>
>> The error is usually something like this:
>>
>> qglobal.h:45:12: fatal error: 'type_traits' file not found
>> QDebug:1:10: note: in file included from [...]
>>
>> This is printed by the yellow warning sign at the top. As a result, the
>> code model is completely broken for the rest of the file.
>>
>> Is this a known bug?
>
> Well, actually it seems even the built-in code model has issues with
> Android.
>
> In both cases, standard C++ headers cannot be found. Only standard C
> headers work. So this:
>
> #include <cstdio>
>
> appears underlined with the pop-up error message being "no such file or
> directory".
>
> But this:
>
> #include <stdio.h>
>
> works fine.
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
Nikos Chantziaras
2018-02-16 08:15:30 UTC
Permalink
No red icons in the toolkits.

Anyway, I just installed NDK r16b, and the problem is gone.

I was using r10 because it was recommended multiple times here, and IIRC
also in the Qt documentation. (Apparently newer NDKs cause problems with
Qt?)


On 16/02/18 09:39, Ivan Donchevskii wrote:
> Ok, than it's weird. I'm using much newer NDK (16 in my case vs 10 in
> your) but this should not be the case.
>
> So does that mean that your toolkit shows no red icon?
>
>
> Anyways. Can you please create a bugreport at bugreports.qt.io?
>
>
> Regards,
>
> Ivan
>
> ------------------------------------------------------------------------
> *From:* Qt-creator
> <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of
> Nikos Chantziaras <***@gmail.com>
> *Sent:* Friday, February 16, 2018 8:31:53 AM
> *To:* qt-***@qt-project.org
> *Subject:* Re: [Qt-creator] [4.6] Clang code model doesn't work on Android
> The NDK path is set up correctly:
>
> https://i.imgur.com/3fSaHnQ.png
>
>
>
> On 16/02/18 09:13, Ivan Donchevskii wrote:
>> ClangCodeModel should work fine if you have set up your Android toolkit
>> properly.
>>
>>
>> I'm able to reproduce your issue when I have wrong NDK location set in
>> the Android settings (settings->devices->android).
>>
>> Point the proper folder and your errors should be gone.
>>
>>
>> Kind regards,
>>
>> Ivan
>>
>> ------------------------------------------------------------------------
>> *From:* Qt-creator
>> <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of
>> Nikos Chantziaras <***@gmail.com>
>> *Sent:* Friday, February 16, 2018 6:41:36 AM
>> *To:* qt-***@qt-project.org
>> *Subject:* Re: [Qt-creator] [4.6] Clang code model doesn't work on Android
>> On 16/02/18 04:24, Nikos Chantziaras wrote:
>>> 4.6 beta1, but also the latest rc1 snapshot (15 Feb), seem to have a
>>> non-working Clang code model when using an Android kit.
>>>
>>> The error is usually something like this:
>>>
>>>    qglobal.h:45:12: fatal error: 'type_traits' file not found
>>>    QDebug:1:10: note: in file included from [...]
>>>
>>> This is printed by the yellow warning sign at the top. As a result, the
>>> code model is completely broken for the rest of the file.
>>>
>>> Is this a known bug?
>>
>> Well, actually it seems even the built-in code model has issues with
>> Android.
>>
>> In both cases, standard C++ headers cannot be found. Only standard C
>> headers work. So this:
>>
>>     #include <cstdio>
>>
>> appears underlined with the pop-up error message being "no such file or
>> directory".
>>
>> But this:
>>
>>     #include <stdio.h>
>>
>> works fine.
>>
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-***@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>
>>
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-***@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
Benjamin TERRIER
2018-02-16 10:32:54 UTC
Permalink
2018-02-16 9:15 GMT+01:00 Nikos Chantziaras <***@gmail.com>:
> No red icons in the toolkits.
>
> Anyway, I just installed NDK r16b, and the problem is gone.
>
> I was using r10 because it was recommended multiple times here, and IIRC
> also in the Qt documentation. (Apparently newer NDKs cause problems with
> Qt?)
Hi,

See bug report "r11x gcc-4.9 miscompiles Qt":
https://github.com/android-ndk/ndk/issues/67

This will not be fixed, because gcc has been deprecated in favor of
clang for Android.

Regards,

Benjamin
Nikos Chantziaras
2018-02-16 20:24:31 UTC
Permalink
I created the bug report:

https://bugreports.qt.io/browse/QTCREATORBUG-19835


On 16/02/18 09:39, Ivan Donchevskii wrote:
> Ok, than it's weird. I'm using much newer NDK (16 in my case vs 10 in
> your) but this should not be the case.
>
> So does that mean that your toolkit shows no red icon?
>
>
> Anyways. Can you please create a bugreport at bugreports.qt.io?
>
>
> Regards,
>
> Ivan
>
> ------------------------------------------------------------------------
> *From:* Qt-creator
> <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of
> Nikos Chantziaras <***@gmail.com>
> *Sent:* Friday, February 16, 2018 8:31:53 AM
> *To:* qt-***@qt-project.org
> *Subject:* Re: [Qt-creator] [4.6] Clang code model doesn't work on Android
> The NDK path is set up correctly:
>
> https://i.imgur.com/3fSaHnQ.png
>
>
>
> On 16/02/18 09:13, Ivan Donchevskii wrote:
>> ClangCodeModel should work fine if you have set up your Android toolkit
>> properly.
>>
>>
>> I'm able to reproduce your issue when I have wrong NDK location set in
>> the Android settings (settings->devices->android).
>>
>> Point the proper folder and your errors should be gone.
>>
>>
>> Kind regards,
>>
>> Ivan
>>
>> ------------------------------------------------------------------------
>> *From:* Qt-creator
>> <qt-creator-bounces+ivan.donchevskii=***@qt-project.org> on behalf of
>> Nikos Chantziaras <***@gmail.com>
>> *Sent:* Friday, February 16, 2018 6:41:36 AM
>> *To:* qt-***@qt-project.org
>> *Subject:* Re: [Qt-creator] [4.6] Clang code model doesn't work on Android
>> On 16/02/18 04:24, Nikos Chantziaras wrote:
>>> 4.6 beta1, but also the latest rc1 snapshot (15 Feb), seem to have a
>>> non-working Clang code model when using an Android kit.
>>>
>>> The error is usually something like this:
>>>
>>>    qglobal.h:45:12: fatal error: 'type_traits' file not found
>>>    QDebug:1:10: note: in file included from [...]
>>>
>>> This is printed by the yellow warning sign at the top. As a result, the
>>> code model is completely broken for the rest of the file.
>>>
>>> Is this a known bug?
>>
>> Well, actually it seems even the built-in code model has issues with
>> Android.
>>
>> In both cases, standard C++ headers cannot be found. Only standard C
>> headers work. So this:
>>
>>     #include <cstdio>
>>
>> appears underlined with the pop-up error message being "no such file or
>> directory".
>>
>> But this:
>>
>>     #include <stdio.h>
>>
>> works fine.
>>
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-***@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>
>>
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-***@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>>
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-***@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
Loading...