[cfe-dev] Installing libc++

Jon Kalb jon at kalbweb.com
Sun Apr 24 08:51:43 PDT 2011


On 4/18/11 2:06 PM, "Howard Hinnant" <hhinnant at apple.com> wrote:

> On Apr 18, 2011, at 4:46 PM, Jon Kalb wrote:
> 
>> On 4/16/11 12:34 AM, "Jean-Daniel Dupas" <devlists at shadowlab.org> wrote:
>> 
>>> Le 15 avr. 2011 à 18:58, Howard Hinnant a écrit :
>>> 
>>>> On Apr 15, 2011, at 12:10 PM, Jon Kalb wrote:
>>>> 
>>>>> 
>>>>> Howard, et. all,
>>>>> 
>>>>> Following the steps here: http://libcxx.llvm.org/
>>>>> 
>>>>> I¹m stuck here:
>>>>> 
>>>>> Where it says: ³That should result in a libc++.1.dylib. To install it I
>>>>> like
>>>>> to use links instead of copying, but either should work:²
>>>>> 
>>>>> Instead I get:
>>>>> 
>>>>>> Jon-Kalbs-MacBook-Pro:lib jonkalb$ sudo ./buildit

>>>>>> hash.o ios.o iostream.o locale.o memory.o mutex.o new.o random.o regex.o
>>>>>> stdexcept.o string.o strstream.o system_error.o thread.o typeinfo.o
>>>>>> utility.o valarray.o -fPIC -o libc++.so.1.0 -shared -nodefaultlibs
>>>>>> -Wl,-soname,libc++.so.1 -lpthread -lrt -lc
>>>>>> ld: unknown option: -soname
>>>>>> collect2: ld returned 1 exit status
>>>>>> 
>>>>> Any idea what I¹m doing wrong?
>>>>> 
>>>>> Jon
>>>> 
>>>> Hi Jon,
>>>> 
>>>> It looks like for some reason the following step:
>>>> 
>>>> $ export TRIPLE=-apple-
>>>> 
>>>> didn't take.  You can confirm whether or not this happened with:
>>>> 
>>>> $ printenv
>>>> 
>>>> which should list:
>>>> 
>>>> TRIPLE=-apple-
>>> 
>>> 
>>> There is no reason you have to use sudo to build the library.
>>> 
>>> For security reason, sudo cleanup the environment by default. So the
>>> "buildit"
>>> script is executed in a clean env without TRIPLE exported.
>>> 
>>> -- Jean-Daniel
>> 
>> If I don't use sudo I get this:
>> 
>> Jon-Kalbs-MacBook-Pro:lib jonkalb$ ./buildit
>> + for FILE in '../src/*.cpp'
>> + clang++ -c -g -Os -arch i386 -arch x86_64 -std=c++0x -U__STRICT_ANSI__
>> -nostdinc++ -I../include ../src/algorithm.cpp
>> /usr/bin/lipo: can't create output file: algorithm.o (Permission denied)
>> clang: error: unable to remove file: algorithm.o: can't destroy file:
>> Permission denied
>> clang: error: lipo command failed with exit code 1 (use -v to see
>> invocation)
> 
> It looks like you don't have write permission in the directory where you've
> checked out libc++.  You should check out into some place where you would
> normally do development work.
> 
> Let us know if I've guessed wrong.
> 
> Howard

Thanks Howard, you guessed right.

This is my testit result (summary):

****************************************************
Results for /Users/jonkalb/Documents/development/developement/libcxx/test:
using Apple clang version 2.0 (tags/Apple/clang-138) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix
with -std=c++0x -stdlib=libc++
----------------------------------------------------
sections without tests   : 1
sections with failures   : 153
sections without failures: 910
                       +   ----
total number of sections : 1064
----------------------------------------------------
number of tests failed   : 1221
number of tests passed   : 3019
                       +   ----
total number of tests    : 4240
****************************************************

Is this what I should expect?

Jon







More information about the cfe-dev mailing list