[cfe-dev] Installing libc++

Jean-Daniel Dupas devlists at shadowlab.org
Sat Apr 16 00:34:55 PDT 2011


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








More information about the cfe-dev mailing list