[cfe-dev] libcxx install location?
devlists at shadowlab.org
Sat Feb 5 05:52:06 PST 2011
Le 5 févr. 2011 à 14:26, Larry Evans a écrit :
> 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 :
>>>> Also, that libcxx page makes no mention of:
>>>> However, seeing:
>>>> LIBCXX_SRC_ROOT := $(LLVM_SRC_ROOT)/projects/libcxx
>>>> CPP.Flags := -nostdinc++ -I$(LIBCXX_SRC_ROOT)/include
>>> Did you had a look at this thread:
>> 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.
> I went ahead and did as:
> 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 ->
> ls -ld /usr/include/c++/v1
> lrwxrwxrwx 1 root root 59 Feb 5 07:14 /usr/include/c++/v1 ->
> -stdlib=libc++ move.cpp -o move.exe
> undefined reference to `__cxa_free_exception'
> undefined reference to `__cxa_begin_catch'
> 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
> Now I did *not* do the download and install of:
> because the webpage:
> 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
> and I'm on ubuntu, not Mac OS X.
> Am I missing something?
I don't have access to my linux machine right now, so I cannot test, but I think you can link on libstdc++ to get the missing symbols (just adding -lstdc++ to the linker flags should be enough).
It should not conflict with libc++ symbols as libc++ uses inline namespace, and so mangle the standard symbols differently than the libstdc++.
This is what we use to do on OS X before we got a separate libc++abi library.
More information about the cfe-dev