[cfe-dev] Installing libc++
Jon Kalb
jon at kalbweb.com
Mon Apr 18 13:46:56 PDT 2011
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
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/algorithm.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/bind.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/chrono.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include
>>>> ../src/condition_variable.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/exception.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/future.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/hash.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/ios.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/iostream.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/locale.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/memory.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/mutex.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/new.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/random.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/regex.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/stdexcept.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/string.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/strstream.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/system_error.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/thread.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/typeinfo.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/utility.cpp
>>>> + for FILE in '../src/*.cpp'
>>>> + clang++ -c -g -Os -fPIC -nostdinc++ -I../include ../src/valarray.cpp
>>>> + cc algorithm.o bind.o chrono.o condition_variable.o exception.o future.o
>>>> 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)
Jon
More information about the cfe-dev
mailing list