[cfe-dev] Questions about libc++ for linux and its git repository (if any)

salvatore benedetto salvatore.benedetto at gmail.com
Sat Jul 21 03:08:16 PDT 2012


On Fri, Jul 20, 2012 at 11:29 AM, salvatore benedetto
<salvatore.benedetto at gmail.com> wrote:
> On Thu, Jul 19, 2012 at 11:06 AM, Jean-Daniel Dupas
> <devlists at shadowlab.org> wrote:
> ....
>>>
>>> OK, re-running configure gives me the following in config.log
>>>
>>> configure:3508: WARNING: Unknown project (libcxx) won't be configured
>>> automatically
>>
>> This is expected. libc++ does not require "configuration" step. Nonetheless, "make install" will properly find the libc++ headers and install them where needed.
>>
>
> What about cross-compiling? I configured llvm in order to have
> different targets (arm and x86_64).
> Is the libcxx automagically compiled for both architecture?
>
> Anyway I did install it just fine. I only had to remove a chgrp
> root:wheel as I don't have
> that group on my ubuntu, and honestly don't even know what it is. :-)
>
> S.

On Fri, Jul 20, 2012 at 11:29 AM, salvatore benedetto
<salvatore.benedetto at gmail.com> wrote:
> On Thu, Jul 19, 2012 at 11:06 AM, Jean-Daniel Dupas
> <devlists at shadowlab.org> wrote:
> ....
>>>
>>> OK, re-running configure gives me the following in config.log
>>>
>>> configure:3508: WARNING: Unknown project (libcxx) won't be configured
>>> automatically
>>
>> This is expected. libc++ does not require "configuration" step. Nonetheless, "make install" will properly find the libc++ headers and install them where needed.
>>
>
> What about cross-compiling? I configured llvm in order to have
> different targets (arm and x86_64).
> Is the libcxx automagically compiled for both architecture?
>
> Anyway I did install it just fine. I only had to remove a chgrp
> root:wheel as I don't have
> that group on my ubuntu, and honestly don't even know what it is. :-)
>
> S.

Unfortunately is not working out of the box and not even by adding the
path with isystem.

$ clang++ -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple
thumbv7m-none-gnueabi -stdlib=libc++ -print-search-dirs
programs: =/home/emitrax/bin/llvm/bin
libraries: =/home/emitrax/bin/llvm/bin/../lib/clang/3.2

which is OK only for clang. That's where I've installed everything.

$ clang++ -stdlib=libc++ -print-search-dirs
programs: =/home/emitrax/bin/llvm/bin:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../x86_64-linux-gnu/bin
libraries: =/home/emitrax/bin/llvm/bin/../lib/clang/3.2:/usr/lib/gcc/x86_64-linux-gnu/4.6:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib/../lib64:/usr/lib/x86_64-linux-gnu:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..:/lib:/usr/lib

still wouldn't find the headers for c++ as the are under
/home/emitrax/bin/llvm/lib/c++/v1

It only find the wanted header if I use the obvious
-I/home/emitrax/bin/llvm/lib/c++/v1, but beside being
utterly wrong, it gives me other errors like global symbols missing.

In file included from /home/emitrax/bin/llvm/lib/c++/v1/list:177:
In file included from /home/emitrax/bin/llvm/lib/c++/v1/algorithm:596:
/home/emitrax/bin/llvm/lib/c++/v1/cstdlib:96:9: error: no member named
'lldiv_t' in the global namespace
using ::lldiv_t;
      ~~^
/home/emitrax/bin/llvm/lib/c++/v1/cstdlib:100:9: error: no member
named 'atoll' in the global namespace
using ::atoll;

Any suggestions about how to fix this ?

Regards,
Salvatore




More information about the cfe-dev mailing list