[cfe-dev] Build system not picking up libc++?

Dan Albert danalbert at google.com
Sat Jan 10 17:28:17 PST 2015


The configure scripts probably just don't support it. We've really only
been adding features to the cmake flow for libc++.

Also, if you're trying to use libc++abi as well, that project doesn't
support configure at all, so you'll have to use cmake.
On Jan 10, 2015 17:21, "Jeffrey Walton" <noloader at gmail.com> wrote:

> TLDR:
>
> I'm fetching packages from http://llvm.org/releases/download.html.
>
> Unpacking libcxx, placing it llvm/projects and running configure does
> not pickup libc++. That is, 'make' does not build libc++. How do I
> integrate libc++ into the build process?
>
> Manually running 'make cxx' per http://libcxx.llvm.org/ does not work.
> There is no 'cxx' target. That's from both the top level llvm
> directory and the llvm/projects/libcxx directory. Why does it not
> work? (I know its kind of a broad question, but I don't know how to
> start zeroing-in what's wrong).
>
> The llvm/projects/libcxx/Makefile does not have build rules (only
> install rules). The LLVM projects support both Make and Cmake
> (http://llvm.org/docs/LLVMBuild.html). I don't use Cmake, and I'm
> using the Make based gear. What makefile should I be using?
>
> Trying to specify the packages with --with-libcxx --with-libcxxabi to
> configure does not work. What are the package names? How do I specify
> the packages so they are included during build?
>
> -----
>
> I have a recipe that builds LLVM, Compiler Front End (Clang), Compiler
> RT and Extra tools. It works fine. I am trying to add libc++ to the
> process because my Clang 3.5.0 install is having troubles on OX S 10.9
> and 10.10 (it can't find C++ headers or libraries) (OS X 10.7 and 10.8
> are OK).
>
> I downloaded libcxx-3.5.0.src.tar.xz from
> http://llvm.org/releases/3.5.0/libcxx-3.5.0.src.tar.xz. I unpacked it,
> and moved it to llvm/projects/libcxx (so its where the build system
> expects it per http://libcxx.llvm.org/).
>
> I then configure with the following command (this is the same
> configure that works without libc++):
>
>     # 'build' is next to 'llvm', and its the staging directory
>     mkdir -p build
>     cd build
>     ../llvm/configure --enable-optimized --disable-assertions
> --enable-cxx11 \
>         $OTHER_OPTIONS --prefix=$(PREFIX)
>
> OTHER_OPTIONS is --enable-libcpp on OS X; and PREFIX is /usr/local.
>
> After configure and make, libc++ is not built. Performing a `find llvm
> -iname libc++*` reveals no artifacts, like `libc++.a or libc++.dylib.
> (It does find pre-existing files, like libc++abi.exp and
> libc++abi2.exp from llvm/projects/libcxx/lib/).
>
> ----------
>
> I cannot run `make cxx` from the 'build' directory per
> http://libcxx.llvm.org/. And manually running libc++'s make:
>
>     cd clang-scratch
>     mkdir -p build
>     DSTROOT=build; make -f llvm/projects/libcxx/Makefile
>
> Results in:
>
>     Use make install DSTROOT=<destination>
>
> Its as if the library was not even configured (it only has an install
> recipe).
>
> ----------
>
> I tried adding packages to the configure line:
>
>     ../llvm/configure --enable-optimized --disable-assertions
> --enable-cxx11 \
>         --with-libcxx --with-libcxxabi $OTHER_OPTIONS --prefix=$(PREFIX)
>
> But that results in:
>
>     configure: WARNING: Unknown project (libcxx) won't be configured
> automatically
>     configure: WARNING: Unknown project (libcxxabi) won't be
> configured automatically
>
> ----------
>
> A lot of this was already asked at "Questions about libc++ for linux
> and its git repository (if any)",
> http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-July/thread.html
> (scroll down about 3/5'ths of the page). But most of the questions
> went unanswered.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150110/f1398640/attachment.html>


More information about the cfe-dev mailing list