Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Denys Dmytriyenko <denis@denix.org>,
	 openembedded-devel@lists.openembedded.org
Subject: Re: nativesdk-qtbase 5.9.2 C++11 errors with gcc 6.3?
Date: Wed, 17 Jan 2018 12:20:53 +0100	[thread overview]
Message-ID: <1516188053.6718.37.camel@intel.com> (raw)
In-Reply-To: <1516187383.6718.35.camel@intel.com>

On Wed, 2018-01-17 at 12:09 +0100, Patrick Ohly wrote:
> On Tue, 2017-10-03 at 19:45 -0400, Denys Dmytriyenko wrote:
> > Martin, Khem,
> > 
> > Have you tried building Qt 5.9 with gcc 6.3 from oe-core? I'm
> > seeing
> > bunch of 
> > what seems to be C++11 related errors during do_configure of
> > nativesdk-qtbase. 
> > Target qtbase builds fine and switching to gcc 7.2 seems to resolve
> > it as well.
> > 
> > Any ideas or pointers? Thanks!
> > 
> > 
> > Errors are like these:
> > 
> > In file included from
> > ../include/QtCore/5.9.2/QtCore/private/qnumeric_p.h:1:0,
> >                  from /OE/master/build/tmp-glibc/work/x86_64-
> > nativesdk-oe-linux/nativesdk-qtbase/5.9.2+gitAUTOINC+73573fce29-
> > r0/git/src/corelib/tools/qarraydata.cpp:42:
> > ../include/QtCore/5.9.2/QtCore/private/../../../../../../git/src/co
> > re
> > lib/global/qnumeric_p.h: In function 'bool
> > qnumeric_std_wrapper::__builtin_isnan(double)':
> > ../include/QtCore/5.9.2/QtCore/private/../../../../../../git/src/co
> > re
> > lib/global/qnumeric_p.h:104:45: error: '__builtin_isnan' is not a
> > member of 'std'
> >  static inline bool isnan(double d) { return std::isnan(d); }
> 
> I'm getting the same error when building qemu 2.8.0 for intel-corei7-
> 64 
> with gcc 6.3.0.
> 
> The reason seems to be that somewhere there's a
>   #define isnan __builtin_isnan
> which doesn't work in C++ because std::__builtin_isnan    does not
> exist.
> 
> I'm still looking for the define... if someone has suggestions, I'm
> all ears.

Seems to be from /usr/include/math.h, which gets included by the
corresponding C++ header /usr/include/c++/6.3.0/cmath.

C++ explicitly states that cmath exposes functionality of math.h inside
the std namespace (https://stackoverflow.com/questions/32606023/when-us
ing-c-headers-in-c-should-we-use-functions-from-std-or-the-global-na),
so the QEMU code is correct.

To me this is starting to look like a bug in the toolchain.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.




      reply	other threads:[~2018-01-17 11:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 23:45 nativesdk-qtbase 5.9.2 C++11 errors with gcc 6.3? Denys Dmytriyenko
2017-10-13  1:21 ` Denys Dmytriyenko
2017-10-13  3:48   ` Khem Raj
2017-10-13  4:02     ` Tim Orling
2017-10-13 17:35     ` Denys Dmytriyenko
2017-10-13 18:57       ` Khem Raj
2017-10-13 19:47         ` Denys Dmytriyenko
2017-10-13 20:34           ` Denys Dmytriyenko
2017-10-13 22:14             ` Khem Raj
2017-10-13 22:58               ` Denys Dmytriyenko
2017-10-13 23:05                 ` Khem Raj
2018-01-17 11:09 ` Patrick Ohly
2018-01-17 11:20   ` Patrick Ohly [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516188053.6718.37.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=denis@denix.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox