[cfe-dev] Installing libc++

Jon Kalb jon at kalbweb.com
Mon Apr 18 13:51:16 PDT 2011


On 4/15/11 9:58 AM, "Howard Hinnant" <hhinnant at apple.com> wrote:

> 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-
> 
> Howard

You are correct. TRIPLE wasn't defined although the command was in my shell
history. In any case I executed it again and verified with:

> Jon-Kalbs-MacBook-Pro:lib jonkalb$ export TRIPLE=-apple-
> Jon-Kalbs-MacBook-Pro:lib jonkalb$ printenv
> TERM_PROGRAM=Apple_Terminal
> TERM=xterm-color
> SHELL=/bin/bash
> TMPDIR=/var/folders/+H/+HrzLvNcEXOJDia4To7fRk+++TI/-Tmp-/
> Apple_PubSub_Socket_Render=/tmp/launch-8yXakD/Render
> TERM_PROGRAM_VERSION=273.1
> OLDPWD=/opt/libcxx
> USER=jonkalb
> COMMAND_MODE=unix2003
> SSH_AUTH_SOCK=/tmp/launch-zyZoPt/Listeners
> __CF_USER_TEXT_ENCODING=0x1F5:0:0
> PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
> TRIPLE=-apple-
> PWD=/opt/libcxx/lib
> LANG=en_US.UTF-8
> ll=ls -aFl
> SHLVL=1
> HOME=/Users/jonkalb
> LOGNAME=jonkalb
> DISPLAY=/tmp/launch-4RaTPQ/org.x:0
> _=/usr/bin/printenv

Unfortunately, I'm still seeing this:

> 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'

Several lines omitted...

> + 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

Still stuck,

Jon






More information about the cfe-dev mailing list