All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: using clang for one recipe
Date: Fri, 23 Jun 2017 21:55:05 -0400	[thread overview]
Message-ID: <20170624015504.GA21604@linux-uys3> (raw)
In-Reply-To: <CAMKF1sopiKLcmpD7pCn69mW0jhR0QFYWwNpBfztdQba5GJzwHw@mail.gmail.com>

On Fri 2017-06-23 @ 03:57:06 PM, Khem Raj wrote:
> On Fri, Jun 23, 2017 at 3:39 PM, Trevor Woerner <twoerner@gmail.com> wrote:
> > Adding that line, and adding meta-clang to bblayers.conf, did get the
> > llvm/clang compiler built and installed to recipe-sysroot-native. But
> > the moment it starts to build the package, it fails immediately with:
> >
> >     | fatal error: 'string' file not found
> >     | #include <string>
> >     |          ^~~~~~~~
> >
> > Did I miss a step? That seems like a pretty basic thing that would be
> > needed for using a toolchain. If feels like I'm missing something;
> > like I need to add something else to my local.conf. Thoughts?
> > Suggestions?
> 
> which package is it ? it seems its missing proper -I paths.?

I'm investigating moving chromium to a newer version, specifically something
much closer to the current Linux stable (59.0.3071.109). My understanding is
the chromium developers use clang, which would explain why it's always so much
work to get it to compile with gcc. If I can get chromium to build with clang,
I think it would make future maintenance much easier. Switching from gyp to gn
was easy, but getting this newer version to build with gcc7 is a challenge.

When I go to the recipe-sysroot-native, I find clang in usr/bin. But from that
base location if I do a

	$ find . -name "*string*" -print

I don't find any such include files. Should they not be installed to the
native sysroot alongside clang itself?

Here's one example of a failing compile:

| [16/25529] CXX obj/base/allocator/tcmalloc/sysinfo.o
| FAILED: obj/base/allocator/tcmalloc/sysinfo.o
| ../../../recipe-sysroot-native/usr/bin/clang++ -MMD -MF obj/base/allocator/tcmalloc/sysinfo.o.d -DNO_HEAP_CHECK -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"299960-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCOMPONENT_BUILD -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DTCMALLOC_FOR_DEBUGALLOCATION -DTCMALLOC_DONT_REPLACE_SYSTEM_ALLOC -I../../base/allocator -I../../third_party/tcmalloc/chromium/src/base -I../../third_party/tcmalloc/chromium/src -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -pthread -mfpu=neon -O0 -fno-omit-frame-pointer -g2 --sysroot=../../build/linux/debian_jessie_arm-sysroot -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-reorder -Wno-unused-function -Wno-unused-local-typedefs -Wno-unused-private-field -Wno-sign-compare -Wno-unused-result -fvisibility-inlines-hidden -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11 -fno-rtti -fno-exceptions -Wno-deprecated -c ../../third_party/tcmalloc/chromium/src/base/sysinfo.cc -o obj/base/allocator/tcmalloc/sysinfo.o
| In file included from ../../third_party/tcmalloc/chromium/src/base/sysinfo.cc:62:
| In file included from ../../third_party/tcmalloc/chromium/src/base/sysinfo.h:49:
| In file included from ../../third_party/tcmalloc/chromium/src/base/logging.h:49:
| ../../third_party/tcmalloc/chromium/src/base/commandlineflags.h:52:10: fatal error: 'string' file not found
| #include <string>
|          ^~~~~~~~
| 1 error generated.


I can send you the non-working, partial recipe if you're interested too.


  reply	other threads:[~2017-06-24  1:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 22:39 using clang for one recipe Trevor Woerner
2017-06-23 22:57 ` Khem Raj
2017-06-24  1:55   ` Trevor Woerner [this message]
2017-06-24  2:45     ` Khem Raj

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=20170624015504.GA21604@linux-uys3 \
    --to=twoerner@gmail.com \
    --cc=raj.khem@gmail.com \
    --cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.