[cfe-dev] Build system not picking up libc++?
Marc J. Driftmeyer
mjd at reanimality.com
Sat Jan 10 22:25:39 PST 2015
If you've followed LLVM/Clang you'd know already that cmake is the
defacto moving forward and has been for most of 2014.
- Marc
On 01/10/2015 06:15 PM, Jeffrey Walton wrote:
> Thanks Dan.
>
> Perhaps it would be a good idea to touch up some of the documentation.
>
> Other have been having problems (dating back to at least 2012), and
> I've wasted 3 days on it (on and off). I can't speak for others, but I
> can say for certain my problems are because the documentation is
> telling me otherwise (I'm attempting to do things that should work).
>
> -----
>
> The first change should be in `configure --help`. State that you can't
> specify the libcxx package and the libcxxabi package.
>
> This is something me and other folks try when dropping libcxx into
> llvm/projects and running configure fails to build the project.
> There's really no manual for configure options, so we end up asking
> dumb questions on CFE-Dev.
>
> -----
>
> The second change should be at http://llvm.org/docs/LLVMBuild.html
> under Build Integrations. State that the project does not support
> Makefiles under all cases. Specifically name libcxx and libcxxabi as
> examples that don't support it.
>
> This is a RTFM item, and its an important to state it. Otherwise,
> folks like me go down rabbit holes that are dead ends. And then we ask
> dumb questions on CFE-Dev.
>
> -----
>
> The third change should be at http://libcxx.llvm.org/. State the
> libcxx and libcxxabi projects do not support Makefiles - period.
>
> This is a RTFM item, and its an important to state it. Otherwise,
> folks like me go down rabbit holes that are dead ends. And then we ask
> dumb questions on CFE-Dev.
>
> -----
>
> There's a related change that could be helpful at
> http://libcxx.llvm.org/. I seem to recall LLVM does not really support
> building components in-tree (maybe this has changed, but I seem to
> recall problems in the past). So, effectively, we need to drop libc++
> in-tree so `make install` installs the headers, but we're not supposed
> to build components from there.
>
> So the helpful change would be: provide instruction when you have the
> following directory structure (or similar):
>
> + clang-project
> |
> + build
> |
> + llvm
>
>
> On Sat, Jan 10, 2015 at 8:28 PM, Dan Albert <danalbert at google.com> wrote:
>> 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
--
Marc J. Driftmeyer
email:mjd at reanimality.com <mailto:%27mjd at reanimality.com%27>
www:www.reanimality.com <http://www.reanimality.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150110/e1ca239b/attachment.html>
More information about the cfe-dev
mailing list