[cfe-dev] libcxx install location?

Larry Evans cppljevans at suddenlink.net
Sat Feb 5 05:26:25 PST 2011


On 02/05/11 05:56, Larry Evans wrote:
> On 02/05/11 05:39, Jean-Daniel Dupas wrote:
>>
>> Le 5 févr. 2011 à 11:51, Larry Evans a écrit :
> [snip]
>>> Also, that libcxx page makes no mention of:
>>>  http://llvm.org/svn/llvm-project/cfe/trunk/runtime/libcxx/Makefile
>>> However, seeing:
>>>  LIBCXX_SRC_ROOT := $(LLVM_SRC_ROOT)/projects/libcxx
>>>  CPP.Flags := -nostdinc++ -I$(LIBCXX_SRC_ROOT)/include
> [snip]
>>
>> Did you had a look at this thread:
>>
>> http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-January/013017.html
>>
>>
> Yes, but I'd rather not mess with /usr/lib or /usr/include if it
> can be avoided, and the mentioned trunk/runtime/libcxx/Makefile
> suggested maybe there's another way which avoids messing with /usr.
> 
> -Larry
I went ahead and did as:

  http://libcxx.llvm.org/http://libcxx.llvm.org/http://libcxx.llvm.org/

and added symlinks from /usr/lib and /usr/include/c++.  It compiled OK;
however, the link failed with:

make compile
ls -ld /usr/lib/libc++*
lrwxrwxrwx 1 root root 69 Feb  5 07:09 /usr/lib/libc++.so ->
/home/evansl/download/llvm/svn/llvm/projects/libcxx/lib/libc++.so.1.0
ls -ld /usr/include/c++/v1
lrwxrwxrwx 1 root root 59 Feb  5 07:14 /usr/include/c++/v1 ->
/home/evansl/download/llvm/svn/llvm/projects/libcxx/include
/home/evansl/download/llvm/svn/build/Debug+Asserts/bin/clang++
-stdlib=libc++ move.cpp -o move.exe
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib64/libc++.so:
undefined reference to `__cxa_free_exception'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib64/libc++.so:
undefined reference to `__cxa_begin_catch'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib64/libc++.so:
undefined reference to `__cxa_guard_release'
...

I didn't link to path-to-libcxx/lib/libc++.1.dylib
because there was no such file.  Instead, I figured
that was a MacOS convention for shared libs; so,
I substituted the only likely file in the target
directory:

  libc++.so.1.0

Now I did *not* do the download and install of:

  http://home.roadrunner.com/~hinnant/libcppabi.zip

because the webpage:

  http://libcxx.llvm.org/

said:

  To build on Mac OS X 10.6, you need a helper library and header found
  here. cp cxxabi.h to /usr/include, and cp libc++abi.dylib to
  /usr/lib.

and I'm on ubuntu, not Mac OS X.

Am I missing something?

TIA.

-Larry






More information about the cfe-dev mailing list